Skip to content

Optimize encodings of coherence and acyclicity (mostly IDL)#1015

Open
ThomasHaas wants to merge 3 commits intodevelopmentfrom
optimizeIDLEncodings
Open

Optimize encodings of coherence and acyclicity (mostly IDL)#1015
ThomasHaas wants to merge 3 commits intodevelopmentfrom
optimizeIDLEncodings

Conversation

@ThomasHaas
Copy link
Copy Markdown
Collaborator

@ThomasHaas ThomasHaas commented Mar 22, 2026

This PR adds a little trick to make the ordering constraints of some must-edges unconditional, i.e., it changes the encoding from exec(x) /\ exec(y) => clk(x) < clk(y) to clk(x) < clk(y) if possible.
The argument for when this can be done is quite subtle.

Most benefit is expected on eager encodings, especially for SC where I saw improvements in the range of 10-30%.
I think it might be worth having an SVCOMP run with this branch.

The optimization might also be applicable to the SAT encodings for acyclicty. I have not thought about this yet though.

EDIT: I have added the same optimization to the SAT encoding for acyclicity. I also saw some improvement, but not as big as in the IDL case.

@ThomasHaas
Copy link
Copy Markdown
Collaborator Author

See cna.c in #1016 for a benchmark where the optimizations of this PR are quite effectful.
IIRC, this is particularly the case for verifying program_spec of the #define FAIL version, where solving time went from 16 minutes down to 4-5 (using Z3/IDL encoding).

@ThomasHaas ThomasHaas changed the title Optimize IDL encodings of coherence and acyclicity Optimize encodings of coherence and acyclicity Mar 23, 2026
@ThomasHaas ThomasHaas changed the title Optimize encodings of coherence and acyclicity Optimize encodings of coherence and acyclicity (mostly IDL) Mar 23, 2026
@ThomasHaas ThomasHaas force-pushed the optimizeIDLEncodings branch from c7d559f to 95b96b4 Compare March 23, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant