- Method ME = NULL;
- MethodSet set = NewSet;
- ForEach (m, Subset(set, "Store")) {
- IntList *l = Local(m, list);
- int ret = Value(m, Load, RET);
- string name = Label(m);
- }
- ForEach (m, Prev(ME)) {
-
- }
-
- int size = Size(PREV);
- bool flag = Belong(CONCURRENT, ME);
- flag = Belong(MakeSet(3, ME, ME, ME), ME);
+ set<int> *is1 = new set<int>;
+ set<int> *is2 = new set<int>;
+
+ list<int> *il1 = new list<int>;
+ list<int> *il2 = new list<int>;
+
+ il1->push_back(2);
+ il1->push_back(3);
+
+ is1->insert(1);
+ is1->insert(3);
+
+ is2->insert(4);
+ is2->insert(5);
+
+
+ MethodSet ms = NewSet;
+ Method m = new MethodCall;
+ m->interfaceName = "Store";
+ StateStruct *ss = new StateStruct;
+ ss->x = 1;
+ m->localState = ss;
+ Store *st = new Store;
+ st->val = 2;
+ m->value = st;
+ ms->insert(m);
+
+ m = new MethodCall;
+ m->interfaceName= "Store";
+ ss = new StateStruct;
+ ss->x = 2;
+ m->localState = ss;
+ st = new Store;
+ st->val = 0;
+ m->value = st;
+ ms->insert(m);
+
+ m = new MethodCall;
+ m->interfaceName= "Load";
+ ss = new StateStruct;
+ ss->x = 0;
+ m->localState = ss;
+ Load *ld = new Load;
+ ld->RET = 2;
+ m->value = ld;
+ ms->insert(m);
+
+ //Subset(ms, sub, NAME == "Store" && VALUE(Store, val) != 0);
+ Subset(ms, sub, NAME == "Store" && VALUE(Store, val) >= 0 && LOCAL(x) == 0);
+
+ cout << "Size=" << Size(sub) << endl;