User loginNavigation |
Meta-ProgrammingCOLA BrainfuckFrom the Software Architecture Group at the Hasso Plattner Institut:
Previously: COLA and Open, extensible object models; via neuraxon77. By msimoni at 2008-05-01 07:58 | DSL | Implementation | Meta-Programming | 3 comments | other blogs | 2957 reads
Scheme macro systems[Chicken-users] macro systems and chicken (long), Alex Shinn, Apr 2008.
A very nice post that provides a historical overview and implementations of a hygienic I didn't know syntactic closures before, and find their interface and implementation simple and easy to understand. Any reasons why they aren't used more in Scheme? Applied Metamodelling: A Foundation for Language Driven DevelopmentApplied Metamodelling: A Foundation for Language Driven Development (2004) An excerpt:
In software engineering circles the term "language driven development" is synonymous with "language oriented programming", a term which LtU members are more familiar with (thanks to Martin Ward's article Language Oriented Programming which first appeared in 1994, and then Martin Fowler's essays on the topic). The book hasn't appeared on the radar here on LtU, despite 41 citations. I suspect this is due in part to only one citation at Citeseer, and the lack of cross-talk between computer scientists and software engineers. There are a lot of similarities between the XMF language (discussion at LtU) and that of the Katahdin language (discussion at LtU). Other related discussions here at LtU, include Language Workbenches: The Killer App for DSLs - about the essay by Martin Fowler, Ralph Johnson: Language workbenches - a response to Fowler's essay, XActium - Lightweight Language Engineering? - which discusses an essay about a previous version of XMF, Generating Interpreters? , Language Oriented Programming - discusses an essay by Jetbrain's Sergey Dmitriev, "Language Oriented Programming" Meta Programming System - discussion of the Jetbrain MPS system, The DSL, MDA, UML thing again... - an older discussion on the relationship between DSLs and MDA. (Disclaimer: Some may notice that I am mentioned on the XMF web site, but this is just because I subjected their XMF language to a number of grueling challenges which they passed with flying colors: see the language snippets in the documentation. I have no affiliation with their company.) By cdiggins at 2008-03-07 19:07 | DSL | Meta-Programming | Software Engineering | 17 comments | other blogs | 5442 reads
Closing 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 | 3 comments | other blogs | 2832 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 | 19 comments | other blogs | 4839 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 | 4402 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 | 2116 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 | 4204 reads
|
Browse archivesActive forum topics |