Skip to content

1023 literal code tree does not handle two variable equality sort matching - #1029

Merged
mezpusz merged 4 commits into
masterfrom
1023-literal-code-tree-does-not-handle-two-variable-equality-sort-matching
Oct 19, 2026
Merged

mezpusz merged 4 commits into
masterfrom
1023-literal-code-tree-does-not-handle-two-variable-equality-sort-matching

Conversation

@mezpusz

@mezpusz mezpusz commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Changes matching order for equations inside code trees from

  1. =
  2. equality sort
  3. arguments

to

  1. =
  2. arguments
  3. equality sort

in order to have the same order as in Renaming::normalizeVariables(Literal*). Regression shows a small improvement:

Discount FOL TPTP
run 0 unsat: 9292 (5) sat: 1044 (0) cputime: 60377.99 s instructions: 221610494 Mi memory: 1787712.59 MB
run 1 unsat: 9292 (5) sat: 1045 (1) cputime: 60287.47 s instructions: 221558710 Mi memory: 1796447.31 MB

Otter FOL TPTP
run 0 unsat: 9399 (6) sat: 1027 (0) cputime: 65607.93 s instructions: 221405555 Mi memory: 2023197.09 MB
run 1 unsat: 9410 (17) sat: 1027 (0) cputime: 65471.70 s instructions: 221274798 Mi memory: 2037041.06 MB

10 rounds of debug sampling shows no sign of the bug #1023 anymore, previously there were a few instances each round.

mezpusz and others added 4 commits October 19, 2026 10:08
… the same order as Renaming::normalizeVariables normalizes terms
…izations

The substitution a code tree returns is expressed in terms of the key's
variables as numbered by Renaming::normalizeVariables, so the code tree has
to number the variables of an equality literal in the same order
(arguments, then sort). This was not the case before the previous commit.

Reproducer: TermIndex/gen_equality_sort_variable_order (hits the
TermSharing.cpp:139 assertion on the parent of the previous commit).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hingUtils

Inserts a pool of equalities (two-variable ones with various sorts, reversed,
polymorphic, negative) and predicates into one CodeTreeLIS and checks, for
39 queries in both polarities, that the keys found are exactly those accepted
by MatchingUtils::match, and that each returned substitution maps its key to
the query or to the query's reversal.

Reproducer: TermIndex/gen_equality_agrees_with_matching_utils (hits the
Term.cpp:1564 assertion on the parent of the fix for #1023).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the bug (flipped from failing to successful)
@mezpusz
mezpusz requested a review from quickbeam123 October 19, 2026 12:51
@mezpusz mezpusz linked an issue Oct 19, 2026 that may be closed by this pull request
@mezpusz
mezpusz merged commit fab8834 into master Oct 19, 2026
1 check passed
@mezpusz
mezpusz deleted the 1023-literal-code-tree-does-not-handle-two-variable-equality-sort-matching branch October 19, 2026 14:44
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.

Literal code tree does not handle two variable equality sort matching

2 participants