World Library  
Flag as Inappropriate
Email this Article

Alloy (specification Language)

Article Id: WHEBN0011268035
Reproduction Date:

Title: Alloy (specification Language)  
Author: World Heritage Encyclopedia
Language: English
Subject: Specification language
Publisher: World Heritage Encyclopedia

Alloy (specification Language)

In computer science and software engineering, Alloy is a declarative specification language for expressing complex structural constraints and behavior in a software system. Alloy provides a simple structural modeling tool based on first-order logic. The mathematical underpinnings of the language were heavily influenced by the Z notation, although the syntax of Alloy owes more to languages such as Object Constraint Language.[1] Alloy is targeted at the creation of micro-models that can then be automatically checked for correctness. Alloy specifications can be checked using the Alloy Analyzer.

The first version of the Alloy language appeared in 1997. It was a rather limited object modeling language. Succeeding iterations of the language "added quantifiers, higher arity relations, polymorphism, subtyping, and signatures".[2] Although Alloy is designed with automatic analysis in mind, Alloy differs from many specification languages designed for model-checking in that it permits the definition of infinite models. The Alloy Analyzer is designed to perform finite scope checks even on infinite models.

Model structure

Alloy models are relational in nature, and are composed of several different kinds of statements:[1]

  • Signatures define the vocabulary of a model by creating new sets
sig Object{} defines a signature Object
sig List{ head : lone Node } defines a signature List that contains a field head of type Node and multiplicity lone - this establishes the existence of a relation between Lists and Nodes such that every List is associated with no more than one head Node
  • Facts are constraints that are assumed to always hold
  • Predicates are parameterized constraints, and can be used to represent operations
  • Functions are expressions that return results
  • Assertions are assumptions about the model that can be checked using the Alloy Analyzer

Because Alloy is a declarative language the meaning of a model is unaffected by the order of statements.


  1. ^ a b  
  2. ^ "Alloy FAQ". Archived from the original on 7 June 2007. Retrieved 2013-03-07. 

External links

  • Alloy website
  • Guide to Alloy

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.