You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open import Vatras.Framework.Definitions using (𝔽; 𝔸; atoms; 𝔼; ℂ)
7
+
module Vatras.Lang.2CC (Dimension : 𝔽) where
8
8
```
9
9
10
10
## Imports
11
11
12
12
```agda
13
-
open import Data.Bool using (Bool; true; false; if_then_else_)
14
-
open import Data.List
15
-
using (List; []; _∷_; lookup)
16
-
renaming (map to mapl)
17
-
open import Data.Product using (_,_)
18
-
open import Function using (id)
13
+
open import Data.Bool using (Bool; if_then_else_)
14
+
open import Data.List as List using (List)
19
15
open import Size using (Size; ↑_; ∞)
20
16
21
17
open import Vatras.Framework.Variants as V using (Rose)
22
-
open import Vatras.Framework.VariabilityLanguage
18
+
open import Vatras.Framework.VariabilityLanguage using (𝔼-Semantics; VariabilityLanguage; ⟪_,_,_⟫)
23
19
```
24
20
25
21
## Syntax
@@ -31,9 +27,9 @@ or a binary choice `D ⟨ l , r ⟩` between two sub-expressions `l` and `r`, wh
31
27
to identify the choice upon configuration.
32
28
Dimensions `D` can be of any given type `Dimension : 𝔽`.
33
29
```agda
34
-
data 2CC (Dimension : 𝔽) : Size → 𝔼 where
35
-
_-<_>- : ∀ {i A} → atoms A → List (2CC Dimension i A) → 2CC Dimension (↑ i) A
36
-
_⟨_,_⟩ : ∀ {i A} → Dimension → 2CC Dimension i A → 2CC Dimension i A → 2CC Dimension (↑ i) A
30
+
data 2CC : Size → 𝔼 where
31
+
_-<_>- : ∀ {i A} → atoms A → List (2CC i A) → 2CC (↑ i) A
32
+
_⟨_,_⟩ : ∀ {i A} → Dimension → 2CC i A → 2CC i A → 2CC (↑ i) A
37
33
```
38
34
39
35
## Semantics
@@ -47,175 +43,16 @@ We define `true` to mean choosing the left alternative and `false` to choose the
47
43
Defining it the other way around is also possible but we have to pick one definition and stay consistent.
48
44
We choose this order to follow the known _if c then a else b_ pattern where the evaluation of a condition _c_ to true means choosing the then-branch, which is the left one.
0 commit comments