Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecsFerra committed Dec 13, 2024
1 parent abd8d33 commit 7ee749a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/Language/Fixpoint/Smt/Theories.hs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@ bvConcatSort = FAbs 0 $ FAbs 1 $ FAbs 2 $
interpSym :: Symbol -> Raw -> Sort -> (Symbol, TheorySymbol)
interpSym x n t = (x, Thy x n t Theory)

-- This variable is uded to generate the lambda names `lam_arg$n` in
-- `Interface.hs` that will be used during defunctionalization in
-- `Defunctionalize.hs`, is a pretty gross hack as if the user typees in the
-- program or ple generates a term that has more than `maxLamArg` lambda binders
-- one inside the other, the smt will crash complaining that
-- `lam_arg${maxLamArg}` was not declared.
maxLamArg :: Int
maxLamArg = 20

Expand Down
8 changes: 4 additions & 4 deletions src/Language/Fixpoint/Solver/PLE.hs
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,10 @@ eval γ ctx et = go
evalELam :: Knowledge -> ICtx -> EvalType -> (Symbol, Sort) -> Expr -> EvalST (Expr, FinalExpand)
evalELam γ ctx et (x, s) e
| not $ isEtaSymbol x = do
-- We need to refresh it as for some reason lamdba variables
-- as reflected lambdas variables for some reason are declared
-- two times, maybe we should define a new type of identifier
-- and not reuse the etabeta ones
-- We need to refresh it as for some reason names bound by lambdas
-- present in the source code are getting declared twice.
-- Maybe we should define a new type of identifier for this kind of fresh
-- variables and not reuse the etabeta ones.
[ xFresh ] <- makeFreshEtaNames 1
let newBody = subst (mkSubst [(x, EVar xFresh)]) e

Expand Down

0 comments on commit 7ee749a

Please sign in to comment.