Skip to content

Commit

Permalink
what4: Don't annotate bound variables
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Dec 6, 2023
1 parent 076f49b commit be3e8b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions what4/src/What4/Expr/Builder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,7 @@ instance IsExprBuilder (ExprBuilder t st fs) where

annotateTerm sym e =
case e of
BoundVarExpr (bvarId -> n) -> return (n, e)
NonceAppExpr (nonceExprApp -> Annotation _ n _) -> return (n, e)
_ -> do
let tpr = exprType e
Expand All @@ -1639,11 +1640,13 @@ instance IsExprBuilder (ExprBuilder t st fs) where

getAnnotation _sym e =
case e of
BoundVarExpr (bvarId -> n) -> Just n
NonceAppExpr (nonceExprApp -> Annotation _ n _) -> Just n
_ -> Nothing

getUnannotatedTerm _sym e =
case e of
BoundVarExpr {} -> Just e
NonceAppExpr (nonceExprApp -> Annotation _ _ x) -> Just x
_ -> Nothing

Expand Down

0 comments on commit be3e8b1

Please sign in to comment.