Home
Links

Alloy

FOO
Web site: Alloy-4

Example 1

This is from the website, a simple model of a file system:

module chapter4/filesystem ----- The model from page 125

abstract sig Object {}

sig Dir extends Object {contents: set Object}

one sig Root extends Dir { }

sig File extends Object {}

fact {
   Object in Root.*contents
   }

assert SomeDir {
   all o: Object - Root | some contents.o
   }
check SomeDir // This assertion is valid

assert RootTop {
   no o: Object | Root in o.contents
   }
check RootTop // This assertion should produce a counterexample

assert FileInDir {
   all f: File | some contents.f
   }
check FileInDir // This assertion is valid

Screen Shots

Edit window, to edit models, and the analysis output:

Screen Shot Alloy

Viewing a counter example:

Screen Shot Alloy

Topic attachments
I Attachment Action Size Date Who Comment
pngPNG sshot1.PNG manage 44.7 K 31 May 2007 - 11:54 WishnuPrasetya  
pngPNG sshot2.PNG manage 16.8 K 31 May 2007 - 11:55 WishnuPrasetya