Tighten exported definitions in Forward.agda
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
10332351ea
commit
b28994e1d2
@ -78,6 +78,7 @@ module WithProg (prog : Program) where
|
||||
; ⊥-contains-bottoms to ⊥ᵛ-contains-bottoms
|
||||
)
|
||||
|
||||
private
|
||||
≈ᵛ-dec = ≈ˡ-dec⇒≈ᵛ-dec ≈ˡ-dec
|
||||
joinSemilatticeᵛ = IsFiniteHeightLattice.joinSemilattice isFiniteHeightLatticeᵛ
|
||||
fixedHeightᵛ = IsFiniteHeightLattice.fixedHeight isFiniteHeightLatticeᵛ
|
||||
@ -109,6 +110,7 @@ module WithProg (prog : Program) where
|
||||
( ≈-sym to ≈ᵐ-sym
|
||||
)
|
||||
|
||||
private
|
||||
≈ᵐ-dec = ≈ᵛ-dec⇒≈ᵐ-dec ≈ᵛ-dec
|
||||
fixedHeightᵐ = IsFiniteHeightLattice.fixedHeight isFiniteHeightLatticeᵐ
|
||||
|
||||
@ -158,6 +160,7 @@ module WithProg (prog : Program) where
|
||||
; f'-k∈ks-≡ to joinAll-k∈ks-≡
|
||||
)
|
||||
|
||||
private
|
||||
variablesAt-joinAll : ∀ (s : State) (sv : StateVariables) →
|
||||
variablesAt s (joinAll sv) ≡ joinForKey s sv
|
||||
variablesAt-joinAll s sv
|
||||
@ -170,7 +173,7 @@ module WithProg (prog : Program) where
|
||||
eval-Mono : ∀ (e : Expr) → Monotonic _≼ᵛ_ _≼ˡ_ (eval e)
|
||||
|
||||
-- With 'join' in hand, we need to perform abstract evaluation.
|
||||
module _ {{evaluator : Evaluator}} where
|
||||
private module WithEvaluator {{evaluator : Evaluator}} where
|
||||
open Evaluator evaluator
|
||||
|
||||
-- For a particular evaluation function, we need to perform an evaluation
|
||||
@ -253,7 +256,10 @@ module WithProg (prog : Program) where
|
||||
with (vs , s,vs∈usv) ← locateᵐ {s} {updateAll sv} (states-in-Map s (updateAll sv)) =
|
||||
updateAll-k∈ks-≡ {l = sv} (states-complete s) s,vs∈usv
|
||||
|
||||
module _ {{latticeInterpretationˡ : LatticeInterpretation isLatticeˡ}} where
|
||||
open WithEvaluator
|
||||
open WithEvaluator using (result; analyze; result≈analyze-result) public
|
||||
|
||||
private module WithInterpretation {{latticeInterpretationˡ : LatticeInterpretation isLatticeˡ}} where
|
||||
open LatticeInterpretation latticeInterpretationˡ
|
||||
using ()
|
||||
renaming
|
||||
@ -294,6 +300,8 @@ module WithProg (prog : Program) where
|
||||
⟦⟧ᵛ-⊔ᵛ-∨ {vs₁ = vs'} {vs₂ = foldr _⊔ᵛ_ ⊥ᵛ vss'} ρ
|
||||
(inj₂ (⟦⟧ᵛ-foldr ⟦vs⟧ρ vs∈vss'))
|
||||
|
||||
open WithInterpretation
|
||||
|
||||
module _ {{evaluator : Evaluator}} {{interpretation : LatticeInterpretation isLatticeˡ}} where
|
||||
open Evaluator evaluator
|
||||
open LatticeInterpretation interpretation
|
||||
@ -312,7 +320,7 @@ module WithProg (prog : Program) where
|
||||
field
|
||||
valid : IsValid
|
||||
|
||||
module _ {{validInterpretation : ValidInterpretation}} where
|
||||
module WithValidInterpretation {{validInterpretation : ValidInterpretation}} where
|
||||
open ValidInterpretation validInterpretation
|
||||
|
||||
updateVariablesFromStmt-matches : ∀ {bs vs ρ₁ ρ₂} → ρ₁ , bs ⇒ᵇ ρ₂ → ⟦ vs ⟧ᵛ ρ₁ → ⟦ updateVariablesFromStmt bs vs ⟧ᵛ ρ₂
|
||||
@ -391,3 +399,5 @@ module WithProg (prog : Program) where
|
||||
|
||||
analyze-correct : ∀ {ρ : Env} → [] , rootStmt ⇒ˢ ρ → ⟦ variablesAt finalState result ⟧ᵛ ρ
|
||||
analyze-correct {ρ} ∅,s⇒ρ = walkTrace {initialState} {finalState} {[]} {ρ} ⟦joinAll-initialState⟧ᵛ∅ (trace ∅,s⇒ρ)
|
||||
|
||||
open WithValidInterpretation using (analyze-correct) public
|
||||
|
Loading…
Reference in New Issue
Block a user