vm-disj2.scm compiles to the prolog VM

parent 726a8195
......@@ -149,7 +149,7 @@ variables is the most difficult part to maintain
v))
(define (pp x y)
(format #t "~a ~a~%" x y)
;(format #t "~a ~a~%" x y)
y)
......
(compile-prolog-string "
(<define> (mksym x) (<=> x (gensym "tag")))
(compile-prolog-string "
cat(F,G) :-
catch(F,Er,
(
......@@ -101,7 +102,8 @@ goal(X,Y,First,Lab,Tail,Out,A,Ae,Aq,S0,[U|UU],V,L,LL,LG,LLX) :-
A1q=Ae
);
(
set_F(V,scm[(gensym \"tag\")]),
mksym(Sym),
set_F(V,Sym),
(Ae == A1q -> true ;
throw(all_disjuction_goals_needs_the_same_begin_level))
)
......@@ -172,6 +174,5 @@ compile_disjunction(Y,First,Aq,Ae,Out,Lab,A,Tail,S0,U,V,[L,LL]) :-
Er=softie(_) -> throw(#f) ; throw(Er)
)
)).
")
......@@ -15,8 +15,8 @@
#;
(eval-when (compile)
(prolog-run-rewind 1 (x)
(dyntrace (@@ (logic guile-log guile-prolog vm vm-handle)
handle))))
(dyntrace (@@ (logic guile-log guile-prolog vm vm-goal)
compile_goal))))
(compile-prolog-string
"
......
......@@ -63,7 +63,7 @@ compile_goal(Code,Iout,StackSize,Narg,Constants,Pretty) :- !,
get_M(V,StackSize),
handle_all(L,LL),
(var(Constants)->Constants=scm[(get-consts)];true),
write(LL),nl,!,
% write(LL),nl,!,
(Pretty==#t -> Iout=LL ; (b_setval(pretty,#f),mmtr(LL,Iout))).
compile_goal(X,Tail,V,L) :- var_p(X),!,
......
......@@ -630,7 +630,6 @@
(else
a))))))
(ppp a)
(set! match-map (make-hash-table))
(scan-var add-exvar a)
......
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