Skip to content

Use lazily expanding flat term everywhere and clean up class#834

Merged
mezpusz merged 3 commits intomasterfrom
clean-up-flatterm
Apr 1, 2026
Merged

Use lazily expanding flat term everywhere and clean up class#834
mezpusz merged 3 commits intomasterfrom
clean-up-flatterm

Conversation

@mezpusz
Copy link
Copy Markdown
Contributor

@mezpusz mezpusz commented Mar 27, 2026

I got around to fixing the lazily expanded flat term variant to literals too, which means I could remove the other variant completely and simplify the code a bit.

Minor but relatively stable improvement (mostly for SAT) for both Discount and Otter over FOL TPTP with one seemingly flipping problem instance in both (maybe @quickbeam123 's more stable measurement is needed here. ;)):

Discount:

run 0 unsat: 9208 (1) sat: 1032 (0) cputime: 57559.88 s instructions: 222882769 Mi memory: 1452257.26 MB
run 1 unsat: 9208 (1) sat: 1042 (10) cputime: 57305.22 s instructions: 222743871 Mi memory: 1461347.47 MB

Otter:

run 0 unsat: 9320 (1) sat: 1021 (0) cputime: 62631.56 s instructions: 222819399 Mi memory: 1684459.84 MB
run 1 unsat: 9320 (1) sat: 1025 (4) cputime: 62627.07 s instructions: 222755867 Mi memory: 1693718.59 MB

Copy link
Copy Markdown
Contributor

@MichaelRawson MichaelRawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice nice nice. Let's go - very minor comment but after that let's get this in.

Comment thread Kernel/FlatTerm.hpp
* make sure @b Entry::expand is called on each flat term
* entry before traversing its arguments.
*/
static FlatTerm* createUnexpanded(Term* t);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this can just be create now? In any event the comment needs updating.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, sorry for not noticing this upfront.

@mezpusz mezpusz merged commit 92746d5 into master Apr 1, 2026
1 check passed
@mezpusz mezpusz deleted the clean-up-flatterm branch April 5, 2026 09:02
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.

3 participants