Iron Lambda is a collection of [http://coq.inria.fr Coq] formalisations for functional languages of increasing complexity. It fills part of the gap between the end of the [http://www.cis.upenn.edu/~bcpierce/sf/ Software Foundations] course and what appears in current research papers. If you are new to Coq then you would be better off starting with Software Foundations rather than this work. As the focus of Iron Lambda is more on programming language semantics than the coolest new proving techniques, we just use straight deBruijn indices for binders. Using deBruijn indices does require that we prove some lemmas about lifting and substitution, but they are very similar between languages, so the initial effort can be re-used. For more details see the blog post [http://disciple-devel.blogspot.com.au/2011/08/how-i-learned-to-stop-worrying-and-love.html How I learned to stop worrying and love deBruijn indices.] The proofs use a "semi-[http://adam.chlipala.net/cpdt/ Chilpala]" approach to mechanisation: most lemmas are added to the global hint and rewrite databases, but if the proof script of a particular lemma was already of a sane length, then we haven't invested time writing tricky LTac code to make it smaller. Style guidelines: * Verbose comments explaining what the main definitions and theorems are for. The scripts should be digestable by intermediate Coq users. * No unicode or infix operators for judgement forms. When ''I'' use them in ''my'' proofs they make perfect sense, but when you use them in yours they're completely unreadable. * Heavy use of the `burn` megatactic. This is in the same vein as Chilpala's `crush` tactic, but at the time I couldn't work out what `crush` was doing... * Uses the `Case` and `SCase` etc tactics to add structure. == Installation == * You will need a working version of [http://coq.inria.fr Coq]. The proofs are known to work with Coq 8.4. * We use [http://darcs.net/ darcs] for version control. {{{ $ darcs get http://code.ouroborus.net/iron/iron-head/ }}} * There is a top-level Makefile that will build all the proofs. For this to work `coqc` and `coqdep` need to be in your default path. {{{ $ cd iron-head $ make }}} == More Information == * Send email to `iron (wibble) ouroborus.net` == Related Work == * [http://www.cis.upenn.edu/~bcpierce/sf/ Software Foundations] * [http://adam.chlipala.net/cpdt/ Certified Programming with Dependent Types] * [http://www.cis.upenn.edu/~bcpierce/papers/binders.pdf Engineering Formal Metatheory (paper)] [http://www.chargueraud.org/softs/ln/ (proofs)] * [http://www.seas.upenn.edu/~plclub/poplmark/ The POPLmark Challenge] * [http://coq.inria.fr/cocorico/List%20of%20Coq%20PL%20Projects List of Programming Languages Coq projects] * [http://compcert.inria.fr/ CompCert] [[br]] [[br]] == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/Simple/ Simple] == Simply Typed Lambda Calculus (STLC). "Simple" here refers to the lack of polymorphism. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SimplePCF/ SimplePCF] == STLC with booleans, naturals and fixpoint. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SimpleRef/ SimpleRef] == STLC with mutable references. The typing judgement includes a store typing. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SimpleData/ SimpleData] == STLC with algebraic data and case expressions. The definition of expressions uses indirect mutual recursion. Expressions contain a list of case-alternatives, and alternatives contain expressions, but the definition of the list type is not part of the same recursive group. The proof requires that we define our own induction scheme for expressions. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SystemF/ SystemF] == Compared to STLC, the proof for SystemF needs more lifting lemmas so it can deal with deBruijn indices at the type level. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SystemF2/ SystemF2] == Very similar to SystemF, but with higher kinds. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SystemF2Data SystemF2Data] == SystemF2 with algebraic data and case expressions. Requires that we define simultaneous substitutions, which are used when subsituting expressions bound by pattern variables into the body of an alternative. The language allows data constructors to be applied to general expressions rather than just values, which requires more work when defining evaluation contexts. == [http://code.ouroborus.net/iron/iron-head/done/Iron/Language/SystemF2Store/ SystemF2Store] == SystemF2 with algebraic data, case expressions and a mutable store. All data is allocated into the store and can be updated with primitive polymorphic update operators. == [http://code.ouroborus.net/iron/iron-head/devel/Iron/Language/SystemF2Effect/ SystemF2Effect] == * Still under development. SystemF2 with a region and effect system.