Alloy specifications are used to define lightweight models of systems. We present Alchemy, which compiles Alloy specifications into implementations that execute against persistent databases. Alchemy translates a subset of Alloy predicates into imperative update operations, and it converts facts into database integrity constraints that it maintains automatically in the face of these imperative actions. In addition to presenting the semantics and an algorithm for this compilation, we present the tool and outline its application to a non-trivial specification. We also discuss lessons learned about the relationship between Alloy specifications and imperative implementations. Categories and Subject Descriptors I.2.2 [Artificial Intelligence]: Automatic Programming; H.2.3 [Database Management]: Languages General Terms Design, Languages Keywords Alloy, relational specification, program synthesis
Shriram Krishnamurthi, Kathi Fisler, Daniel J. Dou