Quantcast
Channel: Syntax!
Browsing all 19 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Set the root directory of a project in Emacs with dir-locals.el

Hi, and welcome to my blog. I’ll try to write here about the stuff I do, use or discover during my work as a Ph.D in Computer Science. There will hopefully be a bit of science (proof theory), some code...

View Article



Image may be NSFW.
Clik here to view.

An OCaml hack: recover the abstraction of abstract types

Here is a scoop: in OCaml, your abstract types aren’t really abstract (unfortunately). This is because some magical functions in the standard library don’t respect the abstraction of data types:...

View Article

Image may be NSFW.
Clik here to view.

Building terms, incrementally

Here is the first post of a series about incremental verification in programming languages. This problem has become more-or-less the main subject of my Ph.D, and this is an exercise in explaining it...

View Article

Image may be NSFW.
Clik here to view.

Reversing data structures

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?...

View Article

Image may be NSFW.
Clik here to view.

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 herds. Today, we are going to write type-checkers. And rewrite them. Again and again....

View Article


Image may be NSFW.
Clik here to view.

Building terms incrementally: expressivity

A few weeks ago, I showed a very simple model for constructing and storing typed combinators incrementally. By incremental, I meant that type-checking was a sequential and iterative process: instead of...

View Article

Image may be NSFW.
Clik here to view.

Strong reduction in big-steps

It has been a long while since I updated this blog, let me finally revive it with an easy but (hopefully) fun post, well ehm… at least some usable reference material! Strong reduction is the ability...

View Article

Image may be NSFW.
Clik here to view.

My thesis is out!

At last! The definitive, final and comprehensive version of my thesis manuscript is out. I defended it on April 8 in Bologna, Italy, and received both titles of “Dottore di ricerca” and “Docteur” in...

View Article


Image may be NSFW.
Clik here to view.

malloc() is the new gensym()

Teaching an introductory course to “compilation” this semester (actually it was called Virtual Machines, but it was really about compiling expressions to stack machines), I realized something I hadn’t...

View Article


Image may be NSFW.
Clik here to view.

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...

View Article

Image may be NSFW.
Clik here to view.

New draft on Normalization by Evaluation using GADTs

There is a new draft on my web page! It is called Tagless and Typeful Normalization by Evaluation using Generalized Algebraic Data Types, which is a mouthful, but only describes accurately the cool new...

View Article

Image may be NSFW.
Clik here to view.

Quick, dirty and shallow definitions

Here is a quick hack. A few months ago, I advocated for pointer equality in OCaml (==) as a way to deal with fresh symbols in a toy compiler. Today, I’ll show another application of pointer equality:...

View Article

Image may be NSFW.
Clik here to view.

1 ≠ 0

Learning Coq is usually an enlightening experience. I know it first-hand, it can also be a quite frustrating one, because it seems at first to involve remembering quite a lot of arbitrarily-named...

View Article


Image may be NSFW.
Clik here to view.

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 and Olivier, we thus revised the...

View Article

Image may be NSFW.
Clik here to view.

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....

View Article


Image may be NSFW.
Clik here to view.

Big-step disjunctive normal forms

This is probably a second-semester functional programming exercise, but I found it surprisingly hard, and could not find a solution online. So at the risk of depriving a TA from a problem for its...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article


Image may be NSFW.
Clik here to view.

Escaping continuations

Beta 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...

View Article

Image may be NSFW.
Clik here to view.

Parametric HOAS with first-class modules

One of the first choice to make when starting the development of a compiler, or any program manipulating syntax with binders (e.g. programs with functions and variables), is how to represent these...

View Article
Browsing all 19 articles
Browse latest View live




Latest Images