Skip to content

Commit

Permalink
Merge pull request #21 from GaloisInc/issue18
Browse files Browse the repository at this point in the history
Translate Constant term bodies in a top-level name scope.
  • Loading branch information
brianhuffman authored Oct 9, 2020
2 parents 689afdc + 54b5e47 commit 2c7b485
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Verifier/SAW/Translation/Coq/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,14 @@ translateTermUnshared t = withLocalLocalEnvironment $ do
if elem renamed alreadyTranslatedDecls || elem renamed definitionsToSkip
then Coq.Var <$> pure renamed
else do
b <- go env body
b <-
-- Translate body in a top-level name scope
withLocalLocalEnvironment $
do modify $ set localEnvironment []
modify $ set unavailableIdents reservedIdents
modify $ set sharedNames IntMap.empty
modify $ set nextSharedName "var__0"
translateTermLet body
modify $ over localDeclarations $ (mkDefinition renamed b :)
Coq.Var <$> pure renamed

Expand Down

0 comments on commit 2c7b485

Please sign in to comment.