Scalable formula
This commit is contained in:
@@ -34,17 +34,20 @@ context-automaton {{
|
||||
"""
|
||||
|
||||
PROPERTY_STR = """
|
||||
rsctlk-property { AG(proc0.in IMPLIES K[proc0](~proc1.in) ) }
|
||||
rsctlk-property {{ {:s} }}
|
||||
"""
|
||||
|
||||
|
||||
#################################################################
|
||||
|
||||
if len(argv) < 2:
|
||||
print("Usage: {:s} <number of modules>".format(argv[0]))
|
||||
print("Usage: {:s} <number of processes> <property number>".format(argv[0]))
|
||||
exit(100)
|
||||
|
||||
n = int(argv[1])
|
||||
f = int(argv[2])
|
||||
|
||||
assert n > 1, "number of proc must be > 1"
|
||||
|
||||
out = ""
|
||||
|
||||
@@ -70,9 +73,13 @@ for i in range(n):
|
||||
|
||||
out += CA_STR.format(transitions)
|
||||
|
||||
out += PROPERTY_STR
|
||||
if f == 1:
|
||||
subf = "~proc1.in"
|
||||
for i in range(2, n):
|
||||
subf += " AND ~proc{:d}.in".format(i)
|
||||
formula = "AG( proc0.in IMPLIES K[proc0]({:s}) )".format(subf)
|
||||
|
||||
out += PROPERTY_STR.format(formula)
|
||||
|
||||
print(out)
|
||||
|
||||
|
||||
|
||||
|
||||
6
symrs.cc
6
symrs.cc
@@ -596,7 +596,6 @@ BDD SymRS::encEnabledness(Process prod_proc_id, Entity entity_id)
|
||||
|
||||
auto production_conditions = prod_conds[prod_proc_id][entity_id];
|
||||
|
||||
|
||||
VERB_LN(5, "| Produce " << rs->getEntityName(entity_id) << " in " << rs->getProcessName(prod_proc_id) << ":");
|
||||
|
||||
for (const auto &cond : production_conditions) {
|
||||
@@ -639,6 +638,11 @@ BDD SymRS::encEnabledness(Process prod_proc_id, Entity entity_id)
|
||||
|
||||
} // END FOR: cond
|
||||
|
||||
if (opts->reorder_trans) {
|
||||
VERB_L2("Reordering");
|
||||
Cudd_ReduceHeap(cuddMgr->getManager(), CUDD_REORDER_SIFT, 10000);
|
||||
}
|
||||
|
||||
return enab;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user