Uncommitted changes
This commit is contained in:
parent
b2e58c1704
commit
2de7a49042
4 changed files with 12 additions and 39 deletions
5
Makefile
5
Makefile
|
@ -14,4 +14,7 @@ agda.sty: $(GENERATED_TEX)
|
|||
watch:
|
||||
watchexec -e agda,tex -- make --jobs=4 main.pdf
|
||||
|
||||
.PHONY: watch
|
||||
present: main.pdf
|
||||
zathura --mode fullscreen main.pdf
|
||||
|
||||
.PHONY: watch present
|
||||
|
|
15
main.tex
15
main.tex
|
@ -1,4 +1,4 @@
|
|||
\documentclass[xcolor={dvipsnames}]{beamer}
|
||||
\documentclass[aspectratio=1610,xcolor={dvipsnames}]{beamer}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{relsize}
|
||||
\usepackage{amsmath}
|
||||
|
@ -78,19 +78,6 @@
|
|||
\item $S$tore is a mapping of addresses to values.
|
||||
\item $K$ont is what gets evaluated next.
|
||||
\end{itemize}
|
||||
|
||||
\vspace{.5cm}
|
||||
|
||||
Example on next slide.
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\begin{exampleblock}{Example}
|
||||
\begin{equation*} \begin{split}
|
||||
\{ C = (\lambda .\:`0 + 2) \cdot 4, E = [], K = [halt] \} \\
|
||||
\{ C = (\lambda .\:`0 + 2), E = [4], K = [\lambda .\:`0 \cdot 4, halt] \} \\
|
||||
\end{split} \end{equation*}
|
||||
\end{exampleblock}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
|
|
|
@ -75,10 +75,14 @@ eval′ (suc n) s with step s
|
|||
eval : ∀ {A} → ℕ → Exp A ∅ A → EvalResult
|
||||
eval n e = eval′ n (inject e)
|
||||
|
||||
num : ∀ {A} → ℕ → Value A `ℕ
|
||||
num 0 = zero
|
||||
num (suc n) = suc $ num n
|
||||
|
||||
exp : Exp `ℕ ∅ `ℕ
|
||||
exp =
|
||||
`let (call/cc (ƛ (`let (` zero ∘ suc (suc zero)) (abort (` zero)))))
|
||||
((ƛ $ atomic $ suc $ ` zero) · ` zero)
|
||||
`let (call/cc (ƛ (`let (` zero ∘ (value $ num 2)) (abort (` zero)))))
|
||||
((ƛ $ atomic $ suc $ suc $ suc $ suc $ ` zero) · ` zero)
|
||||
|
||||
expRes+ : eval 7 exp ≡ (complete $ done $ (suc (suc (suc zero))))
|
||||
expRes+ : eval 7 exp ≡ (complete $ done $ (num 6))
|
||||
expRes+ = refl
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
module Project.Syntax where
|
||||
|
||||
open import Data.String using (String)
|
||||
|
||||
data Type : Set where
|
||||
|
||||
data Term : Set where
|
||||
-- Natural numbers
|
||||
zero : Term
|
||||
suc : Term → Term
|
||||
|
||||
-- Functions
|
||||
`_ : String → Term
|
||||
ƛ_⇒_ : String → Term → Term
|
||||
|
||||
-- Call/cc
|
||||
call/cc : Term → Term
|
||||
|
||||
data TermEnv : Set where
|
||||
∅ : TermEnv
|
||||
_[_∶_] : TermEnv → String → Type → TermEnv
|
Loading…
Reference in a new issue