File: .lake/packages/lean4/src/lean/Lean/Compiler/IR/LiveVars.lean

full_name: Lean.IR.IsLive.M
code: /--
  We use `State Context` instead of `ReaderT Context Id` because we remove
  non local joint points from `Context` whenever we visit them instead of
  maintaining a set of visited non local join points.

  Remark: we don't need to track local join points because we assume there is
  no variable or join point shadowing in our IR.
-/
abbrev M 
goal: Type

full_name: Lean.IR.IsLive.visitVar
code: abbrev visitVar (w : Index) (x : VarId) : M Bool 
goal: Lean.IR.IsLive.M Bool

full_name: Lean.IR.IsLive.visitJP
code: abbrev visitJP (w : Index) (x : JoinPointId) : M Bool 
goal: Lean.IR.IsLive.M Bool

full_name: Lean.IR.IsLive.visitArg
code: abbrev visitArg (w : Index) (a : Arg) : M Bool 
goal: Lean.IR.IsLive.M Bool

full_name: Lean.IR.IsLive.visitArgs
code: abbrev visitArgs (w : Index) (as : Array Arg) : M Bool 
goal: Lean.IR.IsLive.M Bool

full_name: Lean.IR.IsLive.visitExpr
code: abbrev visitExpr (w : Index) (e : Expr) : M Bool 
goal: Lean.IR.IsLive.M Bool

full_name: Lean.IR.IsLive.visitFnBody
code: partial def visitFnBody (w : Index) : FnBody → M Bool
  
goal: Lean.IR.FnBody → Lean.IR.IsLive.M Bool

full_name: Lean.IR.FnBody.hasLiveVar
code: /-- Return true if `x` is live in the function body `b` in the context `ctx`.

   Remark: the context only needs to contain all (free) join point declarations.

   Recall that we say that a join point `j` is free in `b` if `b` contains
   `FnBody.jmp j ys` and `j` is not local. -/
def FnBody.hasLiveVar (b : FnBody) (ctx : LocalContext) (x : VarId) : Bool 
goal: Bool

full_name: Lean.IR.LiveVarSet
code: abbrev LiveVarSet   
goal: Type

full_name: Lean.IR.JPLiveVarMap
code: abbrev JPLiveVarMap 
goal: Type

full_name: Lean.IR.instInhabitedLiveVarSet
code: instance : Inhabited LiveVarSet 
goal: Inhabited Lean.IR.LiveVarSet

full_name: Lean.IR.mkLiveVarSet
code: def mkLiveVarSet (x : VarId) : LiveVarSet 
goal: Lean.IR.LiveVarSet

full_name: Lean.IR.LiveVars.Collector
code: abbrev Collector 
goal: Type

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.skip
code: @[inline] private def skip : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.collectVar
code: @[inline] private def collectVar (x : VarId) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.collectArg
code: private def collectArg : Arg → Collector
  
goal: Lean.IR.Arg → Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.collectArray
code: private def collectArray {α : Type} (as : Array α) (f : α → Collector) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.collectArgs
code: private def collectArgs (as : Array Arg) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.accumulate
code: private def accumulate (s' : LiveVarSet) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.collectJP
code: private def collectJP (m : JPLiveVarMap) (j : JoinPointId) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.bindVar
code: private def bindVar (x : VarId) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.LiveVars.0.Lean.IR.LiveVars.bindParams
code: private def bindParams (ps : Array Param) : Collector 
goal: Lean.IR.LiveVars.Collector

full_name: Lean.IR.LiveVars.collectExpr
code: def collectExpr : Expr → Collector
  
goal: Lean.IR.Expr → Lean.IR.LiveVars.Collector

full_name: Lean.IR.LiveVars.collectFnBody
code: partial def collectFnBody : FnBody → JPLiveVarMap → Collector
  
goal: Lean.IR.FnBody → Lean.IR.JPLiveVarMap → Lean.IR.LiveVars.Collector

full_name: Lean.IR.LiveVars.updateJPLiveVarMap
code: def updateJPLiveVarMap (j : JoinPointId) (ys : Array Param) (v : FnBody) (m : JPLiveVarMap) : JPLiveVarMap 
goal: Lean.IR.JPLiveVarMap

full_name: Lean.IR.updateLiveVars
code: def updateLiveVars (e : Expr) (v : LiveVarSet) : LiveVarSet 
goal: Lean.IR.LiveVarSet

full_name: Lean.IR.collectLiveVars
code: def collectLiveVars (b : FnBody) (m : JPLiveVarMap) (v : LiveVarSet := {}) : LiveVarSet 
goal: Lean.IR.LiveVarSet