Skip to content

Commit 40f22fe

Browse files
committed
SVA/LTL property instrumentation
1 parent 0ec55ad commit 40f22fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1325
-3
lines changed

Diff for: CHANGELOG

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* SMV: LTL V operator, xnor operator
1111
* SMV: word types and operators
1212
* --smv-word-level outputs the model as word-level SMV
13+
* word-level BMC: LTL/SVA to Buechi with --buechi
1314

1415
# EBMC 5.5
1516

Diff for: regression/ebmc/Buechi/FGp1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
FGp1.smv
3+
--buechi --bound 2
4+
^\[.*\] F G p: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/FGp1.smv

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
-- should pass
9+
LTLSPEC F G p

Diff for: regression/ebmc/Buechi/Fp1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
Fp1.smv
3+
--buechi --bound 2
4+
^\[.*\] F p: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/Fp1.smv

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
-- should pass
9+
LTLSPEC F p

Diff for: regression/ebmc/Buechi/GFp1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
GFp1.smv
3+
--buechi --bound 2
4+
^\[.*\] G F p: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/GFp1.smv

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := !p;
7+
8+
-- should pass
9+
LTLSPEC G F p

Diff for: regression/ebmc/Buechi/Gp1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
Gp1.smv
3+
--buechi --bound 2
4+
^\[.*\] G p: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/Gp1.smv

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := TRUE;
6+
next(p) := TRUE;
7+
8+
-- should pass
9+
LTLSPEC G p

Diff for: regression/ebmc/Buechi/Xp1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
Xp1.smv
3+
--buechi --bound 2
4+
^\[.*\] X p: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/Xp1.smv

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
-- should pass
9+
LTLSPEC X p

Diff for: regression/ebmc/Buechi/and1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
and1.smv
3+
--buechi --bound 2
4+
^\[.*\] X p & X q: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/and1.smv

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := FALSE;
11+
next(q) := TRUE;
12+
13+
-- should pass
14+
LTLSPEC X p & X q
15+

Diff for: regression/ebmc/Buechi/and2.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
and2.smv
3+
--buechi --bound 2
4+
^\[.*\] X \(p & q\): PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/and2.smv

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := FALSE;
11+
next(q) := TRUE;
12+
13+
-- should pass
14+
LTLSPEC X (p & q)
15+

Diff for: regression/ebmc/Buechi/iff1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
iff1.smv
3+
--buechi --bound 2
4+
^\[.*\] X p <-> X q: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/iff1.smv

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := TRUE;
6+
next(p) := FALSE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := TRUE;
11+
next(q) := FALSE;
12+
13+
-- should pass
14+
LTLSPEC X p <-> X q

Diff for: regression/ebmc/Buechi/iff2.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
iff2.smv
3+
--buechi --bound 2
4+
^\[.*\] X \(p <-> q\): PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/iff2.smv

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := TRUE;
6+
next(p) := FALSE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := TRUE;
11+
next(q) := FALSE;
12+
13+
-- should pass
14+
LTLSPEC X (p <-> q)

Diff for: regression/ebmc/Buechi/implies1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
implies1.smv
3+
--buechi --bound 2
4+
^\[.*\] X p -> X q: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/implies1.smv

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := TRUE;
6+
next(p) := FALSE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := TRUE;
11+
next(q) := FALSE;
12+
13+
-- should pass
14+
LTLSPEC X p -> X q

Diff for: regression/ebmc/Buechi/implies2.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
implies2.smv
3+
--buechi --bound 2
4+
^\[.*\] X \(p -> q\): PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/implies2.smv

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := TRUE;
6+
next(p) := FALSE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := TRUE;
11+
next(q) := FALSE;
12+
13+
-- should pass
14+
LTLSPEC X (p -> q)

Diff for: regression/ebmc/Buechi/or1.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
or1.smv
3+
--buechi --bound 2
4+
^\[.*\] X p \| X q: PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/or1.smv

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := TRUE;
11+
next(q) := FALSE;
12+
13+
-- should pass
14+
LTLSPEC X p | X q

Diff for: regression/ebmc/Buechi/or2.desc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
or2.smv
3+
--buechi --bound 2
4+
^\[.*\] X \(p \| q\): PROVED up to bound 2$
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
--

Diff for: regression/ebmc/Buechi/or2.smv

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MODULE main
2+
3+
VAR p : boolean;
4+
5+
ASSIGN init(p) := FALSE;
6+
next(p) := TRUE;
7+
8+
VAR q : boolean;
9+
10+
ASSIGN init(q) := TRUE;
11+
next(q) := FALSE;
12+
13+
-- should pass
14+
LTLSPEC X (p | q)

Diff for: src/ebmc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SRC = \
1717
ebmc_properties.cpp \
1818
ebmc_solver_factory.cpp \
1919
instrument_past.cpp \
20+
instrument_buechi.cpp \
2021
k_induction.cpp \
2122
liveness_to_safety.cpp \
2223
live_signal.cpp \

Diff for: src/ebmc/ebmc_parse_options.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Author: Daniel Kroening, [email protected]
1717
#include "ebmc_base.h"
1818
#include "ebmc_error.h"
1919
#include "ebmc_version.h"
20+
#include "instrument_buechi.h"
2021
#include "liveness_to_safety.h"
2122
#include "netlist.h"
2223
#include "neural_liveness.h"
@@ -237,6 +238,10 @@ int ebmc_parse_optionst::doit()
237238
return 0;
238239
}
239240

241+
// LTL/SVA to Buechi?
242+
if(cmdline.isset("buechi"))
243+
instrument_buechi(transition_system, properties, ui_message_handler);
244+
240245
// possibly apply liveness-to-safety
241246
if(cmdline.isset("liveness-to-safety"))
242247
liveness_to_safety(transition_system, properties);
@@ -371,6 +376,7 @@ void ebmc_parse_optionst::help()
371376
" {y--show-properties} \t list the properties in the model\n"
372377
" {y--property} {uid} \t check the property with given ID\n"
373378
" {y--liveness-to-safety} \t translate liveness properties to safety properties\n"
379+
" {y--buechi} \t translate LTL/SVA properties to Buechi acceptance\n"
374380
"\n"
375381
"Methods:\n"
376382
" {y--k-induction} \t do k-induction with k=bound\n"

Diff for: src/ebmc/ebmc_parse_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ebmc_parse_optionst:public parse_options_baset
4949
"(random-traces)(trace-steps):(random-seed):(traces):"
5050
"(random-trace)(random-waveform)"
5151
"(bmc-with-assumptions)"
52-
"(liveness-to-safety)"
52+
"(liveness-to-safety)(buechi)"
5353
"I:D:(preprocess)(systemverilog)(vl2smv-extensions)"
5454
"(warn-implicit-nets)",
5555
argc,

0 commit comments

Comments
 (0)