vm-scm2 compiles

parent 931b41ca
......@@ -52,7 +52,7 @@ compile_disjunction0
get_CES(V,[C|_],E,S),
set_AES(V,Aq,0,S0),
(
((nonvar(X),X=(G1->G2)) -> XX=(G1,softie(A),G2) ; XX=X),
((nonvar(X),X=(G1->G2)) -> XX=(once(G1),G2) ; XX=X),
compile_goal(XX,Tail,V,[LX,LL]),
get_ACES(V,Aq1,[C1|_],E1,S1),
(C == C1 -> true ; throw(bug_c_state_error)),
......
......@@ -28,18 +28,18 @@
(define nq 8)
(<define> (push_Q e v u)
(<pp> `(push ,e))
;(<pp> `(push ,e))
(let ((v (<lookup> v)))
(<set> (vector-ref v nq) (cons u (<lookup> (vector-ref v nq))))))
(<define> (pop_Q e v x)
(<pp> `(pop ,e))
;(<pp> `(pop ,e))
(let ((v (<lookup> v)))
(<=> x ,(car (<lookup> (vector-ref v nq))))
(<set> (vector-ref v nq) (cdr (<lookup> (vector-ref v nq))))))
(<define> (touch_Q e v)
(<pp> `(touch ,e))
;(<pp> `(touch ,e))
(<recur> lp ((l (<lookup> (vector-ref (<lookup> v) nq))))
(if (pair? l)
(<and>
......@@ -48,7 +48,7 @@
<cc>)))
(<define> (read_Q e v q)
(<pp> `(read ,e))
;(<pp> `(read ,e))
(let* ((v (<lookup> v)))
(<=> q ,(car (<lookup> (vector-ref v nq))))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment