1 // sEXT2 - Simple File System Example
2 // Constraint Definition Language File
4 // Constraints 1-4 verify that the bitmaps and references to block's match up
5 // Constraints 5-6 verify that references counts and filesizes match up
6 // Constraints 7-13 are singleton tests
9 // for all used inodes, verify that the inodestatus (built from the
10 // inodebitmap is marked 'used'
11 //[forall u in UsedInode], u.inodestatus=literal(true);
14 // for all free inodes, verify that the inodestatus (built from the
15 // inodebitmap is marked 'free'
16 //[forall f in FreeInode], f.inodestatus=literal(false);
19 // for all used blocks, verify that the blockstatus (built from the
20 // blockbitmap is marked 'used'
21 //[forall u in UsedBlock], u.blockstatus=literal(true);
24 // for all free blocks, verify that the blockstatus (built from the
25 // block bitmap is marked 'free'
26 //[forall f in FreeBlock], f.blockstatus=literal(false);
29 // for all used inodes, verify that the reference count is equal to
30 // the number of directory entries (files/links) that refer to that
32 //[forall i in UsedInode], i.referencecount=sizeof(i.~inodeof);
35 // for all used inodes, verify that the filesize is consistent with
36 // the number of blocks used (those in i.contents)
37 //[forall i in UsedInode], i.filesize <= sizeof(i.contents)*literal(8192);
40 // ??? for all files and directory blocks check that
41 // only one inode references this block
42 //[forall b in FileDirectoryBlock],sizeof(b.~contents)=literal(1);
45 // verify that there is one superblock
46 //[],sizeof(SuperBlock)=literal(1);
49 // verify that there is one groupblock
50 //[],sizeof(GroupBlock)=literal(1);
53 // verify that there is one inodetableblock
54 //[],sizeof(InodeTableBlock)=literal(1);
57 // verify that there is one inodebitmapblock
58 [],sizeof(InodeBitmapBlock)=literal(1);
61 // verify that there is one blockbitmapblock
62 //[],sizeof(BlockBitmapBlock)=literal(1);
65 // verify that there is one rootdirectoryinode
66 //[],sizeof(RootDirectoryInode)=literal(1);