User loginNavigation |
Ï€: a pattern languageπ - not to be confused with the π-calculus - is a pattern-based language being developed by the Software Technology group at Technische Universität Darmstadt. Quoting from the project website:
The basic idea here seems similar to the OMeta language, previously mentioned on LtU here, but based on EBNF instead of Parsing Expression Grammars (PEGs). Pattern definitions in π have the form declare_pattern name ≔ syntax ⇒ type âžž meaning; Here's a trivial example of defining a pattern: declare_pattern integer_potentiation ≔ integer:i %W- "^" %W- integer:j ⇒ integer âžž { int result = i; for (int k = 1; k <= j-1; k++) result *= i; return result; }; The resulting pattern can then be used directly in expressions, such as More information about the language, as well as the implementation, can be found at http://www.pi-programming.org. There's an OOPSLA09 paper on π as well, but I haven't been able to find an open access version of it yet. [Update: the π team has made their OOPSLA article available here] By Allan McInnes at 2009-10-29 01:58 | DSL | Meta-Programming | 10 comments | other blogs | 16124 reads
Causal Commutative Arrows and Their OptimizationCausal Commutative Arrows and Their Optimization, Hai Liu. Eric Cheng. Paul Hudak. ICFP 2009.
One way of understanding what is going on in this paper is that in terms of dataflow programming, FRP programs correspond to programs with single-entry, single-exit dataflow graphs. This means that none of the internal dataflow nodes in an FRP program are actually necessary -- you can coalesce all those nodes into a single node while preserving the observable behavior. (They briefly touch on this point when they mention that synchronous languages try to compile to "single loop code".) What's very slick is that they have a nice normal form procedure that (a) is defined entirely in terms of their high-level language, and (b) always yields code corresponding to the the coalesced dataflow graph. It's an elegant demonstration of the power of equational reasoning. Retrospective: An Axiomatic Basis for Computer ProgrammingRetrospective: An Axiomatic Basis for Computer Programming, by C.A.R. Hoare:
An interesting review of the history of computing. He has some nice perspectives on the complementarity of testing and formal methods, and how the growing cracking industry became an unexpected driving force behind industrial interest in verification. Design Patterns 15 Years Later: An Interview with Erich Gamma, Richard Helm, and Ralph JohnsonLarry O'Brien recently interviewed three of the Gang of Four about their seminal work on patterns. Larry teased the interview's readers for awhile, but he eventually asked the pressing question that most language designers ask and debate about patterns ;) Here it is:
Note: At the end of the interview, Erich says that they tried refactoring the patterns into new categories in 2005. The draft breakdown he provides (accidentally???) takes out Memento, Chain of Responsibility, Bridge, Adapter, and Observer.
UPDATE: The Gang of Four have an accompanying article for the interview that they wrote as a group. See A Look Back: Why We Wrote Design Patterns: Elements of Reusable Object-Oriented Software. By Z-Bo at 2009-10-23 23:32 | Critiques | Misc Books | OOP | 25 comments | other blogs | 25492 reads
Have your AHOS and eat HOAS too!Noam (uid 3913) announced on his weblog at the beginning of the year a technique that allows one to bridge the gap between meta-theoretic notions of function space and theory-internal notions, in a way that is compatible with structural induction over Higher-Order Abstract Syntax, by applying Reynolds' Definitional Interpreters for Higher-Order Programming Languages [pdf] (cf. LtU classic), and realised it as an implementation in Twelf. That's a lot of ideas in one sentence, but since HOAS is in the air this month, I guess there are a good number of LtUers who will want to get to grips with this stuff. Refs:
SequenceL - declarative computation on nonscalarsI recently came across the language SequenceL, which it seems NASA is using in some of its human spaceflight programs. SequenceL is described as a high-level language for declarative computation on nonscalars. One of the key features of the language appears to be the avoidance of the need to explicitly specify recursive or iterative operations. For example, given the function definition Search(scalar Target, tuple [Subscript, Word]) = Subscript when Word = Target which applies to tuples, the programmer can apply the function directly to lists of tuples without any need to specify how that application will be performed, e.g. search(fox,[[1,dog],[2,cat],[3,fox],[4,parrot]]) → 3 search(rabbit,[[1,dog],[2,cat],[3,fox],[4,parrot]]) → [] The language designers (Daniel Cooke and J. Nelson Rushton) claim that this kind of thing leads to more concise and readable code, and a more direct representation of a specification. Unfortunately, the SequenceL website appears to be inaccessible at the moment. However, Daniel Cooke's site includes links to a number of papers and talks that describe SequenceL. In particular, the paper Normalize, Transpose, and Distribute: An Automatic Approach for Handling Nonscalars provides a detailed description of the "Consume-Simplify-Produce/Normalize-Transpose" approach that is embodied by SequenceL. There's also an overview of SequenceL available through CiteSeer. By Allan McInnes at 2009-10-11 21:34 | Functional | Logic/Declarative | 13 comments | other blogs | 12327 reads
Safe Garbage Collection = Regions + Intensional Type AnalysisSafe Garbage Collection = Regions + Intensional Type Analysis, by Daniel C. Wang and Andrew W. Appel:
I'm surprised this region calculus hasn't received more attention or follow-up discussion in subsequent papers. It seems eminently practical, as it replaces the more complicated alias analyses required in other region calculi, with garbage collection of region handles; seems like a huge improvement over general GC, assuming region inference is sufficiently precise. By naasking at 2009-10-11 20:47 | Implementation | Software Engineering | Teaching & Learning | 14 comments | other blogs | 10529 reads
ICFP 2009 videosI'm not sure whether this has already been posted (a quick search says "no"), but videos from 40 presentations at ICFP 2009 (in Edinburgh), are available through this Vimeo account. I'm sure this will be of some interest to LtU readers. A Type-theoretic Foundation for Programming with Higher-order Abstract Syntax and First-class Substitutions
A Type-theoretic Foundation for Programming with Higher-order Abstract Syntax and First-class Substitutions by Brigitte Pientka, appeared in POPL 08.
Higher-order abstract syntax (HOAS) is a simple, powerful technique for implementing object languages, since it directly supports common and tricky routines dealing with variables, such as capture-avoiding substitution and renaming. This is achieved by representing binders in the object-language via binders in the meta-language. However, enriching functional programming languages with direct support for HOAS has been a major challenge, because recursion over HOAS encodings requires one to traverse - abstractions and necessitates programming with open objects.Its been a while since I posted, but this paper appears that it may be of interest to some members of this community. It looks interesting to me, but I just wish I understood all the terminology. I don't know what "open objects" are, and why they are a problem. I don't understand what HOAS is. I don't even know what binders are. The list goes on. I surely can't be the only person who is interested, but feels that this is just out of their grasp. I bet that I probably could understand these things with a minimum of explanation, given I have experience implementing languages. If anyone is interested in rephrasing the abstract in more basic terms, I would be very appreciative. [Edit: corrected spelling of Brigitte Pientka. My apologies.] By cdiggins at 2009-10-03 18:51 | Functional | Semantics | Theory | 26 comments | other blogs | 18385 reads
JVM language summit 2009Notes and presentations from the href="http://www.jvmlangsummit.com">JVM language summit 2009 are available. (Even though the page says 2008). Most intersting talk seems to be from Rich Hickey's clojure presentation where he wants languages to be explicit about time. Presentation[PDF] Also Erik Meijer talks about .NET Reactive Framework. Calls GOF book crap [YouTube video]. Archive of Live Tweets |
Browse archives
Active forum topics |
Recent comments
36 weeks 2 days ago
36 weeks 2 days ago
36 weeks 2 days ago
1 year 6 weeks ago
1 year 10 weeks ago
1 year 12 weeks ago
1 year 12 weeks ago
1 year 14 weeks ago
1 year 19 weeks ago
1 year 19 weeks ago