User loginNavigation |
ImplementationCOLA BrainfuckFrom the Software Architecture Group at the Hasso Plattner Institut:
Previously: COLA and Open, extensible object models; via neuraxon77. By Manuel J. Simoni at 2008-05-01 07:58 | DSL | Implementation | Meta-Programming | 4 comments | other blogs | 11362 reads
Register Allocation by Proof TransformationRegister Allocation by Proof Transformation, Atsushi Ohori. ESOP 2003.
The idea that making uses of the structural rules explicit gives you proof terms to model register-memory moves is very pretty. Another fun thing to do would be to take a continuation calculus and apply the ideas here to see if it produces a good low-level IR. EDIT: Ehud asked for some further exposition, so here goes. At a high level, you can think of the need to do register allocation as arising from a mismatch between a programming language and the hardware. In a language, we refer to data using variables, and in any given expression, we can use as many variables as we like. However, when a CPU does stuff, it wants the data to be in registers -- and it has only a small, finite set of them. So when a program is compiled, some variables can be represented by registers, and the rest must be represented by locations in memory (usually on the stack). Whenever the CPU needs to use a variable in memory, there must be explicit code to move it from memory into a register. The idea in this paper is to take the typing derivation of a program with an unbounded variable set, and then divide the context into two parts, one representing the register file and the other representing variables in memory. In terms of the implementation, moves between these two zones correspond to register-memory moves; and in terms of logic, this is a use of the structural rule of Exchange, which permutes the order of variables in a context. So this gives us a high-level, machine-independent characterization of the register allocation problem: take a one-zone derivation and convert it to a two-zone derivation. But it gets even better: as long as the register allocation algorithm only adds uses of the structural rules in its transformation, we know that the meaning of the original program is unchanged -- so this method also yields a simple way of proving that a register allocation pass is semantics-preserving. (The fact that this is an easy proof is one indication of the power of this idea.) By neelk at 2008-04-11 22:08 | Implementation | Lambda Calculus | Type Theory | 5 comments | other blogs | 9023 reads
Simply efficient functional reactivitySimply efficient functional reactivity. Conal Elliott.
I'm not sure exactly where to classify this submission to ICFP 2008, but I think many here will be interested in it. By Matt Hellige at 2008-04-07 17:36 | Implementation | Paradigms | 11 comments | other blogs | 19966 reads
Relating Complexity and Precision in Control Flow AnalysisRelating Complexity and Precision in Control Flow Analysis, David Van Horn and Harry Mairson. ICFP 2007.
There's ton of really good stuff in here; I was particularly fascinated by the fact that 0-CFA is exact for multiplicatively linear programs (ie, that use variables at most once), because linearity guarantees that every lambda can flow to at most one use site. By neelk at 2008-02-01 18:47 | Implementation | Lambda Calculus | Theory | 2 comments | other blogs | 10089 reads
The YNot Project
This was actually commented on here, by Greg Morrisett himself. Conceptually, this seems like it's related to Adam Chlipala's A Certified Type-Preserving Compiler from Lambda Calculus to Assembly Language. See, in particular, slides 23-24 of this presentation (PDF). More generally, computation and reflection seem to be gaining recognition as important features for the practical use of such powerful tools as Coq; see also SSREFLECT tactics for Coq and their accompanying paper A Small Scale Reflection Extension for the Coq system (PDF). It's also interesting to observe that the work appears to depend on the "Program" keyword in the forthcoming Coq 8.2, the work behind which is known as "Russell," as referred to in this thread. Russell's main page in the meantime is here. Again, the point is to simplify programming with dependent types in Coq. Update: Some preliminary code is available from the project page. By Paul Snively at 2008-01-29 02:14 | Functional | Implementation | Semantics | Type Theory | 24 comments | other blogs | 18688 reads
Open Multi-Methods for C++
Peter Pirkelbauer, Yuriy Solodkyy, and Bjarne Stroustrup. Open Multi-Methods for C++. Proc. ACM 6th International Conference on Generative Programming and Component Engineering (GPCE). October 2007.
Multiple dispatch – the selection of a function to be invoked based on the dynamic type of two or more arguments – is a solution to several classical problems in object-oriented programming. Open multi-methods generalize multiple dispatch towards open-class extensions, which improve separation of concerns and provisions for retroactive design. We present the rationale, design, implementation, and performance of a language feature, called open multi-methods, for C++ . Our open multi-methods support both repeated and virtual inheritance... ...our approach is simpler to use, catches more user mistakes, and resolves more ambiguities through link-time analysis, runs significantly faster, and requires less memory. In particular, the runtime cost of calling an open multimethod is constant and less than the cost of a double dispatch (two virtual function calls). Finally, we provide a sketch of a design for open multi-methods in the presence of dynamic loading and linking of libraries. Who said C++ isn't evolving? The discussion in section 4 of the actual implementation (using EDG) is particularly detailed, which is a bonus. Theorem proving support in programming language semantics
More work on mechanized metatheory with an eye towards naturalness of representation and automation. This seems to me to relate to Adam Chlipala's work on A Certified Type-Preserving Compiler from Lambda Calculus to Assembly Language, which relies on denotational semantics and proof by reflection, in crucial ways. More generally, it seems to reinforce an important trend in using type-theory-based theorem provers to tackle programming language design from the semantic point of view (see also A Very Modal Model of a Modern, Major, General Type System and Verifying Semantic Type Soundness of a Simple Compiler). I find the trend exciting, but of course I also wonder how far we can practically go with it today, given that the overwhelming majority of the literature, including our beloved Types and Programming Languages, is based on A Syntactic Approach to Type Soundness. Even the upcoming How to write your next POPL paper in Coq at POPL '08 centers on the syntactic approach. Is the syntactic approach barking up the wrong tree, in the long term? The semantic approach? Both? Neither? By Paul Snively at 2007-12-27 22:21 | Functional | Implementation | Lambda Calculus | Semantics | 4 comments | other blogs | 14511 reads
Avi Bryant: Ruby IS-A SmalltalkA short audio presentation (Avi speaks for less than ten minutes, I guess), about the lessons the Ruby community should learn from Smalltalk. It's mainly about turtles-all-the-way-down, but Self (fast VMs), GemStone (transactional distributed persistence), Seaside (web frameworks) are also mentioned briefly. By Ehud Lamm at 2007-12-12 03:59 | History | Implementation | OOP | Ruby | 39 comments | other blogs | 22870 reads
Concurrency: The Compiler Writer's PerspectiveA short interview with Brian Grant (of PeakStream and currently Google). From SD Times, Nov. 15, 2007.
By Tommy McGuire at 2007-12-04 19:17 | Implementation | Parallel/Distributed | 6 comments | other blogs | 8802 reads
OCaml Light: A Formal Semantics For a Substantial Subset of the Objective Caml LanguageOCaml Light: a formal semantics for a substantial subset of the Objective Caml language.
From a team including Peter Sewell (Acute, HashCaml, Ott). I continue to believe that things are heating up nicely in mechanized metatheory, which, in the multicore/multiprocessor world in which we now live, is extremely good news. By Paul Snively at 2007-11-26 18:33 | Functional | General | Implementation | Object-Functional | Semantics | Theory | Type Theory | 2 comments | other blogs | 10765 reads
|
Browse archives
Active forum topics |
Recent comments
1 week 2 days ago
1 week 3 days ago
13 weeks 3 days ago
13 weeks 4 days ago
13 weeks 5 days ago
13 weeks 5 days ago
14 weeks 4 days ago
14 weeks 4 days ago
14 weeks 4 days ago
17 weeks 4 days ago