Skip to main content

Project Description

CoCaml is a strongly-typed call-by-value functional language in the ML family. It is syntactically almost identical to OCaml, except that variables are mutable (can be rebound) as with the Scheme set! construct. This is done to give a uniform semantic treatment of recursive functions and coinductive datatypes. An added benefit is that it also supports familiar imperative constructs.

CoCaml is based on the semantic concept of capsules, a heap-free semantic model for functional and imperative programming. The theory behind capsules is described in the references below.



1 20 Dec 2012 v1 documentation
2 14 Jan 2013 v2 documentation v2 release notes
3 14 Feb 2013 v3 documentation v3 release notes
4 1 Apr 2013 v4 documentation v4 release notes
5 27 Aug 2015 v5 documentation v5 release notes

Mock-up implementations from [2]

[] A full mock-up in OCaml with most of the examples and solvers from [2].

[] A more elementary preliminary version in OCaml with only the free variables, automata, and probabilistic examples and iteration solver.


  1. Jean-Baptiste Jeannin, Dexter Kozen, and Alexandra Silva. CoCaml: Programming with coinductive types. Technical Report, Computing and Information Science, Cornell University, December 2012.
    Describes a full implementation of CoCaml with constructs allowing the computation of functions defined on non-well-founded coinductive data.
  2. Jean-Baptiste Jeannin, Dexter Kozen, and Alexandra Silva. Language constructs for non-well-founded computation. Technical Report SEN-1202, CWI Amsterdam, July 2012. 22nd European Symposium on Programming (ESOP'13), to appear.
    Describes how an OCaml-like language might be augmented with constructs allowing the computation of functions defined on non-well-founded coinductive data. Several examples and a mock-up implementation are given.
  3. Jean-Baptiste Jeannin and Dexter Kozen. Computing with capsules. In Martin Kutrib, Nelma Moreira, and Rogério Reis, editors, Proc. Conf. Descriptional Complexity of Formal Systems (DCFS 2012), volume 7386 of Lecture Notes in Computer Science, pages 1-19, Braga, Portugal, July 2012. Springer.
    An introduction to capsules.
  4. Jean-Baptiste Jeannin and Dexter Kozen. Capsules and separation. In Nachum Dershowitz, editor, Proc. 27th ACM/IEEE Symp. Logic in Computer Science (LICS'12), pages 425-430, Dubrovnik, Croatia, June 2012. IEEE.
    An application of capsules to the semantics of Separation Logic.
  5. Dexter Kozen. New. In Ulrich Berger and Michael Mislove, editors, Proc. 28th Conf. Math. Found. Programming Semantics (MFPS XXVIII), pages 13-38, Bath, England, June 2012. Elsevier Electronic Notes in Theoretical Computer Science.
    An extension of capsule semantics with object-oriented constructs and coinductive datatypes.


Please contact Dexter <Turn on JavaScript to view email address> with bugs and/or suggestions.