Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions kore/src/Kore/Equation/Registry.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import Kore.Syntax.Sentence
( SentenceAxiom (..)
)
import qualified Kore.Verified as Verified
import qualified Pretty

{- | Create a mapping from symbol identifiers to their defining axioms.

Expand Down Expand Up @@ -154,8 +155,13 @@ ignoreEquation Equation { attributes }
{- | Should we ignore the 'EqualityRule' for evaluating function definitions?
-}
ignoreDefinition :: Equation VariableName -> Bool
ignoreDefinition Equation { left } =
assert isLeftFunctionLike False
ignoreDefinition Equation { attributes, left }
| isLeftFunctionLike = False
| otherwise = (error . show . Pretty.vsep)
[ "left-hand side of equation was not function-like at:"
, Pretty.indent 4 $ Pretty.pretty sourceLocation
]
where
Attribute.Axiom { sourceLocation } = attributes
isLeftFunctionLike =
(Pattern.isFunction . Pattern.function) (extractAttributes left)