l7-8 - CS 290C Formal Models for Web Software Lectures 7...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 290C: Formal Models for Web Software Lectures 7 and 8: Alloy, Alloy Analyzer, Data Modeling and Analysis with Alloy Instructor: Tevfik Bultan
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alloy: A Modeling Language Alloy is a formal modeling language Alloy has formal syntax and semantics Alloy specifications are written in ASCII There is also a visual representation (similar to UML class diagrams and entity-relationship diagrams) but the visual representation does not have the expressiveness of the whole language Alloy has a constraint analyzer which can be used to automatically analyze properties of Alloy models
Background image of page 2
Alloy Alloy and Alloy Analyzer were developed by Daniel Jackson’s group at MIT References “Alloy: A Lightweight Object Modeling Notation” Daniel Jackson, ACM Transactions on Software Engineering and Methodology (TOSEM), Volume 11, Issue 2 (April 2002), pp. 256- 290. “Software Abstractions: Logic, Language and Analysis” by Daniel Jackson. MIT Press, 2006. Unfortunately, the TOSEM paper is based on the old syntax of Alloy The syntax of the Alloy language is different in the more recent versions of the tool Documentation about the current version of Alloy is available here: http://alloy.mit.edu/ My slides are based on the following tutorial http://alloy.mit.edu/alloy4/tutorial/
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
An Alloy Object Model for a Family Tree Married abstract Person Name Man Woman father mother wife ! ? name in husband ? ? ? siblings
Background image of page 4
Basics of Alloy Semantics Each box denotes a set of objects (atoms) Corresponds to an object class in UML/OCL In Alloy these are called signatures An object is an abstract, atomic and unchanging entity The state of the model is determined by the relationships among objects and the membership of objects in sets these can change in time
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Subclasses are subsets An arrow with unfilled head denotes a subset Man , Woman , Married are subsets of Person This corresponds to sub-classes in UML/OCL The key word extends indicates disjoint subsets This is the default, if a subset is not labeled it is assumed to extend Man and Woman are disjoint sets (their intersection is empty) There is no Person who is a Woman and a Man The keyword in indicates subsets, not necessarily disjoint from each other (or other subsets that extend) Married and Man are not disjoint Married and Woman are not disjoint
Background image of page 6
Signatures In Alloy sets of atoms such as Man , Woman , Married , Person are called signatures Signatures correspond to object classes A signature that is not subset of another signature is a top-level signature Top-level signatures are implicitly disjoint Person and Name are top-level signatures They represent disjoint sets of objects Extensions of a signature are also disjoint Man and Woman are disjoint sets An abstract signature has no elements except those belonging to its extensions There is no Person who is not a Man or a Woman
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/27/2011 for the course CMPSC 290h taught by Professor Chong during the Fall '09 term at UCSB.

Page1 / 70

l7-8 - CS 290C Formal Models for Web Software Lectures 7...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online