Skip to content
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

YAML witnesses get evaluated at unrelated nodes #1537

Closed
michael-schwarz opened this issue Jul 6, 2024 · 4 comments
Closed

YAML witnesses get evaluated at unrelated nodes #1537

michael-schwarz opened this issue Jul 6, 2024 · 4 comments
Labels

Comments

@michael-schwarz
Copy link
Member

For my thesis, I am re-running some old experiments and find that some invariants for pfscan can not be re-validated. After fixing issues because of #1535 some validation failures remain.

Here, it seems the YAML validator tries to evaluate expression at completely unrelated nodes. For example a witness for line 977 (Node 665) gets evaluated at a node corresponding to line 1032 (where the invariant obviously does not hold).

If I print the node information of failing witnesses with

M.warn ~category:Witness ~loc:msgLoc "Location: %s at %a" (Node.show_id n) d_loc (Node0.location n);

I get

[Warning][Witness] Location: 695 at pfscan_comb.c:1032 (pfscan_comb.c:977:2)

so the locations appear to be wrong.

This is on top of #1417 now, I'll have to see if the same also happens on master.

@michael-schwarz
Copy link
Member Author

Numerically, the offset (55 lines) somehow is quite close to the size of the second input file for Goblint (49 lines), but that may be coincidence.

@michael-schwarz
Copy link
Member Author

Command to reproduce (from bench repo):

../../analyzer/goblint --conf ../../analyzer/conf/traces-rel.json --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.relation.privatization mutex-meet-tid-cluster12 ./pfscan_comb.c ./pfscan_ftw.c --set witness.yaml.validate ./pfscan_comb_traces_rel.yml

@michael-schwarz
Copy link
Member Author

Hmm, it seems the invariants in the file all have entry_type loop_invariant, even when they have nothing to do with loops. Maybe that's also part of what goes wrong...

@michael-schwarz
Copy link
Member Author

loop_invariant vs location_invariant was actually the cause of the problem.

@michael-schwarz michael-schwarz closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant