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

add hoist_ifs_in_goal #1315

Merged
merged 14 commits into from
Jun 3, 2021
Merged

add hoist_ifs_in_goal #1315

merged 14 commits into from
Jun 3, 2021

Conversation

nano-o
Copy link
Contributor

@nano-o nano-o commented May 28, 2021

No description provided.

@nano-o nano-o requested a review from robdockins May 28, 2021 22:54
Copy link
Contributor

@robdockins robdockins left a 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.

@nano-o nano-o force-pushed the hoist_ifs branch 2 times, most recently from 7c6333e to 5ecaf75 Compare June 2, 2021 03:16
@nano-o nano-o requested a review from robdockins June 2, 2021 04:33
case asEqTrue body of
Just t -> pure t
Nothing -> fail "hoistIfsInGoal: expected EqTrue"
ecs <- traverse (\(nm, ty) -> scFreshEC sc nm ty) args
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor

@robdockins robdockins left a 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

Copy link
Contributor

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.

@nano-o nano-o added PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run and removed PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run labels Jun 2, 2021
@nano-o nano-o added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Jun 3, 2021
@mergify mergify bot merged commit 03b0fa8 into GaloisInc:master Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants