-
Notifications
You must be signed in to change notification settings - Fork 44
Always output fully-simplified states #2303
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
kore/src/Kore/Step.hs
Outdated
@@ -119,7 +126,7 @@ data Prim | |||
= Begin | |||
| Simplify | |||
| Rewrite | |||
deriving (Show) | |||
deriving (Eq,Show) |
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.
deriving (Eq,Show) | |
deriving (Eq, Show) |
kore/src/Kore/Step.hs
Outdated
, Rewrite | ||
, Simplify | ||
] | ||
& Stream.iterate id) |
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.
Using where
would follow the style guide a bit better:
step1 Stream.:> Stream.iterate id stepN
where
step1 =
(Strategy.sequence . fmap Strategy.apply)
[ Begin
, Simplify
, Rewrite
, Simplify
]
stepN =
(Strategy.sequence . fmap Strategy.apply)
[ Begin
, Rewrite
, Simplify
]
kore/test/Test/Kore/Step.hs
Outdated
getPrims :: Strategy Prim -> [Prim] | ||
getPrims = \case | ||
Strategy.Seq s1 s2 -> getPrims s1 ++ getPrims s2 | ||
Strategy.Apply p -> [p] | ||
Strategy.Continue -> [] | ||
_ -> [] -- ? |
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 write a function isLastSimplify :: Strategy Prim -> Bool
in the same spirit as hasRewrite
, so that we can cover all the cases better.
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.
Please also have a look at our style guide.
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 wrote a summary in the pull request this time, but please do that on your next pull request.
* executionStrategy: Simplify always appears after Rewrite * limitedExecutionStrategy: Add missing documentation Co-authored-by: Thomas Tuegel <[email protected]>
Fixes #2299
Update
executionStrategy
so thatSimplify
always appears afterRewrite
. If execution is stopped by the depth limit, fully-simplified states will be printed for the user.Review checklist
The author performs the actions on the checklist. The reviewer evaluates the work and checks the boxes as they are completed.