User loginNavigation |
archivesShort examples of complex use of state?Hi, I'm looking for some short algorithms that use state in tricky ways, where by "tricky" I mean: 1. State is used nonlinearly. That is, there should be multiple pointers to some of the state in the program. 2. The state should be "visible" to clients. Something like memoizing or caching is stateful and nonlinear, but it has no visible side-effects. 3. The state should have an indefinite lifetime -- that is, stack allocation isn't a sufficient memory management strategy. 4. Ideally, the state should be higher-order -- I'd like to see references of function (or object) types, so that there's a pointer to code. This is less critical than the others, but still nice. Any ideas? I've thought of union-find, and I would guess there are graph algorithms that have these properties, but I'm relatively ignorant about them. Pure bigraphs: structure and dynamics (by Robin Milner)I just came accross this interesting paper: Pure bigraphs: structure and dynamics. From the abstract: "...it is shown that behavioural analysis for Petri nets, pi-calculus and mobile ambients can all be recovered in the uniform framework of bigraphs."
An interesting thing from my point of view is that an attempt is made to provide a descriptive explanation of the material, obviously along with math proofs. Conference in VancouverSome of you might be interested in the following Conference during the first weekend in June at UBC in Vancouver, Canada: Conference: Foundational Methods in Computer Science (FMCS05) Local organizer: John MacDonald Friday, June 3, 2005 9:00-10:30a.m. Ernie Manes, UMass Amherst, USA 11:00-12:30p.m. Vaughan Pratt, Stanford University, USA 2:30-4:00p.m. Steve Bloom, Stevens Institute of Technology, USA 4:30-6:00p.m. Robin Cockett, University of Calgary Saturday, June 4, 2005 9:00-9:50a.m. Paul Taylor, Manchester, UK 9:50-10:30a.m. Cyrus Nourani, USA 11:00-11:30a.m TBA 11:30-12:15p.m. Art Stone, Vancouver, Canada 2:00-2:30p.m. Varmo Vene, University of Tartu, Estonia 2:30-3:00p.m. Bob Rosebrugh, Mt. Allison University 3:00-3:30p.m. Chris Dutchyn, University of British Columbia 4:00-5:00p.m. Philip Mulry, Colgate University, USA Sunday, June 5, 2005 9:00- 9:30a.m. Brian Redmond, University of Ottawa, 9:30-10:00a.m. X. Guo, University of Calgary, 10:00-10:30a.m. Dana Harrington, University of Calgary 10:30-11:00a.m. Break 11:00-11:30a.m. David Oury, McGill University, 11:30-12:00 Pieter Hofstra, University of Ottawa, 12:00-12:30p.m. TBA Last updated: 5/27/05 For further information see the conference website: Scrap your boilerplate with class: extensible generic functions
Scrap your boilerplate with class: extensible generic functions. Ralf Laemmel and Simon Peyton Jones.
The "scrap your boilerplate" approach to generic programming allows the programmer to generic functions that can traverse arbitrary data structures, and yet have type-specific cases. However, the approach requires all the type-specific cases to be supplied at once, when the function is defined: the function is closed. In contrast, Haskell's type classes support open, or extensible functions, that can be extended with new type-specific cases as new data types are defined. In this paper we show how to extend the scrap-your-boilerplate approach to support this open style. On the way we demonstrate the desirablility of abstraction over type classes, and the usefulness of recursive dictionaries. If you haven't been paying attention, this is your chance to learn about the "scrap your boilerplate" approach to generic programming in Haskell. We mentioned and discussed the earlier papers in the series. Like many of Peyton Jones's papers this one is an enlightening exploration of language design. By Ehud Lamm at 2005-05-27 20:42 | Functional | Software Engineering | 2 comments | other blogs | 7007 reads
|
Browse archivesActive forum topics |
Recent comments
22 weeks 8 hours ago
22 weeks 12 hours ago
22 weeks 12 hours ago
44 weeks 1 day ago
48 weeks 3 days ago
50 weeks 20 hours ago
50 weeks 20 hours ago
1 year 4 days ago
1 year 5 weeks ago
1 year 5 weeks ago