womp (no deepeval)

This commit is contained in:
crumbtoo
2023-12-07 12:05:48 -07:00
parent 791c5f6478
commit c31d12bde8
2 changed files with 9 additions and 30 deletions

View File

@@ -493,30 +493,6 @@ Core Transition Rules
[\mathtt{Pack} \; t \; n, \mathtt{Update} \; 0, \mathtt{Unwind}]$}
}
#. (WIP) Deep eval. Evaluate a constructor and each of its components
.. math::
\gmrule
{ \mathtt{DeepEval} : i
& a : s
& d
& h
\begin{bmatrix}
a : \mathtt{NConstr} \; t \; [a_1,\ldots,a_n]
\end{bmatrix}
& m
}
{ i' \concat i
& a_1 : \ldots : a_n : s
& d
& h
& m
\\
\SetCell[c=6]{c}
\text{where $i' = \overbrace{[\mathtt{Eval}, \mathtt{DeepEval},\mathtt{Eval},
\mathtt{DeepEval},\ldots]}^n$}
}
***************
Extension Rules
***************

View File

@@ -184,6 +184,7 @@ step st = case head (st ^. gmCode) of
& advanceCode
& gmStack .~ s'
& gmHeap .~ h'
& gmStats . stsAllocations %~ succ
where
(as,s) = splitAt n (st ^. gmStack)
s' = a:s
@@ -207,6 +208,7 @@ step st = case head (st ^. gmCode) of
& gmStack %~ (a:)
& gmEnv .~ m'
& gmHeap .~ h'
& gmStats . stsAllocations %~ succ
where
s = st ^. gmStack
m = st ^. gmEnv
@@ -397,7 +399,7 @@ step st = case head (st ^. gmCode) of
& gmStack %~ (f:)
NGlobal n _
| k <= n -> traceWith (render . showState) $ st
| k <= n -> st
& gmCode .~ i
& gmStack .~ s'
& gmDump .~ d
@@ -473,6 +475,7 @@ boxInt :: GmState -> Int -> GmState
boxInt st n = st
& gmHeap .~ h'
& gmStack %~ (a:)
& gmStats . stsAllocations %~ succ
where
h = st ^. gmHeap
(h',a) = alloc h (NNum n)