Towards an Operational Semantics for Alloy

  • Theophilos Giannakopoulos
  • Daniel J. Dougherty
  • Kathi Fisler
  • Shriram Krishnamurthi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5850)


The Alloy modeling language has a mathematically rigorous denotational semantics based on relational algebra. Alloy specifications often represent operations on a state, suggesting a transition-system semantics. Because Alloy does not intrinsically provide a notion of state, however, this interpretation is only implicit in the relational-algebra semantics underlying the Alloy Analyzer.

In this paper we demonstrate the subtlety of representing state in Alloy specifications. We formalize a natural notion of transition semantics for state-based specifications and show examples of specifications in this class for which analysis based on relational algebra can induce false confidence in designs. We characterize the class of facts that guarantees that Alloy’s analysis is sound for state-transition systems, and offer a sufficient syntactic condition for membership in this class. We offer some practical evaluation of the utility of this syntactic discipline and show how it provides a foundation for program synthesis from Alloy.


Transition System Relational Semantic Operational Semantic Relational Algebra Cache Line 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Jackson, D.: Software Abstractions. MIT Press, Cambridge (2006)Google Scholar
  2. 2.
    Abrial, J.R.: The B-Book: Assigning Programs to Meanings. Cambridge University Press, Cambridge (1996)zbMATHGoogle Scholar
  3. 3.
    Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. Prentice Hall, Englewood Cliffs (1992)Google Scholar
  4. 4.
    Krishnamurthi, S., Dougherty, D.J., Fisler, K., Yoo, D.: Alchemy: Transmuting base alloy specifications into implementations. In: ACM SIGSOFT International Symposium on the Foundations of Software Engineering (2008)Google Scholar
  5. 5.
    Dougherty, D.J.: An improved algorithm for generating database transactions from relational algebra specifications. In: International Workshop on Rule-Based Programming (2009)Google Scholar
  6. 6.
    Jackson, D.: Alloy: a lightweight object modelling notation. ACM Transactions on Software Engineering and Methodology 11(2), 256–290 (2002)CrossRefGoogle Scholar
  7. 7.
    Edwards, J., Jackson, D., Torlak, E.: A type system for object models. In: ACM SIGSOFT International Symposium on the Foundations of Software Engineering (2004)Google Scholar
  8. 8.
    Krishnamurthi, S., Hopkins, P.W., McCarthy, J.A., Graunke, P.T., Pettyjohn, G., Felleisen, M.: Implementation and use of the PLT Scheme web server. Higher-Order and Symbolic Computation 20(4), 431–460 (2007)zbMATHCrossRefGoogle Scholar
  9. 9.
    Plotkin, G.D.: LCF considered as a programming language. Theoretical Computer Science, 223–255 (1977)Google Scholar
  10. 10.
    Frias, M.F., López Pombo, C.G., Galeotti, J.P., Aguirre, N.M.: Efficient analysis of DynAlloy specifications. ACM Transactions on Software Engineering and Methodology 17(1) (December 2007)Google Scholar
  11. 11.
    Massoni, T., Gheyi, R., Borba, P.: A framework for establishing formal conformance between object models and object-oriented programs. Electronic Notes in Theoretical Computer Science 195, 189–209 (2008)CrossRefGoogle Scholar
  12. 12.
    Bates, J.L., Constable, R.L.: Proofs as programs. ACM Transactions on Programming Languages and Systems 7(1), 113–136 (1985)zbMATHCrossRefGoogle Scholar
  13. 13.
    The Coq development team: The Coq proof assistant reference manual. LogiCal Project, Version 8.0 (2004)Google Scholar
  14. 14.
    Green, C.C.: Application of theorem proving to problem solving. In: International Joint Conference on Artificial Intelligence (1969)Google Scholar
  15. 15.
    Waldinger, R.J., Lee, R.C.T.: PROW: A step toward automatic program writing. In: International Joint Conference on Artificial Intelligence (1969)Google Scholar
  16. 16.
    Rich, C., Waters, R.C.: Automatic programming: Myths and prospects. IEEE Computer 21(8), 40–51 (1988)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Theophilos Giannakopoulos
    • 1
  • Daniel J. Dougherty
    • 1
  • Kathi Fisler
    • 1
  • Shriram Krishnamurthi
    • 2
  1. 1.Department of Computer ScienceWPI 
  2. 2.Computer Science DepartmentBrown University 

Personalised recommendations