Tentative start on proving correctness

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2024-04-30 19:20:02 -07:00
parent ccb7abc501
commit 112a5087ef
2 changed files with 15 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ module Language.Semantics where
open import Language.Base
open import Agda.Primitive using (lsuc)
open import Data.Integer using (; +_) renaming (_+_ to _+ᶻ_; _-_ to _-ᶻ_)
open import Data.Product using (_×_; _,_)
open import Data.String using (String)
@@ -10,6 +11,9 @@ open import Data.Nat using ()
open import Relation.Nullary using (¬_)
open import Relation.Binary.PropositionalEquality using (_≡_)
open import Lattice
open import Utils using (_⇒_)
data Value : Set where
↑ᶻ : Value
@@ -58,3 +62,10 @@ data _,_⇒ˢ_ : Env → Stmt → Env → Set where
⇒ˢ-while-false : (ρ : Env) (e : Expr) (s : Stmt)
ρ , e ⇒ᵉ (↑ᶻ (+ 0))
ρ , (while e repeat s) ⇒ˢ ρ
record LatticeInterpretation {l} {L : Set l} {_≈_ : L L Set l}
{_⊔_ : L L L} {_⊓_ : L L L}
(isLattice : IsLattice L _≈_ _⊔_ _⊓_) : Set (lsuc l) where
field
⟦_⟧ : L Value Set
⟦⟧-respects-≈ : {l₁ l₂ : L} l₁ l₂ l₁ l₂