Skip to content

Commit d73abf5

Browse files
committed
SVA/LTL property instrumentation
1 parent 0a1c5ce commit d73abf5

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

+1322
-2
lines changed

CHANGELOG

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* SMV: LTL V operator, xnor operator
1515
* SMV: word types and operators
1616
* --smv-word-level outputs the model as word-level SMV
17+
* word-level BMC: LTL/SVA to Buechi with --buechi
1718

1819
# EBMC 5.5
1920

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+
--

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

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+
--

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

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+
--

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

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+
--

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

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+
--

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

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+
--

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+

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+
--

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+

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+
--

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

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+
--

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)

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+
--

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

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+
--

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)

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+
--

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

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+
--

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)

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 \

src/ebmc/ebmc_parse_options.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Author: Daniel Kroening, [email protected]
1919
#include "ebmc_base.h"
2020
#include "ebmc_error.h"
2121
#include "ebmc_version.h"
22+
#include "instrument_buechi.h"
2223
#include "liveness_to_safety.h"
2324
#include "netlist.h"
2425
#include "neural_liveness.h"
@@ -239,6 +240,10 @@ int ebmc_parse_optionst::doit()
239240
return 0;
240241
}
241242

243+
// LTL/SVA to Buechi?
244+
if(cmdline.isset("buechi"))
245+
instrument_buechi(transition_system, properties, ui_message_handler);
246+
242247
// possibly apply liveness-to-safety
243248
if(cmdline.isset("liveness-to-safety"))
244249
liveness_to_safety(transition_system, properties);
@@ -373,6 +378,7 @@ void ebmc_parse_optionst::help()
373378
" {y--show-properties} \t list the properties in the model\n"
374379
" {y--property} {uid} \t check the property with given ID\n"
375380
" {y--liveness-to-safety} \t translate liveness properties to safety properties\n"
381+
" {y--buechi} \t translate LTL/SVA properties to Buechi acceptance\n"
376382
"\n"
377383
"Methods:\n"
378384
" {y--k-induction} \t do k-induction with k=bound\n"

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)