Support for NK

This commit is contained in:
Artur Meski
2018-04-21 22:26:42 +01:00
parent d2a9b5733c
commit 3157bb09ef
7 changed files with 46 additions and 8 deletions

14
mc.cc
View File

@@ -346,6 +346,10 @@ BDD ModelChecker::getStatesRSCTLK(const FormRSCTLK *form)
return !statesEGctx(form->getActionsBDD(),
!getStatesRSCTLK(form->getLeftSF()) * *reach) * *reach;
}
else if (oper == RSCTLK_NK) {
auto proc_id = srs->rs->getProcessID(form->getSingleAgent());
return statesNK(getStatesRSCTLK(form->getLeftSF()) * *reach, proc_id) * *reach;
}
assert(0); // Should never happen
return BDD_FALSE;
@@ -430,6 +434,16 @@ BDD ModelChecker::statesEFctx(const BDD *contexts, const BDD &states)
return x;
}
BDD ModelChecker::statesNK(const BDD &states, Process proc_id)
{
// bdd = new BDD((arg[0]->satStates(reach) * reach).ExistAbstract(bddOnlyIth(getAgent())) * reach);
BDD x = states;
x = x.ExistAbstract(getIthOnly(proc_id));
return x;
}
BDD ModelChecker::getIthOnly(Process proc_id)
{
/* if possible, we return the BDD from cache */