File tree Expand file tree Collapse file tree 14 files changed +159
-1
lines changed
src/main/haskell/kore/src/Kore/Step Expand file tree Collapse file tree 14 files changed +159
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,16 @@ import Kore.Unparser
56
56
57
57
{-| 'MultiOr' is a Matching logic or of its children
58
58
59
- TODO(virgil): Make this a list-like monad, many things would be nicer.
59
+ -}
60
+ {- TODO (virgil): Make 'getMultiOr' a non-empty list ("Data.NonEmpty").
61
+
62
+ An empty 'MultiOr' corresponding to 'Bottom' actually discards information about
63
+ the sort of its child patterns! That is a problem for simplification, which
64
+ should preserve pattern sorts.
65
+
66
+ A non-empty 'MultiOr' would also have a nice symmetry between 'Top' and 'Bottom'
67
+ patterns.
68
+
60
69
-}
61
70
newtype MultiOr child = MultiOr { getMultiOr :: [child ] }
62
71
deriving
Original file line number Diff line number Diff line change @@ -107,6 +107,18 @@ simplify
107
107
{-| simplifies an And given its two 'OrOfExpandedPattern' children.
108
108
109
109
See 'simplify' for details.
110
+ -}
111
+ {- TODO (virgil): Preserve pattern sorts under simplification.
112
+
113
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
114
+ take an argument of type
115
+
116
+ > CofreeF (And level) (Valid level) (OrOfExpandedPattern level variable)
117
+
118
+ instead of two 'OrOfExpandedPattern' arguments. The type of 'makeEvaluate' may
119
+ be changed analogously. The 'Valid' annotation will eventually cache information
120
+ besides the pattern sort, which will make it even more useful to carry around.
121
+
110
122
-}
111
123
simplifyEvaluated
112
124
:: ( MetaOrObject level
Original file line number Diff line number Diff line change @@ -75,6 +75,18 @@ simplify
75
75
76
76
{-| 'simplifyEvaluated' evaluates a ceil given its child, see 'simplify'
77
77
for details.
78
+ -}
79
+ {- TODO (virgil): Preserve pattern sorts under simplification.
80
+
81
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
82
+ take an argument of type
83
+
84
+ > CofreeF (Ceil level) (Valid level) (OrOfExpandedPattern level variable)
85
+
86
+ instead of an 'OrOfExpandedPattern' argument. The type of 'makeEvaluate' may
87
+ be changed analogously. The 'Valid' annotation will eventually cache information
88
+ besides the pattern sort, which will make it even more useful to carry around.
89
+
78
90
-}
79
91
simplifyEvaluated
80
92
:: ( MetaOrObject level
Original file line number Diff line number Diff line change @@ -166,6 +166,18 @@ simplify
166
166
=
167
167
simplifyEvaluated tools substitutionSimplifier first second
168
168
169
+ {- TODO (virgil): Preserve pattern sorts under simplification.
170
+
171
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
172
+ take an argument of type
173
+
174
+ > CofreeF (Equals level) (Valid level) (OrOfExpandedPattern level variable)
175
+
176
+ instead of two 'OrOfExpandedPattern' arguments. The type of 'makeEvaluate' may
177
+ be changed analogously. The 'Valid' annotation will eventually cache information
178
+ besides the pattern sort, which will make it even more useful to carry around.
179
+
180
+ -}
169
181
simplifyEvaluated
170
182
:: ( MetaOrObject level
171
183
, SortedVariable variable
Original file line number Diff line number Diff line change @@ -96,6 +96,19 @@ simplify
96
96
=
97
97
simplifyEvaluated tools substitutionSimplifier simplifier variable child
98
98
99
+ {- TODO (virgil): Preserve pattern sorts under simplification.
100
+
101
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
102
+ take an argument of type
103
+
104
+ > CofreeF (Exists level) (Valid level) (OrOfExpandedPattern level variable)
105
+
106
+ instead of a 'variable level' and an 'OrOfExpandedPattern' argument. The type of
107
+ 'makeEvaluate' may be changed analogously. The 'Valid' annotation will
108
+ eventually cache information besides the pattern sort, which will make it even
109
+ more useful to carry around.
110
+
111
+ -}
99
112
simplifyEvaluated
100
113
:: ( MetaOrObject level
101
114
, Ord (variable level )
Original file line number Diff line number Diff line change @@ -54,6 +54,19 @@ simplify
54
54
=
55
55
simplifyEvaluatedFloor child
56
56
57
+ {- TODO (virgil): Preserve pattern sorts under simplification.
58
+
59
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
60
+ take an argument of type
61
+
62
+ > CofreeF (Floor level) (Valid level) (OrOfExpandedPattern level variable)
63
+
64
+ instead of an 'OrOfExpandedPattern' argument. The type of 'makeEvaluateFloor'
65
+ may be changed analogously. The 'Valid' annotation will eventually cache
66
+ information besides the pattern sort, which will make it even more useful to
67
+ carry around.
68
+
69
+ -}
57
70
simplifyEvaluatedFloor
58
71
:: ( MetaOrObject level
59
72
, SortedVariable variable
Original file line number Diff line number Diff line change @@ -60,6 +60,19 @@ simplify
60
60
=
61
61
simplifyEvaluated variable child
62
62
63
+ {- TODO (virgil): Preserve pattern sorts under simplification.
64
+
65
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
66
+ take an argument of type
67
+
68
+ > CofreeF (Forall level) (Valid level) (OrOfExpandedPattern level variable)
69
+
70
+ instead of a 'variable level' and an 'OrOfExpandedPattern' argument. The type of
71
+ 'makeEvaluate' may be changed analogously. The 'Valid' annotation will
72
+ eventually cache information besides the pattern sort, which will make it even
73
+ more useful to carry around.
74
+
75
+ -}
63
76
simplifyEvaluated
64
77
:: ( MetaOrObject level
65
78
, SortedVariable variable
Original file line number Diff line number Diff line change @@ -60,6 +60,18 @@ simplify
60
60
{-| evaluates an 'Iff' given its two 'OrOfExpandedPattern' children.
61
61
62
62
See 'simplify' for detailed documentation.
63
+ -}
64
+ {- TODO (virgil): Preserve pattern sorts under simplification.
65
+
66
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
67
+ take an argument of type
68
+
69
+ > CofreeF (Iff level) (Valid level) (OrOfExpandedPattern level variable)
70
+
71
+ instead of two 'OrOfExpandedPattern' arguments. The type of 'makeEvaluate' may
72
+ be changed analogously. The 'Valid' annotation will eventually cache information
73
+ besides the pattern sort, which will make it even more useful to carry around.
74
+
63
75
-}
64
76
simplifyEvaluated
65
77
:: ( MetaOrObject level
Original file line number Diff line number Diff line change @@ -69,6 +69,18 @@ simplify
69
69
See 'simplify' for details.
70
70
-}
71
71
-- TODO: Maybe transform this to (not a) \/ b
72
+ {- TODO (virgil): Preserve pattern sorts under simplification.
73
+
74
+ One way to preserve the required sort annotations is to make 'simplifyEvaluated'
75
+ take an argument of type
76
+
77
+ > CofreeF (Implies level) (Valid level) (OrOfExpandedPattern level variable)
78
+
79
+ instead of two 'OrOfExpandedPattern' arguments. The type of 'makeEvaluate' may
80
+ be changed analogously. The 'Valid' annotation will eventually cache information
81
+ besides the pattern sort, which will make it even more useful to carry around.
82
+
83
+ -}
72
84
simplifyEvaluated
73
85
:: ( MetaOrObject level
74
86
, SortedVariable variable
Original file line number Diff line number Diff line change @@ -65,6 +65,18 @@ simplify
65
65
=
66
66
simplifyEvaluatedIn tools first second
67
67
68
+ {- TODO (virgil): Preserve pattern sorts under simplification.
69
+
70
+ One way to preserve the required sort annotations is to make
71
+ 'simplifyEvaluatedIn' take an argument of type
72
+
73
+ > CofreeF (In level) (Valid level) (OrOfExpandedPattern level variable)
74
+
75
+ instead of two 'OrOfExpandedPattern' arguments. The type of 'makeEvaluateIn' may
76
+ be changed analogously. The 'Valid' annotation will eventually cache information
77
+ besides the pattern sort, which will make it even more useful to carry around.
78
+
79
+ -}
68
80
simplifyEvaluatedIn
69
81
:: ( MetaOrObject level
70
82
, SortedVariable variable
You can’t perform that action at this time.
0 commit comments