Merge branch 'master' of ../yap-6.2

This commit is contained in:
Vítor Santos Costa 2010-12-07 18:21:50 +00:00
commit b086d8b5cd
4 changed files with 9 additions and 7 deletions

View File

@ -242,9 +242,10 @@ Yap_ReOpenLoadForeign(void)
{
ForeignObj *f_code = ForeignCodeLoaded;
Term OldModule = CurrentModule;
YapInitProc InitProc = NULL;
while (f_code != NULL) {
YapInitProc InitProc = NULL;
CurrentModule = f_code->module;
if(Yap_ReLoadForeign(f_code->objs,f_code->libs,f_code->f,&InitProc)==LOAD_SUCCEEDED) {
if (InitProc)

View File

@ -9578,10 +9578,9 @@ plus_if_pos(X,Y,Z) :- Y > 0, Z is X + Y.
vars(X, Y, [X|Y]) :- var(X), !.
vars(_, Y, Y).
trans(TermIn, TermOut) :-
(compound(TermIn) ; atom(TermIn)),
nonvar(TermIn),
TermIn =.. [p|Args],
TermOut =..[q|Args],
!.
TermOut =..[q|Args], !.
trans(X,X).
%success
@ -9592,8 +9591,8 @@ selectlist(<(0), [-1,0,1], [1]).
convlist(plus_if_pos(1), [-1,0,1], [2]).
sumlist(plus, [1,2,3,4], 1, 11).
mapargs(number_atom,s(1,2,3), s('1','2','3')).
sumargs(vars, s(1,X,2,Y), [], [Y,X]).
mapnodes(trans, p(a,p(b,a),c), q(a,q(b,a),c)).
sumargs(vars, s(1,X,2,Y), [], [Y,X]).m
apnodes(trans, p(a,p(b,a),c), q(a,q(b,a),c)).
checknodes(\==(T), p(X,p(Y,X),Z)).
sumnodes(vars, [c(X), p(X,Y), q(Y)], [], [Y,Y,X,X]).
% another one

View File

@ -206,7 +206,7 @@ sumargs_args(Pred, Term, A1, A3, N) :-
sumargs_args(Pred, Term, A2, A3, N1).
mapnodes(Pred, TermIn, TermOut) :-
(atomic(TermIn); var(TermOut)), !,
(atomic(TermIn); var(TermIn)), !,
call(Pred, TermIn, TermOut).
mapnodes(Pred, TermIn, TermOut) :-
call(Pred, TermIn, Temp),

View File

@ -43,6 +43,8 @@
utf8_position_memory_file/3 % +Handle, -Here, -Size
]).
:- expects_dialect(swi).
:- use_module(library(shlib)).
:- use_foreign_library(foreign(memfile)).