diff --git a/CLPBN/clpbn/evidence.yap b/CLPBN/clpbn/evidence.yap index 05fe50b7c..93b361882 100644 --- a/CLPBN/clpbn/evidence.yap +++ b/CLPBN/clpbn/evidence.yap @@ -25,9 +25,9 @@ :- dynamic node/4, reachable_from_evidence/2, evidence/2. % -% new evidence storagea algorithm. The idea is that instead of +% new evidence storage algorithm. The idea is that instead of % redoing all the evidence every time we query the network, we shall -% keep a precompiled version around. The precompiled +% keep a precompiled version around. % % the format is as follows: % evidence_store:parent(Key,ParentList,[EvidenceChildren]) diff --git a/pl/debug.yap b/pl/debug.yap index db2c2593a..8a6aba3b3 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -459,15 +459,14 @@ debugging :- '$action'(10,_,_,_,_) :- % newline creep ( recorded('$spy_skip',_,R), erase(R), fail ; true ), '$set_yap_flags'(10,1). -'$action'(33,_,_,_,_) :- !, % ! g execute +'$action'(0'!,_,_,_,_) :- !, % ! g execute read(user,G), % don't allow yourself to be caught by creep. '$access_yap_flags'(10, CL), '$set_yap_flags'(10, 0), ( '$execute'(G) -> true ; true), '$set_yap_flags'(10, CL), - !, - '$skipeol'(33), +% '$skipeol'(0'!), fail. '$action'(0'<,_,_,_,_) :- !, % -2, X < 256. atom_concat(X,Y,At) :- - var(X), var(Y), !, - atom_length(At,Len), - '$atom_contact_split'(At,0,Len,X,Y). -/* Let atom_chars do our error handling */ -atom_concat(X,Y,At) :- - atom_concat([X,Y],At). + ( + nonvar(X), nonvar(Y) + -> + atom_concat([X,Y],At) + ; + atom(At) -> + atom_length(At,Len), + '$atom_contact_split'(At,0,Len,X,Y) + ; + var(At) -> + '$do_error'(instantiation_error,atom_concat(X,Y,At)) + ; + '$do_error'(type_error(atom,At),atomic_concant(X,Y,At)) + ). atomic_concat(X,Y,At) :- - var(X), var(Y), !, - atom_length(At,Len), - '$atom_contact_split'(At,0,Len,X,Y). -/* Let atom_chars do our error handling */ -atomic_concat(X,Y,At) :- - atomic_concat([X,Y],At). + ( + nonvar(X), nonvar(Y) + -> + atomic_concat([X,Y],At) + ; + atom(At) -> + atom_length(At,Len), + '$atom_contact_split'(At,0,Len,X,Y) + ; + number(At) -> + number_codes(At,Codes), + '$append'(X0,Y0,Codes), + name(X,X0), + name(Y,Y0) + ; + var(At) -> + '$do_error'(instantiation_error,atomic_concat(X,Y,At)) + ; + '$do_error'(type_error(atomic,At),atomic_concant(X,Y,At)) + ). '$atom_contact_split'(At,Len,Len,X,Y) :- !, '$atom_split'(At,Len,X,Y).