Beginning of support for tags
authorbdemsky <bdemsky>
Tue, 10 Apr 2007 10:39:15 +0000 (10:39 +0000)
committerbdemsky <bdemsky>
Tue, 10 Apr 2007 10:39:15 +0000 (10:39 +0000)
Tags will let us group objects together and specify these groups in the task declaration

14 files changed:
Robust/src/IR/Flat/FKind.java
Robust/src/IR/TagDescriptor.java [new file with mode: 0644]
Robust/src/IR/TagVarDescriptor.java [new file with mode: 0644]
Robust/src/IR/TaskDescriptor.java
Robust/src/IR/Tree/BuildIR.java
Robust/src/IR/Tree/FlagEffects.java
Robust/src/IR/Tree/Kind.java
Robust/src/IR/Tree/SemanticCheck.java
Robust/src/IR/Tree/TagDeclarationNode.java [new file with mode: 0644]
Robust/src/IR/Tree/TagEffect.java [new file with mode: 0644]
Robust/src/IR/Tree/TagExpressionList.java [new file with mode: 0644]
Robust/src/Parse/java14.cup
Robust/src/Runtime/DSTM/interface/Makefile
Robust/src/designnotes

index 264e571187d0c9397a1c444f19bacaac7687bc74..f89f114528f5ad4c13effce3c2e74da41ea164ca 100644 (file)
@@ -16,4 +16,5 @@ public class FKind {
     public static final int FlatFlagActionNode=13;
     public static final int FlatCheckNode=14;
     public static final int FlatBackEdge=15;    
+    public static final int FlatTagActionNode=16;
 }
diff --git a/Robust/src/IR/TagDescriptor.java b/Robust/src/IR/TagDescriptor.java
new file mode 100644 (file)
index 0000000..4faa30f
--- /dev/null
@@ -0,0 +1,29 @@
+package IR;
+
+/**
+ * Descriptor 
+ *
+ * represents a symbol in the language (var name, function name, etc).
+ */
+
+public class TagDescriptor extends Descriptor {
+
+    public TagDescriptor(String identifier) {
+       super(identifier);
+    }
+
+    public boolean equals(Object o) {
+       if (o instanceof TagDescriptor) {
+           TagDescriptor t=(TagDescriptor) o;
+           return getSymbol()==t.getSymbol();
+       } else return false;
+    }
+    
+    public int hashCode() {
+       return getSymbol().hashCode();
+    }
+
+    public String toString() {
+       return "Tag "+getSymbol();
+    }
+}
diff --git a/Robust/src/IR/TagVarDescriptor.java b/Robust/src/IR/TagVarDescriptor.java
new file mode 100644 (file)
index 0000000..5e4613a
--- /dev/null
@@ -0,0 +1,45 @@
+package IR;
+
+/**
+ * Descriptor 
+ *
+ * represents a symbol in the language (var name, function name, etc).
+ */
+
+public class TagVarDescriptor extends Descriptor {
+
+    protected TagDescriptor td;
+    protected String identifier;
+    
+    public TagVarDescriptor(TagDescriptor t, String identifier) {
+       super(identifier);
+       this.td=t;
+       this.identifier=identifier;
+        this.safename = "___" + name + "___";
+       this.uniqueid=count++;
+    }
+
+    public String getName() {
+       return identifier;
+    }
+
+    public TagDescriptor getTag() {
+       return td;
+    }
+
+    public boolean equals(Object o) {
+       if (o instanceof TagVarDescriptor) {
+           TagVarDescriptor tvd=(TagVarDescriptor)o;
+           return tvd.identifier.equals(identifier)&&tvd.td.equals(td);
+       }
+       return false;
+    }
+
+    public int hashCode() {
+       return identifier.hashCode()^td.hashcode();
+    }
+
+    public String toString() {
+           return td.toString()+" "+identifier;
+    }
+}
index 1ee16345128d38bb937051b7cf64b70dfe8d2a72..2e3d2deb84f99091885a6f75bad280d0644b9cb9 100644 (file)
@@ -1,5 +1,6 @@
 package IR;
 import IR.Tree.FlagExpressionNode;
+import IR.Tree.TagExpressionList;
 import IR.Tree.FlagEffects;
 import java.util.Vector;
 import java.util.Hashtable;
@@ -13,6 +14,7 @@ import IR.Tree.Modifiers;
 public class TaskDescriptor extends Descriptor {
 
     protected Hashtable flagstable;
+    protected Hashtable tagstable;
     protected Vector vfe;
     protected String identifier;
     protected Vector params;
@@ -23,6 +25,7 @@ public class TaskDescriptor extends Descriptor {
        this.identifier=identifier;
        this.uniqueid=count++;
        flagstable=new Hashtable();
+       tagstable=new Hashtable(); //BUGFIX - added initialization here
        params=new Vector();
        paramtable=new SymbolTable();
     }
@@ -39,12 +42,22 @@ public class TaskDescriptor extends Descriptor {
        return paramtable;
     }
 
-    public void addParameter(TypeDescriptor type, String paramname, FlagExpressionNode fen) {
+    public void addParameter(TypeDescriptor type, String paramname, FlagExpressionNode fen, TagExpressionList tel) {
        if (paramname.equals("this"))
            throw new Error("Can't have parameter named this");
        VarDescriptor vd=new VarDescriptor(type, paramname);
        params.add(vd);
        flagstable.put(vd, fen);
+       if (tel!=null) {//BUGFIX - added null check here...test with any bristlecone program
+           tagstable.put(vd, tel);
+           for(int i=0;i<tel.numTags();i++) {
+               TagVarDescriptor tvd=new TagVarDescriptor(new TagDescriptor(tel.getType(i)), tel.getName(i));
+               if (!(paramtable.getFromSameScope(tel.getName(i)) instanceof TagVarDescriptor))
+                   throw new Error("Parameter "+paramname+" already defined");
+               paramtable.add(tvd);
+           }
+       }
+
        if (paramtable.getFromSameScope(paramname)!=null) {
            throw new Error("Parameter "+paramname+" already defined");
        }
@@ -71,6 +84,10 @@ public class TaskDescriptor extends Descriptor {
        return (FlagExpressionNode) flagstable.get(vd);
     }
 
+    public TagExpressionList getTag(VarDescriptor vd) {
+       return (TagExpressionList) flagstable.get(vd);
+    }
+
     public String toString() {
        String st=identifier+"(";
        for(int i=0;i<params.size();i++) {
index f2525acd6afde350ffb2f5663b02ad8ce15dc78b..bfcf62a760e92896199b3c829a967e75a16b5028 100644 (file)
@@ -83,10 +83,27 @@ public class BuildIR {
        if (isNode(pn,"flag_effect")) {
            String flagname=pn.getChild("name").getTerminal();
            FlagEffects fe=new FlagEffects(flagname);
-           parseFlagEffect(fe, pn.getChild("flag_list"));
+           if (pn.getChild("flag_list")!=null)
+               parseFlagEffect(fe, pn.getChild("flag_list"));
+           if (pn.getChild("tag_list")!=null)
+               parseTagEffect(fe, pn.getChild("tag_list"));
            return fe;
        } else throw new Error();
     }
+    
+    public void parseTagEffect(FlagEffects fes, ParseNode pn) {
+       ParseNodeVector pnv=pn.getChildren();
+       for(int i=0;i<pnv.size();i++) {
+           ParseNode pn2=pnv.elementAt(i);
+           boolean status=true;
+           if (isNode(pn2,"not")) {
+               status=false;
+               pn2=pn2.getChild("name");
+           }
+           String name=pn2.getTerminal();
+           fes.addTagEffect(new TagEffect(name,status));
+       }
+    }
 
     public void parseFlagEffect(FlagEffects fes, ParseNode pn) {
        ParseNodeVector pnv=pn.getChildren();
@@ -158,18 +175,32 @@ public class BuildIR {
             ParseNode paramn=pnv.elementAt(i);
             TypeDescriptor type=parseTypeDescriptor(paramn);
 
-            ParseNode tmp=paramn;
-            while (tmp.getChild("single")==null) {
-                type=type.makeArray(state);
-                tmp=tmp.getChild("array");
-            }
-            String paramname=tmp.getChild("single").getTerminal();
+            String paramname=paramn.getChild("single").getTerminal();
             FlagExpressionNode fen=parseFlagExpression(paramn.getChild("flag").getFirstChild());
+
+            ParseNode tagnode=paramn.getChild("tag");
+
+            TagExpressionList tel=null;
+            if (tagnode!=null) {
+                tel=parseTagExpressionList(tagnode);
+            }
             
-            td.addParameter(type,paramname,fen);
+            td.addParameter(type,paramname,fen, tel);
         }
     }
 
+    public TagExpressionList parseTagExpressionList(ParseNode pn) {
+       ParseNodeVector pnv=pn.getChildren();
+       TagExpressionList tel=new TagExpressionList();
+       for(int i=0;i<pnv.size();i++) {
+           ParseNode tn=pnv.elementAt(i);
+           String type=tn.getChild("type").getTerminal();
+           String name=tn.getChild("single").getTerminal();
+           tel.addTag(type, name);
+       }
+       return tel;
+    }
+
     public ClassDescriptor parseTypeDecl(ParseNode pn) {
        ClassDescriptor cn=new ClassDescriptor(pn.getChild("name").getTerminal());
        if (!isEmpty(pn.getChild("super").getTerminal())) {
@@ -352,12 +383,17 @@ public class BuildIR {
            for(int i=0;i<args.size();i++) {
                con.addArgument((ExpressionNode)args.get(i));
            }
-           /* Could have flag set here */
-           if (pn.getChild("flag_list")!=null) {
+           /* Could have flag set or tag added here */
+           if (pn.getChild("flag_list")!=null||pn.getChild("tag_list")!=null) {
                FlagEffects fe=new FlagEffects(null);
-               parseFlagEffect(fe, pn.getChild("flag_list"));
+               if (pn.getChild("flag_list")!=null)
+                   parseFlagEffect(fe, pn.getChild("flag_list"));
+
+               if (pn.getChild("tag_list")!=null)
+                   parseTagEffect(fe, pn.getChild("tag_list"));
                con.addFlagEffects(fe);
            }
+           
            return con;
        } else if (isNode(pn,"createarray")) {
            //System.out.println(pn.PPrint(3,true));
@@ -519,7 +555,12 @@ public class BuildIR {
 
     public Vector parseBlockStatement(ParseNode pn) {
        Vector blockstatements=new Vector();
-       if (isNode(pn,"local_variable_declaration")) {
+       if (isNode(pn,"tag_declaration")) {
+           String name=pn.getChild("single").getTerminal();
+           String type=pn.getChild("type").getTerminal();
+           
+           blockstatements.add(new TagDeclarationNode(name, type));
+       } else if (isNode(pn,"local_variable_declaration")) {
            TypeDescriptor t=parseTypeDescriptor(pn);
            ParseNode vn=pn.getChild("variable_declarators_list");
            ParseNodeVector pnv=vn.getChildren();
index 443840859f69b78928e7d887a5dc8e3521fad279..6167af85c295d7da08618490fc5f7c03f2d49e62 100644 (file)
@@ -5,11 +5,13 @@ import java.util.*;
 
 public class FlagEffects {
     Vector effects;
+    Vector tageffects;
     String name;
     VarDescriptor vd;
 
     public FlagEffects(String name) {
        effects=new Vector();
+       tageffects=new Vector();
        this.name=name;
     }
 
@@ -29,6 +31,18 @@ public class FlagEffects {
        effects.add(fe);
     }
 
+    public void addTagEffect(TagEffect te) {
+       tageffects.add(te);
+    }
+
+    public int numTagEffects() {
+       return tageffects.size();
+    }
+
+    public TagEffect getTagEffect(int i) {
+       return (TagEffect) tageffects.get(i);
+    }
+
     public int numEffects() {
        return effects.size();
     }
index b74a5d7dc2585eafc9f8feeb4449ede47627dfae..930317f5a3bdb967a650119ca00aa7ac66665526 100644 (file)
@@ -20,4 +20,5 @@ public class Kind {
     public final static int FlagNode=17;
     public final static int FlagOpNode=18;
     public final static int TaskExitNode=19;
+    public final static int TagDeclarationNode=20;
 }
index e8fb8899499697ba7e0b6f8f3f12e3ec87da5229..ef955103f490954e18a2f071b9ac98cd404c45a5 100644 (file)
@@ -91,7 +91,7 @@ public class SemanticCheck {
        }
     }
 
-    public void checkFlagEffects(TaskDescriptor td, Vector vfe) {
+    public void checkFlagEffects(TaskDescriptor td, Vector vfe, SymbolTable nametable) {
        if (vfe==null)
            return; /* No flag effects to check */
        for(int i=0;i<vfe.size();i++) {
@@ -120,6 +120,17 @@ public class SemanticCheck {
                    throw new Error("Attempting to modify external flag: "+name);
                flag.setFlag(flag_d);
            }
+           for(int j=0;j<fe.numTagEffects();j++) {
+               TagEffect tag=fe.getTagEffect(j);
+               String name=tag.getName();
+               
+               Descriptor d=(Descriptor)nametable.get(name);
+               if (d==null)
+                   throw new Error("Tag descriptor "+name+" undeclared");
+               else if (!(d instanceof TagVarDescriptor))
+                   throw new Error(name+" is not a tag descriptor");
+               tag.setTag((TagVarDescriptor)d);
+           }
        }
     }
 
@@ -137,7 +148,7 @@ public class SemanticCheck {
            checkFlagExpressionNode(cd, fen);
        }
 
-       checkFlagEffects(td, td.getFlagEffects());
+       checkFlagEffects(td, td.getFlagEffects(),td.getParameterTable());
        /* Check that the task code is valid */
        BlockNode bn=state.getMethodBody(td);
        checkBlockNode(td, td.getParameterTable(),bn);
@@ -212,6 +223,10 @@ public class SemanticCheck {
        case Kind.DeclarationNode:
            checkDeclarationNode(md, nametable, (DeclarationNode)bsn);
            return;
+
+       case Kind.TagDeclarationNode:
+           checkTagDeclarationNode(md, nametable, (TagDeclarationNode)bsn);
+           return;
            
        case Kind.IfStatementNode:
            checkIfStatementNode(md, nametable, (IfStatementNode)bsn);
@@ -252,6 +267,16 @@ public class SemanticCheck {
        if (dn.getExpression()!=null)
            checkExpressionNode(md, nametable, dn.getExpression(), vd.getType());
     }
+
+    void checkTagDeclarationNode(Descriptor md, SymbolTable nametable,  TagDeclarationNode dn) {
+       TagVarDescriptor vd=dn.getTagVarDescriptor();
+       Descriptor d=nametable.get(vd.getSymbol());
+       if ((d==null)||
+           (d instanceof FieldDescriptor)) {
+           nametable.add(vd);
+       } else
+           throw new Error(vd.getSymbol()+" defined a second time");
+    }
     
     void checkSubBlockNode(Descriptor md, SymbolTable nametable, SubBlockNode sbn) {
        checkBlockNode(md, nametable, sbn.getBlockNode());
@@ -276,7 +301,7 @@ public class SemanticCheck {
     void checkTaskExitNode(Descriptor md, SymbolTable nametable, TaskExitNode ten) {
        if (md instanceof MethodDescriptor)
            throw new Error("Illegal taskexit appears in Method: "+md.getSymbol());
-       checkFlagEffects((TaskDescriptor)md, ten.getFlagEffects());
+       checkFlagEffects((TaskDescriptor)md, ten.getFlagEffects(),nametable);
        checkConstraintCheck((TaskDescriptor) md, nametable, ten.getChecks());
     }
 
@@ -431,7 +456,7 @@ public class SemanticCheck {
            } else if (d instanceof FieldDescriptor) {
                nn.setField((FieldDescriptor)d);
                nn.setVar((VarDescriptor)nametable.get("this")); /* Need a pointer to this */
-           }
+           } else throw new Error("Wrong type of descriptor");
            if (td!=null)
                if (!typeutil.isSuperorType(td,nn.getType()))
                    throw new Error("Field node returns "+nn.getType()+", but need "+td);
@@ -518,6 +543,17 @@ public class SemanticCheck {
                    throw new Error("Attempting to modify external flag: "+name);
                flag.setFlag(flag_d);
            }
+           for(int j=0;j<fe.numTagEffects();j++) {
+               TagEffect tag=fe.getTagEffect(j);
+               String name=tag.getName();
+               
+               Descriptor d=(Descriptor)nametable.get(name);
+               if (d==null)
+                   throw new Error("Tag descriptor "+name+" undeclared");
+               else if (!(d instanceof TagVarDescriptor))
+                   throw new Error(name+" is not a tag descriptor");
+               tag.setTag((TagVarDescriptor)d);
+           }
        }
 
 
diff --git a/Robust/src/IR/Tree/TagDeclarationNode.java b/Robust/src/IR/Tree/TagDeclarationNode.java
new file mode 100644 (file)
index 0000000..2820e5d
--- /dev/null
@@ -0,0 +1,35 @@
+package IR.Tree;
+import IR.TagVarDescriptor;
+import IR.TagDescriptor;
+
+public class TagDeclarationNode extends BlockStatementNode {
+    String name;
+    String type;
+    TagVarDescriptor tvd;
+
+    public TagDeclarationNode(String name, String type) {
+       this.name=name;
+       this.type=type;
+       tvd=new TagVarDescriptor(new TagDescriptor(type), name);
+    }
+    
+    public String printNode(int indent) {
+       return "Tag "+name+"=new("+type+")";
+    }
+    
+    public TagVarDescriptor getTagVarDescriptor() {
+       return tvd;
+    }
+
+    public String getName() {
+       return name;
+    }
+
+    public String getType() {
+       return type;
+    }
+
+    public int kind() {
+       return Kind.TagDeclarationNode;
+    }
+}
diff --git a/Robust/src/IR/Tree/TagEffect.java b/Robust/src/IR/Tree/TagEffect.java
new file mode 100644 (file)
index 0000000..3996ae7
--- /dev/null
@@ -0,0 +1,37 @@
+package IR.Tree;
+
+import IR.*;
+
+public class TagEffect {
+    TagVarDescriptor tag;
+    boolean status;
+    String name;
+
+    public TagEffect(String tag, boolean status) {
+       this.name=tag;
+       this.status=status;
+    }
+
+    public void setTag(TagVarDescriptor tag) {
+       this.tag=tag;
+    }
+
+    public TagVarDescriptor getTag() {
+       return tag;
+    }
+
+    public String getName() {
+       return name;
+    }
+
+    public boolean getStatus() {
+       return status;
+    }
+
+    public String printNode(int indent) {
+       if (status)
+           return name;
+       else
+           return "!"+name;
+    }
+}
diff --git a/Robust/src/IR/Tree/TagExpressionList.java b/Robust/src/IR/Tree/TagExpressionList.java
new file mode 100644 (file)
index 0000000..44c0311
--- /dev/null
@@ -0,0 +1,29 @@
+package IR.Tree;
+import java.util.Vector;
+
+public class TagExpressionList {
+    Vector names;
+    Vector types;
+
+    public TagExpressionList() {
+       names=new Vector();
+       types=new Vector();
+    }
+    
+    public void addTag(String type, String name) {
+       types.add(type);
+       names.add(name);
+    }
+
+    public int numTags() {
+       return names.size();
+    }
+
+    public String getName(int i) {
+       return (String) names.get(i);
+    }
+
+    public String getType(int i) {
+       return (String) types.get(i);
+    }
+}
index 6d20085555d858de7a482553b82f7d940e987bb3..5e457d583ff6d18b4ad175354f7a8645202b2718 100644 (file)
@@ -244,6 +244,13 @@ non terminal ParseNode cons_checks_opt;
 non terminal ParseNode cons_checks;
 non terminal ParseNode cons_check;
 
+non terminal ParseNode tag_variable_declaration_statement;
+non terminal ParseNode tag_expression_list;
+non terminal ParseNode tag_expression;
+non terminal ParseNode tag_list;
+non terminal ParseNode tag_list_opt;
+non terminal ParseNode tag_change;
+
 start with goal;
 
 
@@ -280,9 +287,58 @@ task_parameter ::=
                pn.addChild(name);
                pn.addChild("flag").addChild(exp);
                RESULT=pn;
+       :} 
+        | type:type variable_declarator_id:name LBRACE flag_expression:exp RBRACE LBRACE tag_expression_list:texp RBRACE {:
+               ParseNode pn=new ParseNode("task_parameter");
+               pn.addChild(type);
+               pn.addChild(name);
+               pn.addChild("flag").addChild(exp);
+               pn.addChild("tag").addChild(texp);
+               RESULT=pn;
+       :}
+       ;
+
+tag_expression_list ::= tag_expression:te {: 
+       ParseNode pn=new ParseNode("tag_expression_list");
+       pn.addChild(te);
+       RESULT=pn;
+       :}
+       | tag_expression_list:tel COMMA tag_expression:te {: 
+       tel.addChild(te);
+       RESULT=tel;
+       :}
+       ;
+
+tag_expression ::= IDENTIFIER:type IDENTIFIER:id {: 
+               ParseNode pn=new ParseNode("tag_expression");
+               pn.addChild("type").addChild(type);
+               pn.addChild("single").addChild(id);
+               RESULT=pn;
        :}
        ;
 
+tag_list_opt ::= LBRACE tag_list:fl RBRACE {:RESULT=fl;:}
+       | LBRACE RBRACE {: RESULT = new ParseNode("empty"); :}  
+       | {: RESULT = new ParseNode("empty"); :}
+       ;
+
+tag_list ::= tag_change:fc {: 
+               ParseNode pn=new ParseNode("tag_list");
+               pn.addChild(fc);
+               RESULT=pn;
+       :}
+       | tag_list:fl COMMA tag_change:fc {: 
+               fl.addChild(fc);
+               RESULT=fl;
+       :};
+
+tag_change ::= IDENTIFIER:id {: 
+               RESULT=new ParseNode("name").addChild(id).getRoot();
+       :}
+       | NOT IDENTIFIER:id {: 
+               RESULT=new ParseNode("not").addChild("name").addChild(id).getRoot();
+       :};
+
 flag_expression ::= 
        flag_andexpression:exp {: 
                RESULT=exp;
@@ -360,10 +416,17 @@ flag_effects ::= flag_effect:fe {:
                RESULT=fes;
        :};
 
-flag_effect ::= IDENTIFIER:id LBRACE flag_list:fl RBRACE {: 
+flag_effect ::= IDENTIFIER:id LBRACE flag_list:fl RBRACE tag_list_opt:tlo {: 
                ParseNode pn=new ParseNode("flag_effect");
                pn.addChild("name").addChild(id);
                pn.addChild(fl);
+               pn.addChild(tlo);
+               RESULT=pn;
+       :}
+       | IDENTIFIER:id LBRACE RBRACE LBRACE tag_list:tl RBRACE {: 
+               ParseNode pn=new ParseNode("flag_effect");
+               pn.addChild("name").addChild(id);
+               pn.addChild(tl);
                RESULT=pn;
        :};
 
@@ -967,7 +1030,10 @@ block_statements ::=
        :}
        ;
 block_statement ::=
-               local_variable_declaration_statement:lvds {: 
+       tag_variable_declaration_statement:tvds {:
+               RESULT=tvds;
+       :}              
+       |       local_variable_declaration_statement:lvds {: 
                RESULT=lvds;
        :}
        |       statement:statement {: 
@@ -976,6 +1042,14 @@ block_statement ::=
 //     |       class_declaration
 //     |       interface_declaration
        ;
+tag_variable_declaration_statement ::=
+               TAG IDENTIFIER:id EQ NEW TAG LPAREN IDENTIFIER:type RPAREN SEMICOLON {: 
+               ParseNode pn=new ParseNode("tag_declaration");
+               pn.addChild("single").addChild(id);
+               pn.addChild("type").addChild(type);
+               RESULT=pn;
+       :}
+       ;
 local_variable_declaration_statement ::=
                local_variable_declaration:lvd SEMICOLON {: 
                RESULT=lvd;
@@ -1245,6 +1319,22 @@ class_instance_creation_expression ::=
                pn.addChild(feo);
                RESULT=pn;
        :}
+       | NEW class_or_interface_type:type LPAREN argument_list_opt:args RPAREN LBRACE RBRACE LBRACE tag_list:tl RBRACE {: 
+               ParseNode pn=new ParseNode("createobject");
+               pn.addChild(type);
+               pn.addChild(args);
+               pn.addChild(tl);
+               RESULT=pn;
+       :}
+       | NEW class_or_interface_type:type LPAREN argument_list_opt:args RPAREN LBRACE flag_list:fl RBRACE LBRACE tag_list:tl RBRACE {: 
+               ParseNode pn=new ParseNode("createobject");
+               pn.addChild(type);
+               pn.addChild(args);
+               pn.addChild(fl);
+               pn.addChild(tl);
+               RESULT=pn;
+       :}
+
 //     |       NEW class_or_interface_type LPAREN argument_list_opt RPAREN class_body
 //     |       primary DOT NEW IDENTIFIER
 //                     LPAREN argument_list_opt RPAREN {: 
index 19709dccdbc4d1147411b761089d00e191c0a962..e4d3a34fbebf3fa0efdbd34e630eee3413242fb7 100644 (file)
@@ -1,8 +1,8 @@
 client:
-       gcc -g -o client trans.c testclient.c mlookup.c clookup.c llookup.c dstm.c objstr.c dstmserver.c plookup.c
+       gcc -g -O0 -o client trans.c testclient.c mlookup.c clookup.c llookup.c dstm.c objstr.c dstmserver.c plookup.c
 
 server:
-       gcc -g -o server dstmserver.c testserver.c plookup.c mlookup.c clookup.c llookup.c dstm.c objstr.c trans.c 
+       gcc -g -O0 -o server dstmserver.c testserver.c plookup.c mlookup.c clookup.c llookup.c dstm.c objstr.c trans.c 
 
 clean:
        rm client server
index f0d2b3b389f650b6d564a966d0b793925aa80913..404809f210adf44993e87cc5a05f6975565aa8a1 100644 (file)
@@ -14,6 +14,26 @@ Non parameter variables:
 1) Type must contain flags
 2) Apply flag additions to all states
 
+Tags operations:
+create_tag operation(type)
+
+tag name=new tag(type);
+
+associate_with_tag operation(object, tag)
+
+Dispatch:
+after flag status, allow tag status...
+each tag state is of the form: Type(name)
+
+Other approach:
+Tag sets:  {x, y, z, ... in R
+
+Allow additions/removals of tuples in taskexit:
+remove <x, y, z, ...> from R
+add <x, y> to R
+
+Allow addition of new tuples in object allocation
+add <new, y> to R
 ------------------------------------------------------------------------------