User loginNavigation |
Meta-ProgrammingClosing the Stage: From Staged Code to Typed ClosuresYukiyoshi Kameyama, Oleg Kiselyov, Chung-chieh Shan. Closing the Stage: From Staged Code to Typed Closures. PEPM'08. (code)
Essentially, representation of staged programs in an unstaged language turns out to be related to typechecking/typed compilation: typechecking is a stage. While this basic idea is straightforward, the work presented in the paper is rather intricate and depends on previous work on typed compilation. Oleg will be able to put this work in context in the forum, hopefully. By Ehud Lamm at 2007-12-17 03:17 | Meta-Programming | Type Theory | 9 comments | other blogs | 11387 reads
Inductive Synthesis of Functional Programs: An Explanation Based Generalization ApproachInductive Synthesis of Functional Programs: An Explanation Based Generalization Approach We describe an approach to the inductive synthesis of recursive equations from input/output-examples which is based on the classical two-step approach to induction of functional Lisp programs of Summers (1977). In a first step, I/O-examples are rewritten to traces which explain the outputs given the respective inputs based on a datatype theory. These traces can be integrated into one conditional expression which represents a non-recursive program. In a second step, this initial program term is generalized into recursive equations by searching for syntactical regularities in the term. Our approach extends the classical work in several aspects. The most important extensions are that we are able to induce a set of recursive equations in one synthesizing step, the equations may contain more than one recursive call, and additionally needed parameters are automatically introduced. Is this the future of programming? Tagless Staged Interpreters for Simpler Typed LanguagesFinally Tagless, Partially Evaluated, Tagless Staged Interpreters for Simpler Typed Languages.
Oleg explains: It seems like a common wisdom that an embedding of a typed object language (e.g., DSL) to a typed meta-language so that all and only typed object terms can be represented requires dependent types, GADTs or other such advanced type systems. In fact, this problem of writing (tagless) type-preserving typed interpreters has been the motivation for most of the papers on GADTs. We show that regardless of merits and conveniences of GADTs, type-preserving typed interpretation can be achieved with no GADTs whatsoever, using very simple type systems of ML or Haskell98. We also show the same approach lets us perform statically type-preserving partial evaluation and call-by-value or call-by-name CPS tansformations. The latter transformations, too, are often claimed impossible in Haskell98 or ML - requiring instead quite advanced type systems or language features.
The complete (Meta)OCaml and Haskell code accompanying the paper is One of features of our approach is writing the DSL code in a form that can be interpreted in multiple ways. Recently we have become aware the very same approach underlies `abstract categorial grammars' (ACG) in linguistics. Chung-chieh Shan has written an extensive article on this correspondence. That post itself can be interpreted in several ways: the file can be read as plain text, or it can be loaded as it is in Haskell or OCaml interpreters. It should be noted that the linguistic terms `tectogrammatics' and `phenogrammatics' were coined by none else but Haskell Curry, in his famous 1961 paper 'Some Logical Aspects of Grammatical Structure'. The summary of the ESSLLI workshop describes further connections to linear lambda-calculus. The paper has been accepted for APLAS; the authors appreciate any comments indeed. By Ehud Lamm at 2007-09-04 09:35 | Implementation | Meta-Programming | Type Theory | 30 comments | other blogs | 30516 reads
A Temporal Logic Language for Context Awareness in PointcutsA paper by Charlotte Herzeel, Kris Gybels, Pascal Costanza presented at ILC2007.
Charlotte Herzeel presented this at ILC with a flashy web-shop application built on Edi Weitz's standard tools of the web trade. The example takes the basic web-shop and uses aspects to add a lot of funky rules about promotion and discounts based on stock levels, what's selling well, what the user has been browsing, etc, and makes sure the discounts are honoured at the checkout. The focus on adding new and interesting functionality with aspects is refreshing. So is the basis in a powerful language like Lisp. The weakness of most aspect-oriented programming examples in my eyes is that they appear to be working around artificial problems caused by stubbornly using a base language that's ill-suited to the task. That only plays well with the audiences who are also stubbornly using those base languages for ill-suited tasks :-) A Certified Type-Preserving Compiler from Lambda Calculus to Assembly LanguageA Certified Type-Preserving Compiler from Lambda Calculus to Assembly Language
I found this while attempting to follow up on this post. The approach taken here—dependently-typed ASTs and denotational semantics—and the observation that, carried to its logical conclusion, the result is typed intermediate and assembly languages, proof-carrying code, etc. suggests to me a connection to this work. It also seems to offer a denotational counterpoint to Leroy's coinductive big-step operational semantics, also done in Coq. Fascinating stuff. By Paul Snively at 2007-03-22 15:46 | Functional | Implementation | Lambda Calculus | Meta-Programming | Semantics | Type Theory | 14 comments | other blogs | 35068 reads
Type-Level Computation Using Narrowing in OmegaHaven't seen this paper by Tim Sheard mentioned on Ltu before. As in previous papers Sheard tries to put Howard Curry to work in terms that are understandable for those that don't have a Phd in type theory.
By Niels Hoogeveen at 2007-02-08 20:21 | Functional | Meta-Programming | Type Theory | 1 comment | other blogs | 7060 reads
Meta-Compilation of Language AbstractionsMeta-Compilation of Language Abstractions, a dissertation by Pinku Surana.
A very interesting and detailed paper, which touches on many perennial LtU subjects, and once again shifts the line between user programs and the compiler. If you're tempted to say "this sounds like X...", then read Chapter 2, which gives a comprehensive comparison to alternative approaches, including static type inference, traditional macro systems, templates, partial evaluation, and multi-stage languages such as MetaML and MetaOCaml. Some carefully selected quotes which I think summarize the summary quite well:
Pinku Surana will be presenting this work at a meeting of LispNYC on Feb 13th in New York City. An announcement with details of the meeting can be found here. By Anton van Straaten at 2007-02-02 19:16 | DSL | Meta-Programming | 13 comments | other blogs | 17127 reads
Ott--a tool for writing definitions of programming languages and calculi.Ott—a tool for writing definitions of programming languages and calculi.
Peter Sewell and his team continue to bridge the gap between the informal and formal worlds of programming language semantics. By Paul Snively at 2007-01-23 07:06 | DSL | Meta-Programming | Semantics | Type Theory | login or register to post comments | other blogs | 12349 reads
Charming Python: Decorators make magic easy
While metaprogramming is inherently a bit confusing, I think this article could have a been a little clearer. Still, it's a nice highlevel introduction to decorators. By Ehud Lamm at 2007-01-05 14:40 | Meta-Programming | Python | 7 comments | other blogs | 10559 reads
A Stepper for Scheme MacrosA Stepper for Scheme Macros. Ryan Culpepper, Matthias Felleisen.
Another paper from the Scheme workshop. Apart from being a nice exercise for macro lovers, a good macro debugger is essential for lowering the barrier to macro programming. Since macro programming is an important technique for building DSELs and for language oriented programming in general, having better macro debugging facilities is a Good Thing. By Ehud Lamm at 2006-10-08 13:34 | DSL | Meta-Programming | Teaching & Learning | login or register to post comments | other blogs | 7228 reads
|
Browse archives
Active forum topics |
Recent comments
23 weeks 1 day ago
23 weeks 1 day ago
23 weeks 1 day ago
45 weeks 2 days ago
49 weeks 4 days ago
51 weeks 1 day ago
51 weeks 1 day ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago