Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
106e4a7
Add files via upload
aliesh1996 Jan 16, 2023
3becb51
Merge branch 'master' of https://github.com/TART-MSU/HyperQube
Jan 16, 2023
2cc7fe0
Delete genqbf-V0.5.cpp
aliesh1996 Jan 16, 2023
d8a0eee
update .sh
Jan 16, 2023
a959cc6
add cases
Jan 16, 2023
8fbd7e9
update cases
Jan 16, 2023
d013782
cases
Jan 16, 2023
73fdb23
fix docker platform issue
Jan 16, 2023
e7378f9
thh
Jan 17, 2023
5ab4bfd
thh
Jan 17, 2023
501e0e5
thh
Jan 17, 2023
85ef320
thh
Jan 17, 2023
30a17f6
cplusplus
Jan 18, 2023
1624151
updates
Jan 18, 2023
bb2eb7e
Thh
Jan 18, 2023
623a0aa
thh
Jan 18, 2023
f7ce4b0
thh
Jan 18, 2023
724908a
thh
Jan 19, 2023
3d61db3
thh
Jan 19, 2023
c4b47a2
thh
Jan 19, 2023
dfdb94f
thh
Jan 19, 2023
340be14
formula unrolling
Jan 20, 2023
604d445
formula unrollings
Jan 20, 2023
0140c8a
start optimizing gates generation
Jan 20, 2023
50a05eb
fix formula reading
Jan 20, 2023
6fc4cc2
quantifier
Jan 20, 2023
2c80e29
thh
Jan 20, 2023
a030218
thh
Jan 20, 2023
2c3e884
thh
Jan 21, 2023
b8dc90e
thh
Jan 22, 2023
69a32e0
thh
Jan 22, 2023
4a99311
thh
Jan 26, 2023
5f094d9
thh
Feb 2, 2023
77c8810
thh
Feb 2, 2023
4baa401
thh
Feb 2, 2023
c5f2478
thh
Feb 2, 2023
ad824b4
thh
Feb 2, 2023
18ffe39
thh
Feb 2, 2023
e37e786
thh
Feb 2, 2023
6954f3e
thh
Feb 2, 2023
8539cea
thh
Feb 3, 2023
884372e
thh
Feb 13, 2023
22b4b6e
update
Mar 3, 2023
d4efe6a
thh
Mar 3, 2023
0e8f2b6
thh
Apr 14, 2023
7ce51b2
update
Apr 15, 2023
fa99fd6
updates
Apr 15, 2023
51afd05
updates
Apr 15, 2023
d04ea5c
updates
Apr 15, 2023
1e86bd2
updates
Apr 15, 2023
a0e64b3
updates
Apr 15, 2023
7642320
updates
Apr 15, 2023
26dba7a
updates
Apr 15, 2023
dacd2bc
updates
Apr 15, 2023
b493f4e
updates
Apr 15, 2023
28e5379
thh
Apr 15, 2023
f8d32fa
updates
Apr 16, 2023
1a3b4d8
updates
Apr 16, 2023
ffcf5c8
updates
Apr 16, 2023
464c37c
updates
Apr 16, 2023
4172fda
thh
May 12, 2023
b869332
update
May 23, 2023
1838ae8
thh
Jun 7, 2023
f0242d1
update
Jun 10, 2023
96ce187
updates
Jun 11, 2023
88204bc
update mapsynth example
Jun 12, 2023
ce864e3
thh
Jun 18, 2023
800f8e1
thh
Jun 19, 2023
04425b0
Merge pull request #1 from HyperQB/master
tzuhancs Jun 19, 2023
73b1091
delete
Jun 19, 2023
7970932
compare-qcir
Jun 19, 2023
ae79f71
cases
Jul 11, 2023
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
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local/
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) [2021] [Cesar Sanchez, Borzoo Bonakdarpour, Tzu-Han Hsu]
Copyright (c) [2021] [César Sánchez, Borzoo Bonakdarpour, Tzu-Han Hsu]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ clean:
find . -name "*.quabs" -delete
find . -name "*.qcir" -delete
find . -name "*.cex" -delete
find . -name "*QS" -delete
find . -name "*.cex" -delete
find . -name "P.hq" -delete
find . -name "*.hoa" -delete
81 changes: 52 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Welcome to HyperQube!

HyperQube is a home-grown tool of Bounded Model Checking for Hyperproperties.
# Welcome to HyperQB!

HyperQB is a home-grown tool of Bounded Model Checking for Hyperproperties.

Hyperproperty specifies and reasons about important requirements among multiple traces.
We implement our algorithm for Bounded Model Checking for Hyperproperty as a tool, HyperQube.
We implement our QBF-based algorithm for Bounded Model Checking for Hyperproperty as a tool, HyperQB.

HyperQube includes several parts:
HyperQB includes several parts:
- NuSMV model parsing and Boolean encoding of transition relation and specification,
- HyperLTL formula translation,
- QBF encoding of unfolding with bound k using specific semantics,
Expand All @@ -17,39 +16,43 @@ while the existing tool, QuAbs, is under AGPL license.



## HOW TO USE
To run HyperQube, install [docker](https://docs.docker.com/get-docker/) then execute ```hyperqube.sh``` with one of the following two scenarios:

1. BMC with single model:<br/>
```./hyperqube.sh <model_file_name.smv> <formula_file_name.hq> <k> ```

2. BMC with multi-model:<br/>
```./hyperqube.sh <model_1_file_name.smv> <model_2_file_name.smv> <formula_file_name.hq> <k>```

Note that <k> is a natural number specifies the length of unrolling.
## Get Started
You can start using HyperQB in 2 simple steps:
1. First install [docker](https://docs.docker.com/get-docker/).
HyperQB will automatically pull the image and execute the scripts to avoid possible hassle of compiling dependencies!

2. Next, clone the repository and step into the repo:
- ```git clone https://github.com/TART-MSU/HyperQB.git```
- ```cd HyperQB```

To observe the tool outputs, all model checking results with counterexample will output as *_OUTPUT_formatted.cex. The parsed outputs have variables, time stamps, and values neatly presented.

You are now ready to run HyperQB!:D

## GET STARTED
You can start using HyperQube in 2 simple steps:

1. First make sure DOCKER is installed from: https://docs.docker.com/get-docker/ . HyperQube will automatically pull the image and execute the scripts to avoid possible hassle of compiling dependencies.
2. Next, clone the repository and step into the repo:
- ```git clone https://github.com/TART-MSU/HyperQube.git```
- ```cd HyperQube```

You are now ready to run HyperQube!
## How to Use
To run HyperQB, execute ```hyperqb.sh``` with the following inputs:
- `<list of models>` written in NuSMV format (as .smv files),
- `<formula>` written in the grammar described in Sec. 4 (as a .hq file),
- `<k>` a natural number 0, specifying the unrolling bound,
- `<sem>` the semantics, which can be -pes, -opt, -hpes or -hopt, and
- `<mode>` to say performing classic BMC (i.e., negating the formula) or not, which can be -bughunt or -find (we use the former as default value).

RUN HyperQB in the following format:
```./hyperqube <list of models> <formula> <k> <sem> <mode>```

We provide two demo examples. To run, execute each of the followings:
- (Example 1: bakery with symmetry:) <br/> ```./hyperqube.sh demo/bakery.smv demo/symmetry 10 pes -single```
- (Example 2: SNARK with linearizability) <br/> ```./hyperqube.sh demo/SNARK_conc.smv demo/SNARK_seq.smv demo/linearizability 18 pes -multi```
To observe the tool outputs (i.e., counterexample or witness)
See ```*_OUTPUT_formatted.cex``` for parsed outputs have variables, time stamps, and values neatly presented.

Demo Examples:
1. [demo 1: run bakery algorithm with symmetry property]
```./hyperqb.sh demo/bakery.smv demo/bakery.smv demo/symmetry.hq 10 -pes```

2. [dem0 2: run SNARK algorithm with linearizability propoerty]
```./hyperqb.sh demo/SNARK_conc.smv demo/SNARK_seq.smv demo/lin.hq 18 -pes```


## Experiments
(all models and formulas are in directory tacas21_cases)
(all models and formulas are in directory cases_bmc)

Our evaluations include the following cases,<br/>
- Case #1.1-#1.4: Symmetry in the Bakery Algorithm<br/>
Expand All @@ -58,14 +61,34 @@ Our evaluations include the following cases,<br/>
- Case #4.1-#4.2: Fairness in Non-repudiation Protocols<br/>
- Case #5.1-#5.2: Privacy-Preserving Path Synthesis for Robots<br/>
- Case #6.1: Mutant Synthesis for Mutation Testing<br/>
- Case #7.1: Co-termination of multiple programs<br/>
- Case #6.1: Mutant Synthesis for Mutation Testing<br/>
- Case #6.1: Mutant Synthesis for Mutation Testing<br/>
- Case #6.1: Mutant Synthesis for Mutation Testing<br/>
- Case #6.1: Mutant Synthesis for Mutation Testing<br/>
- Case #7.1: Co-termination<br/>
- Case #8.1: Deniability<br/>
- Case #9.1 - #9.3: Intransitive Non-interference<br/>
- Case #10.1 - #10.2: TINI and TSNI
- Case #11.1: K-safety

We also provide all the command lines needed for each experiment in the document *RUN.txt*

## One-click Scripts
We provide several convenient scripts for executing exeperiments.

- run ```./run_demos.sh``` to run demo examples
- run ```./run_tacas21.sh``` to run all experiments for TACAS21
- run ```./run_cav23.sh``` to run all experiments for CAV23

We also provide all the command lines needed for each experiment in the document *RUN.txt*


## People
Authors:
- [Tzu-Han Hsu](https://tzuhancs.github.io/), Michigan State University.
- [Borzoo Bonakdarpour](http://www.cse.msu.edu/~borzoo/), Michigan State University.
- [César Sánchez](https://software.imdea.org/~cesar/), IMDEA Software Institute.

Publication:
- [Bounded Model Checking for Hyperproperties (TACAS'21)](https://link.springer.com/content/pdf/10.1007/978-3-030-72016-2_6.pdf)

48 changes: 24 additions & 24 deletions RUN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,96 +5,96 @@ This file provide the command lines to run specific experiments we provided in t

Small demos in the tool paper:

./hyperqube.sh demo/simple.smv demo/simple.hq 1 pes -single
./hyperqube.sh demo/mini.smv demo/mini.hq 1 pes -single
./hyperqb.sh demo/simple.smv demo/simple.hq 1 pes -single
./hyperqb.sh demo/mini.smv demo/mini.hq 1 pes -single

[run bakery algorithm with symmetry property]
./hyperqube.sh demo/bakery.smv demo/symmetry.hq 10 pes -single
./hyperqb.sh demo/bakery.smv demo/symmetry.hq 10 pes -single

[run SNARK algorithm with linearizability propoerty]
./hyperqube.sh demo/SNARK_conc.smv demo/SNARK_seq.smv demo/linearizability 18 pes -multi
./hyperqb.sh demo/SNARK_conc.smv demo/SNARK_seq.smv demo/linearizability 18 pes -multi


Experiments in the tool paper:
[run simple_krip with simple_krip_formula]
./hyperqube.sh cases_bmc/simple_krip.smv cases_bmc/simple_krip_formula.hq 5 pes
./hyperqb.sh cases_bmc/simple_krip.smv cases_bmc/simple_krip_formula.hq 5 pes


[BAKERY]
-- 1.1 BAKERY 3PROC SYM1 --
./hyperqube.sh cases_bmc/bakery_3procs.smv cases_bmc/bakery_formula_sym1_3proc.hq 10 pes
./hyperqb.sh cases_bmc/bakery_3procs.smv cases_bmc/bakery_formula_sym1_3proc.hq 10 pes

-- 1.2 BAKERY 3PROC SYM2 --
./hyperqube.sh cases_bmc/bakery_3procs.smv cases_bmc/bakery_formula_sym2_3proc.hq 10 pes
./hyperqb.sh cases_bmc/bakery_3procs.smv cases_bmc/bakery_formula_sym2_3proc.hq 10 pes

-- 1.3 BAKERY 5PROC SYM1 --
./hyperqube.sh cases_bmc/bakery_5procs.smv cases_bmc/bakery_formula_sym1_5proc.hq 10 pes
./hyperqb.sh cases_bmc/bakery_5procs.smv cases_bmc/bakery_formula_sym1_5proc.hq 10 pes

-- 1.4 BAKERY 5PROC SYM2 --
./hyperqube.sh cases_bmc/bakery_5procs.smv cases_bmc/bakery_formula_sym2_5proc.hq 10 pes
./hyperqb.sh cases_bmc/bakery_5procs.smv cases_bmc/bakery_formula_sym2_5proc.hq 10 pes



[SNARK]

-- 2.1 SNARK_BUG 1 --
./hyperqube.sh cases_bmc/snark1_M1_concurrent.smv cases_bmc/snark1_M2_sequential.smv cases_bmc/snark1_formula.hq 18 pes
./hyperqb.sh cases_bmc/snark1_M1_concurrent.smv cases_bmc/snark1_M2_sequential.smv cases_bmc/snark1_formula.hq 18 pes

-- 2.2 SNARK_BUG 2 --
./hyperqube.sh cases_bmc/snark2_new_M1_concurrent.smv cases_bmc/snark2_new_M2_sequential.smv cases_bmc/snark2_formula.hq 30 pes
./hyperqb.sh cases_bmc/snark2_new_M1_concurrent.smv cases_bmc/snark2_new_M2_sequential.smv cases_bmc/snark2_formula.hq 30 pes



[3-thread]
-- 3.1 3-thread incorrect --
./hyperqube.sh cases_bmc/NI_incorrect.smv cases_bmc/NI_formula.hq 50 hpes
./hyperqb.sh cases_bmc/NI_incorrect.smv cases_bmc/NI_formula.hq 50 hpes

-- 3.2 3-thread correct --
./hyperqube.sh cases_bmc/NI_correct.smv cases_bmc/NI_formula.hq 50 hopt
./hyperqb.sh cases_bmc/NI_correct.smv cases_bmc/NI_formula.hq 50 hopt

[Non-repudiation Protocol]

-- 4.1 NRP incorrect
./hyperqube.sh cases_bmc/NRP_incorrect.smv cases_bmc/NRP_formula.hq 15 hpes
./hyperqb.sh cases_bmc/NRP_incorrect.smv cases_bmc/NRP_formula.hq 15 hpes

-- 4.2 NRP_correct --
./hyperqube.sh cases_bmc/NRP_correct.smv cases_bmc/NRP_formula.hq 15 hopt
./hyperqb.sh cases_bmc/NRP_correct.smv cases_bmc/NRP_formula.hq 15 hopt





[Shortest Path]
-- Shortest Path 10x10 --
./hyperqube.sh cases_bmc/robotic_sp_100.smv cases_bmc/robotic_sp_formula.hq 20 hpes -find
./hyperqb.sh cases_bmc/robotic_sp_100.smv cases_bmc/robotic_sp_formula.hq 20 hpes -find

-- Shortest Path 20x20 --
./hyperqube.sh cases_bmc/robotic_sp_400.smv cases_bmc/robotic_sp_formula.hq 40 hpes -find
./hyperqb.sh cases_bmc/robotic_sp_400.smv cases_bmc/robotic_sp_formula.hq 40 hpes -find

-- Shortest Path 40x40 --
./hyperqube.sh cases_bmc/robotic_sp_1600.smv cases_bmc/robotic_sp_formula.hq 80 hpes -find
./hyperqb.sh cases_bmc/robotic_sp_1600.smv cases_bmc/robotic_sp_formula.hq 80 hpes -find

-- Shortest Path 60x60 --
./hyperqube.sh cases_bmc/robotic_sp_3600.smv cases_bmc/robotic_sp_formula.hq 120 hpes -find
./hyperqb.sh cases_bmc/robotic_sp_3600.smv cases_bmc/robotic_sp_formula.hq 120 hpes -find



[Initial State Robustness]

-- Robustness 10x10 --
./hyperqube.sh cases_bmc/robotic_robustness_100.smv cases_bmc/robotic_robustness_formula.hq 20 hpes -find
./hyperqb.sh cases_bmc/robotic_robustness_100.smv cases_bmc/robotic_robustness_formula.hq 20 hpes -find

-- Robustness 20x20 --
./hyperqube.sh cases_bmc/robotic_robustness_400.smv cases_bmc/robotic_robustness_formula.hq 40 hpes -find
./hyperqb.sh cases_bmc/robotic_robustness_400.smv cases_bmc/robotic_robustness_formula.hq 40 hpes -find

-- Robustness 40x40 --
./hyperqube.sh cases_bmc/robotic_robustness_1600.smv cases_bmc/robotic_robustness_formula.hq 80 hpes -find
./hyperqb.sh cases_bmc/robotic_robustness_1600.smv cases_bmc/robotic_robustness_formula.hq 80 hpes -find

-- Robustness 60x60 --
./hyperqube.sh cases_bmc/robotic_robustness_3600.smv cases_bmc/robotic_robustness_formula.hq 120 hpes -find
./hyperqb.sh cases_bmc/robotic_robustness_3600.smv cases_bmc/robotic_robustness_formula.hq 120 hpes -find



[Mutation Testing]

./hyperqube.sh cases_bmc/mutation_testing.smv cases_bmc/mutation_testing.hq 10 hpes -find
./hyperqb.sh cases_bmc/mutation_testing.smv cases_bmc/mutation_testing.hq 10 hpes -find
Binary file modified cases_bmc/.DS_Store
Binary file not shown.
Loading