-
Notifications
You must be signed in to change notification settings - Fork 44
Keep set of defined terms in SideCondition #2354
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
Conversation
…ndition' into replacement-map-in-sidecondition
…ork/kore into replacement-map-in-sidecondition
Co-authored-by: Thomas Tuegel <[email protected]>
…' into defined-terms-in-sidecondition
isBottom assumedTrue | ||
where | ||
SideCondition { assumedTrue } = sideCondition | ||
|
||
instance Ord variable => HasFreeVariables (SideCondition variable) variable | ||
where | ||
freeVariables sideCondition@(SideCondition _ _) = | ||
freeVariables sideCondition@(SideCondition _ _ _) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should include the free variables of the other fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this should include the free variables of the replacements as well? I assume you mean the free variables of the defined terms here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the free variables of the term replacements should be the same as from the assumedTrue
right? Yes, we should definitely include the defined terms.
generateNormalizedAcs internalMap | ||
& HashSet.map TermLike.mkInternalMap | ||
in foldMap assumeDefinedWorker definedElems | ||
<> asSet term' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use asSet
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generateNormalizedAcs
will not add the collection itself to the resulting HashSet
. I thought it was clearer to separate the two, especially since we should check if the input collection is always defined or not before adding it. Actually, do you think we should do the same for the subcollections as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I mean: Why does the collection itself need to be in the set at all? The set should have all the sub-terms required to decide that the whole collection is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. We don't add the collection itself anymore, and I added a special case for singleton collections in isDefined
.
in foldMap assumeDefinedWorker definedElems | ||
<> asSet term' | ||
<> definedMaps | ||
TermLike.InternalSet_ internalSet -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the logic for Map and Set be combined with Kore.Builtin.AssocComm.CeilSimplifier
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've thought about this, and I think it would only make sense if we wanted to also generate subcollections there and evaluate their ceils. Do we want to do this? At the moment, it looks like we only check the definedness of the elements and if they are unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, it looks like we only check the definedness of the elements and if they are unique.
Well, that's what it means to evaluate the \ceil
s of sub-collections.
Part of #2351
Needs #2315Implements the first three bullet points from #2351.
Review checklist
The author performs the actions on the checklist. The reviewer evaluates the work and checks the boxes as they are completed.