diff options
author | Evi | 2016-04-29 13:43:35 +0200 |
---|---|---|
committer | Evi | 2016-04-29 13:43:35 +0200 |
commit | 793dbd524285ed773f45d088fb7c4f85088ecb2f (patch) | |
tree | 5ba4c3c097c00589b9450fbf5f9a71dfaaf83481 /rulestail.tex | |
parent | Over Exec (diff) |
tail
stukje over tail toegevoegd
Diffstat (limited to 'rulestail.tex')
-rw-r--r-- | rulestail.tex | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rulestail.tex b/rulestail.tex new file mode 100644 index 0000000..156d6b6 --- /dev/null +++ b/rulestail.tex @@ -0,0 +1,28 @@ +% vim: set spelllang=nl: +\subsection{\texttt{Tail}} +\label{sec:rules:tail} + +\begin{quote} + t - Pops a string from the stack, and pushes its tail, ie all but the first character. This causes an error if used on the empty string. +\end{quote} + +In plaats van het geven van een error kiezen we ervoor te voorkomen dat we een +afleidingsboom kunnen maken wanneer $\StmTail$ wordt uitgevoerd op het moment +dat het element bovenop de stack de lege string is. + +Dit geeft de volgende regel: + +$$ +\begin{prooftree} + \trans + {\pgm}{\ip}{(\push{s}{\stk'}, \str)} + {\ip'}{\op}{\st} + \justifies + \trans + {\StmTail:\pgm}{\ip}{(\stk,\str)} + {\ip'}{\op}{\st} + \using{\rtailns} + \qquad + \text{met $(c~s,\stk') = \pop{\stk}$.} +\end{prooftree} +$$
\ No newline at end of file |