Everybody knows

This commit is contained in:
Artur Meski
2018-11-24 14:23:40 +00:00
parent 34f7b503c1
commit c72eb7ac4a
3 changed files with 29 additions and 0 deletions

20
mc.cc
View File

@@ -359,6 +359,14 @@ BDD ModelChecker::getStatesRSCTLK(const FormRSCTLK *form)
auto proc_id = srs->rs->getProcessID(form->getSingleAgent());
return *reach - (statesNK(*reach - getStatesRSCTLK(form->getLeftSF()), proc_id) * *reach);
}
else if (oper == RSCTLK_NE) {
auto proc_set = form->getAgentsAsProcSet(srs->rs);
return statesNE(getStatesRSCTLK(form->getLeftSF()) * *reach, proc_set) * *reach;
}
else if (oper == RSCTLK_UE) {
auto proc_set = form->getAgentsAsProcSet(srs->rs);
return *reach - (statesNE(*reach - getStatesRSCTLK(form->getLeftSF()), proc_set) * *reach);
}
else if (oper == RSCTLK_NC)
{
auto proc_set = form->getAgentsAsProcSet(srs->rs);
@@ -463,6 +471,18 @@ BDD ModelChecker::statesNK(const BDD &states, Process proc_id)
return x;
}
BDD ModelChecker::statesNE(const BDD &states, ProcSet processes)
{
BDD x = BDD_FALSE;
for (auto const &proc_id : processes)
{
x += states.ExistAbstract(getIthOnly(proc_id));
}
return x;
}
BDD ModelChecker::statesNC(const BDD &states, ProcSet processes)
{
BDD x = BDD_FALSE;