Mojojojo - More Ownership for Multiple Owners

Paley Li, Nicholas Cameron, and James Noble


Traditional ownership types organise the heap into a tree. Ownership types can support memory management, real-time systems, concurrency, parallelism, and general purpose reasoning about programs. Trees, however, are too restrictive to describe many real programs, limiting the usability of conventional ownership systems. Multiple ownership organises the heap into a directed acyclic graph, rather than a tree. MOJO was the first language to support multiple ownership; it featured multiple owners per object, owner-wildcards, an effect system, and a simple "owners as sets" model.

In this paper, we introduce Mojojojo, a successor to MOJO. Mojojojo is both simpler and more powerful than MOJO: supporting generics and existential types (which allows for more re-usable classes); a more expressive system of constraints for specifying topology, which are closely tied to the simple set-theoretic model; and a simpler formalisation. We contribute a thorough description of Mojojojo, its formalisation and soundness proof, and a discussion of how Mojojojo can be extended to incorporate prescriptive constraints, addressing the same goals as owners-as-dominators or owners-as-modifiers disciplines.

Full paper


Presented at FOOL'10; Sunday, 17 October 2010, Reno, Nevada, USA.