womp (no deepeval)
This commit is contained in:
@@ -493,30 +493,6 @@ Core Transition Rules
|
|||||||
[\mathtt{Pack} \; t \; n, \mathtt{Update} \; 0, \mathtt{Unwind}]$}
|
[\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
|
Extension Rules
|
||||||
***************
|
***************
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ step st = case head (st ^. gmCode) of
|
|||||||
& advanceCode
|
& advanceCode
|
||||||
& gmStack .~ s'
|
& gmStack .~ s'
|
||||||
& gmHeap .~ h'
|
& gmHeap .~ h'
|
||||||
|
& gmStats . stsAllocations %~ succ
|
||||||
where
|
where
|
||||||
(as,s) = splitAt n (st ^. gmStack)
|
(as,s) = splitAt n (st ^. gmStack)
|
||||||
s' = a:s
|
s' = a:s
|
||||||
@@ -207,6 +208,7 @@ step st = case head (st ^. gmCode) of
|
|||||||
& gmStack %~ (a:)
|
& gmStack %~ (a:)
|
||||||
& gmEnv .~ m'
|
& gmEnv .~ m'
|
||||||
& gmHeap .~ h'
|
& gmHeap .~ h'
|
||||||
|
& gmStats . stsAllocations %~ succ
|
||||||
where
|
where
|
||||||
s = st ^. gmStack
|
s = st ^. gmStack
|
||||||
m = st ^. gmEnv
|
m = st ^. gmEnv
|
||||||
@@ -397,7 +399,7 @@ step st = case head (st ^. gmCode) of
|
|||||||
& gmStack %~ (f:)
|
& gmStack %~ (f:)
|
||||||
|
|
||||||
NGlobal n _
|
NGlobal n _
|
||||||
| k <= n -> traceWith (render . showState) $ st
|
| k <= n -> st
|
||||||
& gmCode .~ i
|
& gmCode .~ i
|
||||||
& gmStack .~ s'
|
& gmStack .~ s'
|
||||||
& gmDump .~ d
|
& gmDump .~ d
|
||||||
@@ -473,6 +475,7 @@ boxInt :: GmState -> Int -> GmState
|
|||||||
boxInt st n = st
|
boxInt st n = st
|
||||||
& gmHeap .~ h'
|
& gmHeap .~ h'
|
||||||
& gmStack %~ (a:)
|
& gmStack %~ (a:)
|
||||||
|
& gmStats . stsAllocations %~ succ
|
||||||
where
|
where
|
||||||
h = st ^. gmHeap
|
h = st ^. gmHeap
|
||||||
(h',a) = alloc h (NNum n)
|
(h',a) = alloc h (NNum n)
|
||||||
|
|||||||
Reference in New Issue
Block a user