-
- static class IntegerLattice {
-
- boolean top;
- boolean isNum;
- int num;
-
- public static final IntegerLattice TOP = new IntegerLattice(true);
- public static final IntegerLattice BOT = new IntegerLattice(false);
-
- private IntegerLattice(boolean top) {
- this.top = top;
- isNum = false;
- }
-
- public IntegerLattice(int num) {
- isNum = true;
- this.num = num;
- }
-
- }
-
- public IntegerLattice setSize(SetDescriptor sd) {
- String setname = sd.getSymbol();
-
- if (setname.equals("Block")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("UsedBlock")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("FreeBlock")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("Inode")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("UsedInode")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("FileInode")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("DirectoryInode")) {
- return new IntegerLattice(1);
- } else if (setname.equals("RootDirectoryInode")) {
- return new IntegerLattice(1);
- } else if (setname.equals("SuperBlock")) {
- return new IntegerLattice(1);
- } else if (setname.equals("GroupBlock")) {
- return new IntegerLattice(1);
- } else if (setname.equals("FileDirectoryBlock")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("InodeTableBlock")) {
- return new IntegerLattice(1);
- } else if (setname.equals("InodeBitmapBlock")) {
- return new IntegerLattice(1);
- } else if (setname.equals("BlockBitmapBlock")) {
- return new IntegerLattice(1);
- } else if (setname.equals("DirectoryBlock")) {
- return new IntegerLattice(0);
- } else if (setname.equals("FileBlock")) {
- return IntegerLattice.TOP;
- } else if (setname.equals("DirectoryEntry")) {
- return IntegerLattice.TOP;
- } else {
- throw new IRException();
- }
-
- }
-