formal-interview/Language/Values.agda

25 lines
711 B
Agda
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Language.Values where
open import Data.Integer using ()
open import Data.Bool using (Bool)
open import Data.List using (List; []; _∷_)
data Value : Set where
int : Value
bool : Bool Value
data ValueType : Set where
tint tbool : ValueType
variable
s s' s'' : List Value
st st' st'' : List ValueType
b b₁ b₂ : Bool
z z₁ z₂ :
-- what it means for list of value types to describe a list of values
data ⟦_⟧ˢ : List ValueType List Value Set where
⟦⟧ˢ-empty : [] ⟧ˢ []
⟦⟧ˢ-int : st ⟧ˢ s tint st ⟧ˢ (int z s)
⟦⟧ˢ-bool : st ⟧ˢ s tbool st ⟧ˢ (bool b s)