Towards an Operational Semantics for Alloy
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.
KeywordsTransition System Relational Semantic Operational Semantic Relational Algebra Cache Line
Unable to display preview. Download preview PDF.
- 1.Jackson, D.: Software Abstractions. MIT Press, Cambridge (2006)Google Scholar
- 3.Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. Prentice Hall, Englewood Cliffs (1992)Google Scholar
- 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.Dougherty, D.J.: An improved algorithm for generating database transactions from relational algebra specifications. In: International Workshop on Rule-Based Programming (2009)Google Scholar
- 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
- 9.Plotkin, G.D.: LCF considered as a programming language. Theoretical Computer Science, 223–255 (1977)Google Scholar
- 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
- 13.The Coq development team: The Coq proof assistant reference manual. LogiCal Project, Version 8.0 (2004)Google Scholar
- 14.Green, C.C.: Application of theorem proving to problem solving. In: International Joint Conference on Artificial Intelligence (1969)Google Scholar
- 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.Rich, C., Waters, R.C.: Automatic programming: Myths and prospects. IEEE Computer 21(8), 40–51 (1988)Google Scholar