Start working on the evaluation operation.

Proving monotonicity is the main hurdle here.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2024-03-10 18:13:01 -07:00
parent 0705df708e
commit f21ebdcf46
5 changed files with 63 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ open import Relation.Nullary using (¬_)
open import Function using (_∘_)
open import Lattice
open import Utils using (Unique; Unique-map; empty; push)
open import Utils using (Unique; Unique-map; empty; push; x∈xs⇒fx∈fxs)
data Expr : Set where
_+_ : Expr Expr Expr
@@ -156,6 +156,10 @@ private
, push (z≢mapsfs inds') (Unique-map suc suc-injective unids')
)
indices-complete : (n : ) (f : Fin n) f ∈ˡ (proj₁ (indices n))
indices-complete (suc n') zero = RelAny.here refl
indices-complete (suc n') (suc f') = RelAny.there (x∈xs⇒fx∈fxs suc (indices-complete n' f'))
-- For now, just represent the program and CFG as one type, without branching.
record Program : Set where
@@ -179,6 +183,9 @@ record Program : Set where
states : List State
states = proj₁ (indices length)
states-complete : (s : State) s ∈ˡ states
states-complete = indices-complete length
states-Unique : Unique states
states-Unique = proj₂ (indices length)