Skip to content

Commit 59c6fb4

Browse files
Move YamlWitness.init() before justcil check and update cram test to verify CIL output
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/86acd990-3af7-4033-b7b4-95622c8d6391 Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
1 parent aab08db commit 59c6fb4

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

src/framework/control.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ struct
370370
(* real beginning of the [analyze] function *)
371371
if get_bool "ana.sv-comp.enabled" then
372372
Witness.init (module FileCfg); (* TODO: move this out of analyze_loop *)
373-
YamlWitness.init ();
374373

375374
AnalysisState.global_initialization := true;
376375
GobConfig.earlyglobs := get_bool "exp.earlyglobs";

src/maingoblint.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ let do_analyze change_info merged_AST =
541541
Messages.out := Legacy.open_out (get_string "outfile"));
542542

543543
let module L = Printable.Liszt (CilType.Fundec) in
544+
YamlWitness.init ();
544545
if get_bool "justcil" then
545546
(* if we only want to print the output created by CIL: *)
546547
Cilfacade.print merged_AST
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
Ghost variables declared in a YAML witness are injected into the CIL file before analysis:
22

3-
$ goblint --set witness.yaml.validate ghost.yml ghost.c
4-
[Info][Deadcode] Logical lines of code (LLoC) summary:
5-
live: 2
6-
dead: 0
7-
total lines: 2
8-
[Warning][Witness] cannot validate entry of type ghost_instrumentation
9-
[Info][Witness] witness validation summary:
10-
confirmed: 0
11-
unconfirmed: 0
12-
refuted: 0
13-
error: 0
14-
unchecked: 0
15-
unsupported: 1
16-
disabled: 0
17-
total validation entries: 1
3+
$ goblint --enable justcil --set dbg.justcil-printer clean --set witness.yaml.validate ghost.yml ghost.c | grep "m_locked"
4+
int m_locked = 0;

0 commit comments

Comments
 (0)