-
Notifications
You must be signed in to change notification settings - Fork 63
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
add hoist_ifs_in_goal
#1315
add hoist_ifs_in_goal
#1315
Conversation
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'm not a fan of the InternalTacticEvidence
construct. The idea behind Evidence
is that they represent the trusted proof steps we are willing to accept, and thus should have some pretty strong scrutiny applied when adding new ones. We can't evaluate InternalTacticEvidence
because callers could put whatever transformation they want there.
I'd much rather see a dedicated HoistIfsEvidence
.
7c6333e
to
5ecaf75
Compare
case asEqTrue body of | ||
Just t -> pure t | ||
Nothing -> fail "hoistIfsInGoal: expected EqTrue" | ||
ecs <- traverse (\(nm, ty) -> scFreshEC sc nm ty) args |
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.
We should really check to make sure that there aren't dependencies among these types, otherwise we will have dangling variables. Either that, or we should handle it properly by substituting into the types of later variables 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.
Looks like we use this same pattern elsewhere. Let's not hold up this PR for this, but it's definitely something that should get fixed.
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.
Looks like doing this properly is over my head for now. I presume this is not critical at the moment since you approved the changes. Is that 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.
Yeah, I don't think we need to fix this right now. CF #1316
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.
Let's comment HoistIfsEvidence
. Otherwise looks good to go.
@@ -343,6 +359,8 @@ data Evidence | |||
-- evidence is use to check the modified goal. | |||
| EvalEvidence (Set VarIndex) Evidence | |||
|
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.
This could use a comment.
We may put a custom one in place later
No description provided.