Hello,
I'm using GNU Prolog for my research. But there some problem with my program, which
puzzled me for a long time. Here is the source code of my program, after compiled to
executable file, the result is " user directive failed". Can anyone help me
locate the error in my program? Thanks!
q(OUTPUTS):-
get_fd_labeling(Lab),
statistics(runtime, _),
temp(Lab,INPUTS,OUTPUTS),
statistics(runtime, [_,Y]),
write(OUTPUTS), nl,
write(INPUTS), nl,
write('time: '), write(Y), nl.
/*----------- Model definition -----------*/
temp(Lab, INPUTS, OUTPUTS):-
OUTPUTS = [out],
INPUTS = [a, b],
/*---- Domains for integers ----*/
fd_domain(a, 0, 1),
fd_domain(b, 0, 1),
fd_domain(out, 0, 1),
out #<=> a #= b,
lab(Lab, INPUTS).
/*----------- End of model definition -----------*/
lab(normal,L):-
fd_labeling(L).
lab(ff,L):-
fd_labelingff(L).
get_fd_labeling(Lab):-
argument_counter(C),
get_labeling1(C,Lab).
get_labeling1(1,normal).
get_labeling1(2,Lab):-
argument_value(1,Lab).
:-initialization(q([1])).
--
Ce message a subi une analyse antivirus
par MailScanner ; il est vraisemblablement
sans danger.
------------------------------------------------------------------------
_______________________________________________
Users-prolog mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/users-prolog