diff --git a/C/cdmgr.c b/C/cdmgr.c index 82f854a02..c55317e05 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -11,8 +11,11 @@ * File: cdmgr.c * * comments: Code manager * * * -* Last rev: $Date: 2005-04-10 04:01:10 $,$Author: vsc $ * +* Last rev: $Date: 2005-04-20 04:02:15 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.155 2005/04/10 04:01:10 vsc +* bug fixes, I hope! +* * Revision 1.154 2005/03/04 20:30:11 ricroc * bug fixes for YapTab support * @@ -1774,7 +1777,7 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref) if (pflags & LogUpdatePredFlag) { tf = MkDBRefTerm((DBRef)ClauseCodeToLogUpdClause(cp)); } else { - tf = Yap_MkStaticRefTerm((StaticClause *)cp); + tf = Yap_MkStaticRefTerm(ClauseCodeToStaticClause(cp)); } if (*t4ref != TermNil) { if (!Yap_unify(*t4ref,tf)) { @@ -1841,7 +1844,6 @@ Yap_EraseStaticClause(StaticClause *cl, Term mod) { } else { yamop *ncl = cl->ClNext->ClCode; ap->cs.p_code.FirstClause = ncl; - ncl->opc = Yap_opcode(_try_me); ap->cs.p_code.TrueCodeOfPred = ncl; ap->OpcodeOfPred = ncl->opc; @@ -1858,8 +1860,6 @@ Yap_EraseStaticClause(StaticClause *cl, Term mod) { ocl->ClNext = cl->ClNext; if (cl->ClCode == ap->cs.p_code.LastClause) { ap->cs.p_code.LastClause = ocl->ClCode; - if (ap->cs.p_code.NOfClauses > 1) - ocl->ClCode->opc = Yap_opcode(_trust_me); } } if (ap->cs.p_code.NOfClauses == 1) { diff --git a/C/init.c b/C/init.c index 3a2ef209e..08e242cc5 100644 --- a/C/init.c +++ b/C/init.c @@ -1050,7 +1050,7 @@ InitCodes(void) Yap_heap_regs->functor_portray = Yap_MkFunctor(AtomPortray, 1); Yap_heap_regs->functor_query = Yap_MkFunctor(AtomQuery, 1); Yap_heap_regs->functor_creep = Yap_MkFunctor(AtomCreep, 1); - Yap_heap_regs->functor_static_clause = Yap_MkFunctor (Yap_FullLookupAtom("$startic_clause"), 1); + Yap_heap_regs->functor_static_clause = Yap_MkFunctor (Yap_FullLookupAtom("$static_clause"), 1); Yap_heap_regs->functor_stream = Yap_MkFunctor (AtomStream, 1); Yap_heap_regs->functor_stream_pos = Yap_MkFunctor (AtomStreamPos, 3); Yap_heap_regs->functor_stream_eOS = Yap_MkFunctor (Yap_LookupAtom("end_of_stream"), 1); diff --git a/CLPBN/clpbn.yap b/CLPBN/clpbn.yap index cb2678e1b..39801b238 100644 --- a/CLPBN/clpbn.yap +++ b/CLPBN/clpbn.yap @@ -124,7 +124,7 @@ get_keys([], []). get_keys([V|AVars], [K-V|KeysVars]) :- get_atts(V, [key(K)]), !, get_keys(AVars, KeysVars). -get_keys([V|AVars], KeysVars) :- % may be non-CLPBN vars. +get_keys([_|AVars], KeysVars) :- % may be non-CLPBN vars. get_keys(AVars, KeysVars). merge_same_key([], [], _, []). @@ -228,7 +228,7 @@ bind_clpbn(_, Var, _, _, _, _) :- use(vel), check_if_vel_done(Var), !. bind_clpbn(T, Var, Key0, _, _, _) :- - get_atts(Var, [key(Key0)]), !, + get_atts(Var, [key(Key)]), !, ( Key = Key0 -> true ; diff --git a/library/ordsets.yap b/library/ordsets.yap index 7f1da8f68..9b3e51b04 100644 --- a/library/ordsets.yap +++ b/library/ordsets.yap @@ -176,7 +176,7 @@ ord_intersection(>, Head1, Tail1, _, Tail2, Intersection) :- % is true when Intersection is the ordered representation of Set1 % and Set2, provided that Set1 and Set2 are ordered sets. -ord_intersection(L, [], [], []) :- !. +ord_intersection(_, [], [], []) :- !. ord_intersection([], L, [], L) :- !. ord_intersection([Head1|Tail1], [Head2|Tail2], Intersection, Difference) :- compare(Order, Head1, Head2), @@ -184,7 +184,7 @@ ord_intersection([Head1|Tail1], [Head2|Tail2], Intersection, Difference) :- ord_intersection(=, Head, Tail1, _, Tail2, [Head|Intersection], Difference) :- ord_intersection(Tail1, Tail2, Intersection, Difference). -ord_intersection(<, Head1, Tail1, Head2, Tail2, Intersection, Difference) :- +ord_intersection(<, _, Tail1, Head2, Tail2, Intersection, Difference) :- ord_intersection(Tail1, [Head2|Tail2], Intersection, Difference). ord_intersection(>, Head1, Tail1, Head2, Tail2, Intersection, [Head2|Difference]) :- ord_intersection([Head1|Tail1], Tail2, Intersection, Difference).