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

Discard invalid actions #99

Merged
merged 13 commits into from
Jun 18, 2021
Merged

Discard invalid actions #99

merged 13 commits into from
Jun 18, 2021

Conversation

4ever2
Copy link
Collaborator

@4ever2 4ever2 commented Jun 16, 2021

Closes #93

@spitters
Copy link
Collaborator

LGTM. @annenkov what do you think?

@annenkov
Copy link
Collaborator

Looks good. Basically, an action can be dropped if one can prove that there is no derivation that evaluates the action.
@jakobbotsch do you have any comments?

@spitters
Copy link
Collaborator

I have an itch that this is related to something like the inversion tactic, but I haven't had the time to think deeply about this.

+ now rewrite_environment_equiv.
+ assumption.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I actually liked the previous version better. Basically, intuition solves only a couple of goals automatically and the rest is still bullet points. I try to use intuition followed by some tactic that solves most (or better - all) of the remaining goals after intuition.
Also, intuition can be slow and sometimes uses axioms coming from heterogeneous equality without your consent, I find it quite annoying. So, intuition is a powerful tool, but it this case maybe it's better to use something simpler. I guess repeat split;auto will have the same effect.
But I don't mind if you think it's better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I prefer repeat split; auto since it reduces the size of the proof as much as intuition but is much faster.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have pushed an even shorter proof that avoids intuition and bullet points.

@spitters
Copy link
Collaborator

spitters commented Jun 17, 2021 via email

chain_state_queue prev_bstate = act :: acts ->
chain_state_queue next_bstate = acts ->
act_is_from_account act ->
(forall bstate new_acts, ~ inhabited (ActionEvaluation prev_bstate act bstate new_acts)) ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: You can avoid some steps in future proofs by making it ActionEvaluation prev_bstate act bstate new_acts -> False.

@annenkov
Copy link
Collaborator

annenkov commented Jun 18, 2021

If nobody objects, I'm going to merge the PR then.

@annenkov annenkov marked this pull request as ready for review June 18, 2021 13:20
@annenkov annenkov merged commit 5fd6a9e into AU-COBRA:master Jun 18, 2021
@jakobbotsch
Copy link
Collaborator

I did have some feedback above :)

@4ever2 4ever2 mentioned this pull request Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to consume invalid Actions in ChainStates
4 participants