-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ML connectives from the predicate type (#155)
Turn `Predicate` into a newtype for `Terms` of sort `Bool`. This also removes all the predicate simplifications, since those rules introduce ML connectives. This should be a sound thing to do since the frontend turns all `requires REQ` clauses into `REQ #Equals true`. All we should do when internalising is to unwrap `REQ #Equals true` into `X`. If we add a restriction to requires/ensures that they can only be expressions of sort Bool (runtimeverification/k#3284), this should be sound. Equally, we dont want to use any rules such as ``` rule {K1 =/=Int K2 #Equals true} => #Not({K1 #Equals K2}) ``` from `domains.md`: https://github.com/runtimeverification/k/blob/71a183b85a48da94e34541ca138757fbeb37ce8a/k-distribution/include/kframework/builtin/domains.md?plain=1#L966-L974 since they would now introduce ML connectives which are unnecessary in this instance. We want this rule to be applied instead ``` rule I1:Int =/=Int I2:Int => notBool (I1 ==Int I2) ``` other rules, such as ``` rule {true #Equals @b1 andBool @b2} => {true #Equals @b1} #And {true #Equals @b2} ``` are kind of meta-rules which we implicitly apply already: https://github.com/runtimeverification/hs-backend-booster/blob/37717b4e33455e8e16e7ca51e946b9a7b4f3c1be/library/Booster/Pattern/Simplify.hs#L20-L25 There is still the question of ceil simplification rules but given that they are most likely unsound in their current state and the booster is very conservative around definedness, I don't think we need to worry about them right now... the question is whether/how we will have to deal with them in the future. --------- Co-authored-by: Jost Berthold <jost.berthold@gmail.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Jost Berthold <jost.berthold@runtimeverification.com>
- Loading branch information
1 parent
7dc1965
commit 27ac540
Showing
30 changed files
with
467 additions
and
762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.