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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user