Skip to content

BMC: reconsider lasso-shaped encodings #1202

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* SystemVerilog: fix for |-> and |=> for empty matches
* LTL/SVA to Buechi with --buechi
* SMV: abs, bool, count, max, min, toint, word1
* BMC: new encoding for F, avoiding spurious traces

# EBMC 5.6

Expand Down
9 changes: 4 additions & 5 deletions regression/smv/CTL/smv_ctlspec_AFAG1.bmc.desc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
KNOWNBUG
smv_ltlspec_AFAG1.smv
--bound 3
^\[spec1\] AF AG !buechi_state: PROVED$
CORE
smv_ctlspec_AFAG1.smv
--bound 10
^\[spec1\] AF AG !buechi_state: PROVED up to bound 10$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
The BMC engine returns the wrong answer.
5 changes: 2 additions & 3 deletions regression/smv/LTL/smv_ltlspec_F4.desc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
KNOWNBUG
CORE
smv_ltlspec_F4.smv
--bound 3
--bound 2
^\[spec1\] F \(some_input <-> X some_input\): REFUTED$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
The BMC engine gives the wrong answer.
7 changes: 4 additions & 3 deletions regression/smv/LTL/smv_ltlspec_F6.desc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
KNOWNBUG
CORE
smv_ltlspec_F6.smv
--bound 3 --numbered-trace
--bound 1 --numbered-trace
^\[spec1\] F X some_input: REFUTED$
^some_input@0 = FALSE$
^some_input@1 = FALSE$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
The BMC engine gives the wrong answer.
7 changes: 3 additions & 4 deletions regression/smv/LTL/smv_ltlspec_FG1.bmc.desc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
KNOWNBUG
CORE
smv_ltlspec_FG1.smv
--bound 2
^\[spec1\] F G x!=1: PROVED$
--bound 10
^\[spec1\] F G x != 1: PROVED up to bound 10$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
The BMC engine returns the wrong answer.
4 changes: 4 additions & 0 deletions regression/smv/LTL/smv_ltlspec_FG1.smv
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ TRANS x=1 -> next(x)=2

TRANS x=2 -> next(x)=2

-- This should pass.
-- There are traces of two kinds:
-- 0, 0, 0, ...
-- 0, ..., 0, 1, 2, 2, ...
LTLSPEC F G x!=1
9 changes: 9 additions & 0 deletions regression/smv/LTL/smv_ltlspec_FX1.bdd.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
smv_ltlspec_FX1.smv
--bdd
^\[spec1\] F X X p: REFUTED$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/smv/LTL/smv_ltlspec_FX1.bmc.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
smv_ltlspec_FX1.smv
--bound 1
^\[spec1\] F X X p: REFUTED$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
7 changes: 7 additions & 0 deletions regression/smv/LTL/smv_ltlspec_FX1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MODULE main

VAR p : boolean;

-- This should fail for any bound >= 1.
-- The shortest lasso is FALSE, FALSE, ...
LTLSPEC F X X p
9 changes: 9 additions & 0 deletions regression/smv/LTL/smv_ltlspec_U3.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
smv_ltlspec_U3.smv
--bound 5
^\[.*\] TRUE U x -> F x: PROVED up to bound 5$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
6 changes: 6 additions & 0 deletions regression/smv/LTL/smv_ltlspec_U3.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MODULE main

VAR x : boolean;

-- should pass
LTLSPEC (TRUE U x) -> F x
1 change: 1 addition & 0 deletions regression/smv/LTL/smv_ltlspec_or1.desc
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ smv_ltlspec_or1.smv
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/smv/LTL/smv_ltlspec_or2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KNOWNBUG
smv_ltlspec_or2.smv
--bound 10
^\[spec1\] F z \| z V x: REFUTED$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
11 changes: 11 additions & 0 deletions regression/smv/LTL/smv_ltlspec_or2.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
MODULE main

VAR x : boolean;

VAR z : boolean;

ASSIGN init(z) := FALSE;
next(z) := FALSE;

-- should fail
LTLSPEC (F z) | (z V x)
13 changes: 11 additions & 2 deletions src/smvlang/smv_typecheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,10 +1959,19 @@ void smv_typecheckt::convert(smv_parse_treet::mc_varst &vars)
symbol.name=var.identifier;

symbol.value.make_nil();
symbol.is_input=true;
symbol.is_state_var=false;
symbol.type=var.type;

if(var.type.id() == "submodule")
{
symbol.is_input = false;
symbol.is_state_var = false;
}
else
{
symbol.is_input = true;
symbol.is_state_var = false;
}

symbol_table.add(symbol);
}
}
Expand Down
Loading