diff options
author | Chloe Brown <chloe.brown.00@outlook.com> | 2021-03-27 15:04:30 +0000 |
---|---|---|
committer | Chloe Brown <chloe.brown.00@outlook.com> | 2021-03-27 15:04:30 +0000 |
commit | c67134fc5cb9e338cb397df029e5528d469771d4 (patch) | |
tree | a9668ec8e86b1e4b44e50e6b69a831d48aed87ec | |
parent | b254d61d3a4084e0f2dc47cded5b4482cc31ae23 (diff) |
Introduce derivations.
-rw-r--r-- | src/Cfe/Parse.agda | 10 | ||||
-rw-r--r-- | src/Cfe/Parse/Base.agda | 23 | ||||
-rw-r--r-- | src/Cfe/Parse/Properties.agda | 7 |
3 files changed, 40 insertions, 0 deletions
diff --git a/src/Cfe/Parse.agda b/src/Cfe/Parse.agda new file mode 100644 index 0000000..29b94fe --- /dev/null +++ b/src/Cfe/Parse.agda @@ -0,0 +1,10 @@ +{-# OPTIONS --without-K --safe #-} + +open import Relation.Binary using (Setoid) + +module Cfe.Parse + {c ℓ} (over : Setoid c ℓ) + where + +open import Cfe.Parse.Base over public +open import Cfe.Parse.Properties over public diff --git a/src/Cfe/Parse/Base.agda b/src/Cfe/Parse/Base.agda new file mode 100644 index 0000000..50e085a --- /dev/null +++ b/src/Cfe/Parse/Base.agda @@ -0,0 +1,23 @@ +{-# OPTIONS --without-K --safe #-} + +open import Relation.Binary using (Setoid) + +module Cfe.Parse.Base + {c ℓ} (over : Setoid c ℓ) + where + +open Setoid over renaming (Carrier to C) + +open import Cfe.Expression over +open import Data.Fin +open import Data.List + +infix 4 _⤇_ + +data _⤇_ : Expression 0 → List C → Set c where + Eps : ε ⤇ [] + Char : ∀ {c} → Char c ⤇ [ c ] + Cat : ∀ {e₁ e₂ l₁ l₂} → e₁ ⤇ l₁ → e₂ ⤇ l₂ → e₁ ∙ e₂ ⤇ l₁ ++ l₂ + Veeˡ : ∀ {e₁ e₂ l} → e₁ ⤇ l → e₁ ∨ e₂ ⤇ l + Veeʳ : ∀ {e₁ e₂ l} → e₂ ⤇ l → e₁ ∨ e₂ ⤇ l + Fix : ∀ {e l} → e [ μ e / zero ] ⤇ l → μ e ⤇ l diff --git a/src/Cfe/Parse/Properties.agda b/src/Cfe/Parse/Properties.agda new file mode 100644 index 0000000..7803f82 --- /dev/null +++ b/src/Cfe/Parse/Properties.agda @@ -0,0 +1,7 @@ +{-# OPTIONS --without-K --safe #-} + +open import Relation.Binary using (Setoid) + +module Cfe.Parse.Properties + {c ℓ} (over : Setoid c ℓ) + where |