Uncommitted changes

This commit is contained in:
Michael Zhang 2022-02-02 01:25:03 -06:00
parent b2e58c1704
commit 2de7a49042
Signed by untrusted user who does not match committer: michael
GPG key ID: BDA47A31A3C8EE6B
4 changed files with 12 additions and 39 deletions

View file

@ -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

View file

@ -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}

View file

@ -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

View file

@ -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