Declarative Concurrency in Oz: Followup

7 views
Skip to first unread message

Lyle Kopnicky

unread,
Feb 14, 2012, 1:15:14 PM2/14/12
to pdx...@googlegroups.com
Hi folks,

Thanks for all your interesting questions last night. I've attached the corrected presentation (someone pointed out an error in the code).

For further reading, or to play with Oz, see http://www.mozart-oz.org. It's available for Mac/Win/Linux. There's also a web site, http://www.info.ucl.ac.be/~pvr/book.html, for the excellent book Concepts, Techniques, and Models of Computer Programming, by Peter Van Roy and Seif Haridi (aka CTM).

A correction is in order. We talked about a limitation of the declarative queues that I presented: that you could not share queues as parts of other queues. For example, with lists, you can easily have two different lists that share the same tail. With a queue, you might like to fork it into two versions, adding a different element to each version. This is called a persistent queue. You'd like to have a persistent queue without taking an O(n) performance hit for a worst-case operation.

I said it wasn't possible to do this efficiently, but that's incorrect. It's possible to implement declarative persistent queues with O(1) worst-case operation. The CTM book explains how to create persistent queues with an O(log n) complexity, by doing occasional copying of the queue. It leaves the O(1) case as an exercise (Ch. 4, Ex. 20). I've attached my solution.

- Lyle
declarative_concurrency.oz
ex20.oz

Jake Brownson

unread,
Feb 14, 2012, 1:17:39 PM2/14/12
to pdx...@googlegroups.com
Thanks for the great presentation!

> --
> You received this message because you are subscribed to the Google Groups
> "pdxfunc" group.
> To post to this group, send email to pdx...@googlegroups.com.
> To unsubscribe from this group, send email to
> pdxfunc+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pdxfunc?hl=en.

Jesse Cooke

unread,
Feb 14, 2012, 1:20:10 PM2/14/12
to pdx...@googlegroups.com
Thanks for the great presentation!
And the followup! 

--------------------------------------------
Jesse Cooke :: N-tier Engineer
jc00ke.com / @jc00ke
Reply all
Reply to author
Forward
0 new messages