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

Further restrictions on theory rewriters related to safe options #11523

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ajreynol
Copy link
Member

Fixes cvc5/cvc5-projects#744.
Fixes cvc5/cvc5-projects#745.
Fixes cvc5/cvc5-projects#746.
Fixes cvc5/cvc5-projects#748.

Also makes it so that the FP rewriter does not rewrite experimental FP typed terms unless fp-exp is enabled.

Updates several regressions based on this.

@ajreynol ajreynol added normal Priority moderate Complexity labels Jan 14, 2025
@ajreynol ajreynol requested a review from aniemetz January 14, 2025 21:41
@ajreynol ajreynol added this to the cvc5 1.2.1 milestone Jan 22, 2025
src/smt/solver_engine.cpp Outdated Show resolved Hide resolved
@@ -593,23 +594,10 @@ void TheoryFp::preRegisterTerm(TNode node)
}
if (!options().fp.fpExp)
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to cache the option for faster access?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had considered this but I think this may be overkill. Note the same pattern is used in several other theories as well.

@@ -44,6 +46,27 @@ Integer getCardinality(const TypeNode& type)
* (Integer(2).pow(fps.exponentWidth()) - Integer(1));
}

void checkExperimentalFloatingPointType(const Node& n)
Copy link
Member

Choose a reason for hiding this comment

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

I would rename this to either checkFloatingPointType or checkForExperimentalFloatingPointType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment