Alloy-new

Alloy-new - 272: Software Engineering Fall 2008 Instructor:...

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

View Full Document Right Arrow Icon
272: Software Engineering Fall 2008 Instructor: Tevfik Bultan Lectures 5, 6, and 7: Alloy and Alloy Analyzer
Background image of page 1

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

View Full DocumentRight Arrow Icon
Object Oriented Modeling with UML UML is an object oriented modeling language UML allows software developers to specify object oriented designs at a high level of abstraction UML models represent a higher level of abstraction compared to object oriented programs They can be used in documenting the software design before the software is implemented UML models do not have a formal semantics This is a major problem since software developers use UML models to document and communicate the design
Background image of page 2
Object Oriented Modeling with UML+OCL Object Constraint Language (OCL) allows software developers to make UML models more precise OCL expressions and constraints can be used to reduce the imprecision in UML designs One can augment a UML models with constraints written in OCL OCL constraints can be used to write contracts for UML classes Similar to design by contract assertions written as annotations for object oriented programs OCL expressions have formal syntax and semantics
Background image of page 3

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

View Full DocumentRight Arrow Icon
Object Oriented Modeling with Alloy Alloy is another object oriented modeling language Alloy has formal syntax and semantics Alloy specifications can be written in ASCII Alloy also has a visual language similar to UML class diagrams Alloy has a constraint analyzer which can be used to automatically analyze properties of Alloy models
Background image of page 4
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 5

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 6
Basics of Alloy Semantics Each box denotes a set of objects (atoms) Corresponds to a object class 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 7

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

View Full DocumentRight Arrow Icon
Visual Representation with Alloy An arrow with unfilled head denotes subset Man , Woman , Married are subsets of Person 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)
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 78

Alloy-new - 272: Software Engineering Fall 2008 Instructor:...

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

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