output.println("if (doanalysis"+specname+"("+varname+")) {");
output.println("free"+specname+"_state("+varname+");");
output.println("} else {");
+ output.println("/* Bad invariant */");
output.println("free"+specname+"_state("+varname+");");
+ output.println("abort_task();");
output.println("}");
output.println("}");
for(int i=0;i<anv.size();i++) {
ParseNode cpn=anv.elementAt(i);
ParseNode var=cpn.getChild("var");
- ParseNode exp=cpn.getChild("exp");
+ ParseNode exp=cpn.getChild("exp").getFirstChild();
varlist.add(var.getTerminal());
arglist.add(parseExpression(exp));
}
}
public String getVar(int i) {
- return (String) args.get(i);
+ return (String) vars.get(i);
}
public String printNode(int indent) {
;
cons_argument_list_opt ::=
{: RESULT=new ParseNode("empty"); :}
- | argument_list:args {: RESULT=args; :}
+ | cons_argument_list:args {: RESULT=args; :}
;
cons_argument_list ::=
#include "SimpleHash.h"
#include "GenericHashtable.h"
#ifdef CONSCHECK
-#include "initialize.h"
+#include "instrument.h"
#endif
struct Queue * activetasks;
longjmp(error_handler,3);
#endif
}
+
+void abort_task() {
+#ifndef TASK
+ printf("Aborting\n");
+ exit(-1);
+#else
+ longjmp(error_handler,4);
+#endif
+}
void failedboundschk();
void failednullptr();
+void abort_task();
#ifdef TASK
#include "SimpleHash.h"
#build and link everything
-cd $CURDIR gcc -I$ROBUSTROOT/Runtime -I. -I$BUILDDIR/specdir \
+cd $CURDIR
+gcc -I$ROBUSTROOT/Runtime -I. -I$BUILDDIR/specdir \
-IRuntime/include -I$BUILDDIR -O0 -DBOEHM_GC -DCONSCHECK \
-LRuntime/lib/ -lgc -DTASK -g tmpbuilddirectory/methods.c \
tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/runtime.c \