Abstract
Alloy, like Z, is a language for modelling software systems. Indeed, it draws many of its good ideas from Z: in particular, representing all data structures with sets and relations, and representing behaviour and properties with simple formulas. Unlike Z, however, Alloy was designed with automatic analysis in mind. A constraint solver based on reduction to SAT can check properties of Alloy models, and simulate execution (even of implicit operations). The key idea is to consider all possible bindings of a formula that assign no more than some small number of atoms to each given type. The result is a flexible mechanism that provides rapid and concrete feedback during evolution of a model. It cannot prove properties, but by exhausting all small test cases, it usually succeeds in finding bugs rapidly.
In my talk, I’ll explain the fundamental ideas underlying Alloy and its analysis: its basis in relation rather than sets, and the compromises (notably a restriction to first order structures and formulas) that make analysis possible. I’ll compare Alloy’s specification-structuring mechanism, the signature, to Z’s schema. I’ll illustrate some modelling idioms that we have developed in using Alloy, focusing on how mutation is represented. I’ll also show some examples of typical analyses, including a trace-based analysis that employs the idea of ‘machine diameter’ from bounded model checking to ensure that all reachable states are considered.
More information about Alloy can be found at http://sdg.lcs.mit.edu/alloy.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Jackson, D. (2003). Alloy: A Logical Modelling Language. In: Bert, D., Bowen, J.P., King, S., Waldén, M. (eds) ZB 2003: Formal Specification and Development in Z and B. ZB 2003. Lecture Notes in Computer Science, vol 2651. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44880-2_1
Download citation
DOI: https://doi.org/10.1007/3-540-44880-2_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40253-4
Online ISBN: 978-3-540-44880-8
eBook Packages: Springer Book Archive