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

Fix unguarded constraining #2001

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ class FunAppRuleWithArrays(rewriter: SymbStateRewriter) extends FunAppRule(rewri
// If argCell is comparable at the Scala level, we generate SMT constraints based on it
val select = tla.apalacheSelectInFun(elemArg.toNameEx, funCell.toNameEx)
val eql = tla.eql(elemRes.toNameEx, select)
val impl = tla.impl(tla.apalacheSelectInSet(elemArg.toNameEx, domainCell.toNameEx), eql)
// We need the SMT eql because funCell might be unconstrained, if it originates from a function set
rewriter.solverContext.assertGroundExpr(eql)
// The constraining only happens if argCell is in the domain
rewriter.solverContext.assertGroundExpr(impl)
return nextState.setRex(elemRes.toNameEx)
} else {
// We use an oracle to pick an arg for which the function is applied
Expand Down