Skip to content

SVA/LTL property instrumentation #797

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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 @@ -10,6 +10,7 @@
* SMV: LTL V operator, xnor operator
* SMV: word types and operators
* --smv-word-level outputs the model as word-level SMV
* word-level BMC: LTL/SVA to Buechi with --buechi

# EBMC 5.5

Expand Down
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/FGp1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
FGp1.smv
--buechi --bound 2
^\[.*\] F G p: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/FGp1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

-- should pass
LTLSPEC F G p
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/Fp1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
Fp1.smv
--buechi --bound 2
^\[.*\] F p: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/Fp1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

-- should pass
LTLSPEC F p
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/GFp1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
GFp1.smv
--buechi --bound 2
^\[.*\] G F p: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/GFp1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := !p;

-- should pass
LTLSPEC G F p
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/Gp1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
Gp1.smv
--buechi --bound 2
^\[.*\] G p: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/Gp1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := TRUE;
next(p) := TRUE;

-- should pass
LTLSPEC G p
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/Xp1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
Xp1.smv
--buechi --bound 2
^\[.*\] X p: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/Xp1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

-- should pass
LTLSPEC X p
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/and1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
and1.smv
--buechi --bound 2
^\[.*\] X p & X q: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
15 changes: 15 additions & 0 deletions regression/ebmc/Buechi/and1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

VAR q : boolean;

ASSIGN init(q) := FALSE;
next(q) := TRUE;

-- should pass
LTLSPEC X p & X q

9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/and2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
and2.smv
--buechi --bound 2
^\[.*\] X \(p & q\): PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
15 changes: 15 additions & 0 deletions regression/ebmc/Buechi/and2.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

VAR q : boolean;

ASSIGN init(q) := FALSE;
next(q) := TRUE;

-- should pass
LTLSPEC X (p & q)

9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/iff1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
iff1.smv
--buechi --bound 2
^\[.*\] X p <-> X q: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
14 changes: 14 additions & 0 deletions regression/ebmc/Buechi/iff1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := TRUE;
next(p) := FALSE;

VAR q : boolean;

ASSIGN init(q) := TRUE;
next(q) := FALSE;

-- should pass
LTLSPEC X p <-> X q
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/iff2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
iff2.smv
--buechi --bound 2
^\[.*\] X \(p <-> q\): PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
14 changes: 14 additions & 0 deletions regression/ebmc/Buechi/iff2.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := TRUE;
next(p) := FALSE;

VAR q : boolean;

ASSIGN init(q) := TRUE;
next(q) := FALSE;

-- should pass
LTLSPEC X (p <-> q)
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/implies1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
implies1.smv
--buechi --bound 2
^\[.*\] X p -> X q: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
14 changes: 14 additions & 0 deletions regression/ebmc/Buechi/implies1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := TRUE;
next(p) := FALSE;

VAR q : boolean;

ASSIGN init(q) := TRUE;
next(q) := FALSE;

-- should pass
LTLSPEC X p -> X q
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/implies2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
implies2.smv
--buechi --bound 2
^\[.*\] X \(p -> q\): PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
14 changes: 14 additions & 0 deletions regression/ebmc/Buechi/implies2.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := TRUE;
next(p) := FALSE;

VAR q : boolean;

ASSIGN init(q) := TRUE;
next(q) := FALSE;

-- should pass
LTLSPEC X (p -> q)
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/or1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
or1.smv
--buechi --bound 2
^\[.*\] X p \| X q: PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
14 changes: 14 additions & 0 deletions regression/ebmc/Buechi/or1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

VAR q : boolean;

ASSIGN init(q) := TRUE;
next(q) := FALSE;

-- should pass
LTLSPEC X p | X q
9 changes: 9 additions & 0 deletions regression/ebmc/Buechi/or2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
or2.smv
--buechi --bound 2
^\[.*\] X \(p \| q\): PROVED up to bound 2$
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
14 changes: 14 additions & 0 deletions regression/ebmc/Buechi/or2.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MODULE main

VAR p : boolean;

ASSIGN init(p) := FALSE;
next(p) := TRUE;

VAR q : boolean;

ASSIGN init(q) := TRUE;
next(q) := FALSE;

-- should pass
LTLSPEC X (p | q)
1 change: 1 addition & 0 deletions src/ebmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SRC = \
ebmc_properties.cpp \
ebmc_solver_factory.cpp \
instrument_past.cpp \
instrument_buechi.cpp \
k_induction.cpp \
liveness_to_safety.cpp \
live_signal.cpp \
Expand Down
6 changes: 6 additions & 0 deletions src/ebmc/ebmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Author: Daniel Kroening, [email protected]
#include "ebmc_base.h"
#include "ebmc_error.h"
#include "ebmc_version.h"
#include "instrument_buechi.h"
#include "liveness_to_safety.h"
#include "netlist.h"
#include "neural_liveness.h"
Expand Down Expand Up @@ -237,6 +238,10 @@ int ebmc_parse_optionst::doit()
return 0;
}

// LTL/SVA to Buechi?
if(cmdline.isset("buechi"))
instrument_buechi(transition_system, properties, ui_message_handler);

// possibly apply liveness-to-safety
if(cmdline.isset("liveness-to-safety"))
liveness_to_safety(transition_system, properties);
Expand Down Expand Up @@ -371,6 +376,7 @@ void ebmc_parse_optionst::help()
" {y--show-properties} \t list the properties in the model\n"
" {y--property} {uid} \t check the property with given ID\n"
" {y--liveness-to-safety} \t translate liveness properties to safety properties\n"
" {y--buechi} \t translate LTL/SVA properties to Buechi acceptance\n"
"\n"
"Methods:\n"
" {y--k-induction} \t do k-induction with k=bound\n"
Expand Down
2 changes: 1 addition & 1 deletion src/ebmc/ebmc_parse_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ebmc_parse_optionst:public parse_options_baset
"(random-traces)(trace-steps):(random-seed):(traces):"
"(random-trace)(random-waveform)"
"(bmc-with-assumptions)"
"(liveness-to-safety)"
"(liveness-to-safety)(buechi)"
"I:D:(preprocess)(systemverilog)(vl2smv-extensions)"
"(warn-implicit-nets)",
argc,
Expand Down
Loading
Loading