syntaxexclamation.wordpress.com
Quick, dirty and shallow definitions | Syntax!
https://syntaxexclamation.wordpress.com/2013/11/21/quick-dirty-and-shallow-definitions
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Quick, dirty and shallow definitions. Here is a quick hack. A few months ago. Have you ever implemented an quick prototype for a language, and be annoyed by the lack of definition mechanism? For instance, you define a small calculus and encode a few constructs to test it, but end up with outputs like:. When you only wanted the system to print:. Some would call this a deep encoding.
syntaxexclamation.wordpress.com
Reverse natural deduction and get sequent calculus | Syntax!
https://syntaxexclamation.wordpress.com/2011/09/01/reverse-natural-deduction-and-get-sequent-calculus
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Reverse natural deduction and get sequent calculus. This is a follow-up on my previous post. It should be readable by itself if you just take a quick peek at. We shall here start by writing a type-checker for the usual simply typed lambda-calculus, natural deduction-style. Types are:. Type tp = Nat Arr of tp * tp. Let us make a. Process. Having redexes in the syntax and eliminat...
syntaxexclamation.wordpress.com
Update on Typeful Normalization by Evaluation | Syntax!
https://syntaxexclamation.wordpress.com/2014/02/14/update-on-typeful-normalization-by-evaluation
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Update on Typeful Normalization by Evaluation. In October, I publicized here a new draft on normalization by evaluation. Which provoked some very helpful comments and constructive criticisms. Together with Chantal. We thus revised the draft profoundly and a revamped version is available. On my web site. What I really liked about working on program transformations with GADTs, is that...
syntaxexclamation.wordpress.com
Typeful disjunctive normal form | Syntax!
https://syntaxexclamation.wordpress.com/2014/04/18/547
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Typeful disjunctive normal form. This is the answer to last post’s puzzle. I gave an algorithm to put a formula in disjunctive normal form, and suggested to prove it correct in OCaml. Thanks to GADTs. My solution happens to include a wealth of little exercises that could be reused I think, so here it is. What we are eventually looking for is a function. Must return the pair of a.
syntaxexclamation.wordpress.com
New draft: Proofs, upside down | Syntax!
https://syntaxexclamation.wordpress.com/2013/06/17/new-draft-proofs-upside-down
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. New draft: Proofs, upside down. There is a new draft on my web page. That should be of interest to those who enjoyed my posts about reversing data structures. And the relation between natural deduction and sequent calculus. It is an article submitted to APLAS 2013. And it is called. Proofs, upside down. Written in direct style , and that equivalent, iterative version:. June 17, 2013.
syntaxexclamation.wordpress.com
Representing pattern-matching with GADTs | Syntax!
https://syntaxexclamation.wordpress.com/2014/04/12/representing-pattern-matching-with-gadts
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Representing pattern-matching with GADTs. Here is a little programming pearl. I’ve been wanting to work on pattern-matching for a while now, and it seems like I will finally have this opportunity here at my new (academic) home, McGill. Match E with (y, z) - E. Actually is sugar for. Match E with ( , ) - fun x y - E. The ideas probably extends seamlessly to De Bruijn indices, by thre...
syntaxexclamation.wordpress.com
malloc() is the new gensym() | Syntax!
https://syntaxexclamation.wordpress.com/2013/05/04/malloc-is-the-new-gensym
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Teaching an introductory course to compilation this semester (actually it was called Virtual Machines. Operator in OCaml), then you are actually working in a weakly impure language, and you can for example implement a limited form of. Is this classic innocuously effectful function returning a different symbol. It will return a fresh pointer where to store your data. Each call to say.
syntaxexclamation.wordpress.com
Reversing data structures | Syntax!
https://syntaxexclamation.wordpress.com/2011/08/31/reversing-data-structures
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. A reversed list is not really a list anymore. It is isomorphic to a list, but it is not a list. Let me explain why. Prelude: zippers and contexts. How do we define in general reversing a data structure? Intuitively, constructors at the bottom of an original value must appear at the top of the resulting value. A good formal definition arises from the. By a pair of a value. To initial...
syntaxexclamation.wordpress.com
Escaping continuations | Syntax!
https://syntaxexclamation.wordpress.com/2014/06/26/escaping-continuations
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. Had a funny joke at POPL last year; he said: you exit a monad like you exit a building on fire: by running . I recently got myself in the stressful situation of being trapped in a monad—the continuation monad—but without a possibility to “run”. There an exit nonetheless: just jump out! This is the (short) story of an escape. A seemingly inescapable monad. Is fixed in advance:. For s...
syntaxexclamation.wordpress.com
Syntax! | A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. | Page 2
https://syntaxexclamation.wordpress.com/page/2
A research blog about programming languages, formal logics, software development and their interactions, by Matthias Puech. May 4, 2013. Teaching an introductory course to compilation this semester (actually it was called Virtual Machines. Operator in OCaml), then you are actually working in a weakly impure language, and you can for example implement a limited form of. Is this classic innocuously effectful function returning a different symbol. It will return a fresh pointer where to store your data.
SOCIAL ENGAGEMENT