Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMC now splits up top-level conjunction #453

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions regression/ebmc/smv/module1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
module1.smv
--bound 10
^EXIT=0$
^SIGNAL=0$
^\[main::spec1\] AG subA.flag & AG subB.flag: PROVED up to bound 10$
--
^warning: ignoring
13 changes: 13 additions & 0 deletions regression/ebmc/smv/module1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
MODULE main

VAR subA : my-module;
subB : my-module;

SPEC AG subA.flag & AG subB.flag

MODULE my-module

VAR flag : boolean;

ASSIGN init(flag) := 1;
ASSIGN next(flag) := 1;
14 changes: 14 additions & 0 deletions src/trans-word-level/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ bool bmc_supports_property(const exprt &expr)
{
if(!has_temporal_operator(expr))
return true; // initial state only
else if(
expr.id() == ID_and || expr.id() == ID_or || expr.id() == ID_implies)
{
for(auto &op : expr.operands())
if(!bmc_supports_property(op))
return false;
return true;
}
else
return false;
}
Expand Down Expand Up @@ -188,6 +196,12 @@ static void property_obligations_rec(
property_obligations_rec(phi, solver, c, no_timeframes, ns, obligations);
}
}
else if(property_expr.id() == ID_and)
{
for(auto &op : to_and_expr(property_expr).operands())
property_obligations_rec(
op, solver, current, no_timeframes, ns, obligations);
}
else
{
// current state property
Expand Down