File tree Expand file tree Collapse file tree 4 files changed +315
-247
lines changed
regression/goto-analyzer/history-output Expand file tree Collapse file tree 4 files changed +315
-247
lines changed Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --verify --recursive-interprocedural --one-domain-per-history --vsd --branching 4 --json -
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ \"falseHistories\": \[ \"local_control_flow_history : location \d+ after \d+ not taken after \d+ taken\" \]
7+ \"unknownHistories\": \[ \"local_control_flow_history : location \d+ after \d+ taken after \d+ taken\" \]
8+ --
9+ ^warning: ignoring
10+ --
11+ Make sure that the JSON output contains the histories in which the assertion is false and unknown
Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+
3+ int main (int argc , char * * argv )
4+ {
5+ int nondet1 ;
6+ int nondet2 ;
7+ int x ;
8+
9+ if (nondet1 )
10+ {
11+ // Taking this path the assertion clearly holds
12+ x = 1 ;
13+ }
14+ else
15+ {
16+ if (nondet2 )
17+ {
18+ // Taking this path the assertion clearly fails
19+ x = 0 ;
20+ }
21+ // Not taking the branch means the assertion is unknown
22+ // because x is non-deterministic
23+ }
24+
25+ assert (x );
26+
27+ return 0 ;
28+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --verify --recursive-interprocedural --one-domain-per-history --vsd --branching 4 --xml -
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ <history>local_control_flow_history : location \d+ after \d+ taken after \d+ taken<\/history>
7+ <history>local_control_flow_history : location \d+ after \d+ not taken after \d+ taken<\/history>
8+ --
9+ ^warning: ignoring
10+ --
11+ Make sure that the JSON output contains the histories in which the assertion is false and unknown
You can’t perform that action at this time.
0 commit comments