Skip to content

perf(smt): no relevance tables when no lemma is to be selected - #1221

Merged
strub merged 1 commit into
mainfrom
perf/smt-given-lemmas
Oct 28, 2026
Merged

strub merged 1 commit into
mainfrom
perf/smt-given-lemmas

Conversation

@strub

@strub strub commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

smt(lemmas) without maxlemmas sets the maximum number of selected lemmas to zero (pl_max in EcScope): the task holds the given lemmas and nothing else. EcSmt.select nevertheless ran init_relevant, which scans the statement of every axiom of the environment to build the relevance tables, before relevant_clause stopped at once on the exhausted maximum; the given lemmas were themselves found by testing every axiom against the hints.

When nothing is to be selected, the tables are not built and the given lemmas are resolved from the hints: a lemma by its path, a theory (@T) by a walk of its items, sub-theories included (Hints.included lists the inclusions). smt() and maxlemmas are unchanged. tests/smt-given-lemmas.ec covers a lemma, a list, a theory and a sub-theory.

Measured on the AVX2 ML-KEM proofs of jasmin-nist, where the environment holds the Jasmin word and array libraries: the scan costs about 0.13 s per call (the provers themselves take 10 ms on these goals), and a file with 244 such calls goes from 140 s to 108 s.

@strub
strub force-pushed the perf/smt-given-lemmas branch 2 times, most recently from 8490ee3 to 7a40462 Compare October 28, 2026 15:08
@strub strub self-assigned this Oct 28, 2026
@strub strub added the yolo-pr Don't bother reviewing, I will merge label Oct 28, 2026
`smt(lemmas)` without `maxlemmas` sets the maximum number of selected
lemmas to zero: the task holds the given lemmas and nothing else. The
selection still built its relevance tables, scanning the statement of
every axiom of the environment to count the operators, before stopping
on the exhausted maximum; the given lemmas were themselves found by
testing every axiom of the environment against the hints.

When nothing is to be selected the tables are not built, and the given
lemmas come from the hints: a lemma by its path, a theory by a walk of
its items (`Hints.included` lists them). The walk skips the abstract
theories, whose items are not bound in the environment.

On the AVX2 ML-KEM proofs of jasmin-nist, where the environment holds
the Jasmin word and array libraries, the scan cost about 0.13 s per call;
a file with 244 such calls goes from 140 s to 108 s.
@strub
strub force-pushed the perf/smt-given-lemmas branch from 7a40462 to 1622579 Compare October 28, 2026 15:28
@strub
strub merged commit 7bbf3b0 into main Oct 28, 2026
20 checks passed
@strub
strub deleted the perf/smt-given-lemmas branch October 28, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

yolo-pr Don't bother reviewing, I will merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant