"call" and PrologIV (PrologIA) 
Author Message
 "call" and PrologIV (PrologIA)

Dear colleagues,

PrologIV properly deals with "call" in the command line:

Quote:
>> call(0 ~ ge(1-K)), call(0 ~ le(1-K)).

K = 1.

but fails in the following program:

% begin program source

processfile(In):-
  read_term(In, Term, [variables(Vars)]),
  process(In,Term).

process(In,end_of_file):-!.

process(In,Term):-
  prove(Term),!,
  write("true"),nl, processfile(In).

process(In,Term):-
  write("false"),nl,
  processfile(In).

prove([]) :- !.

prove([Goal1 | Goal2]):- !,
  prove(Goal1),
  prove(Goal2).

prove(Goal) :-
  call(Goal).

program :- open("file.p4",read,In),
           processfile(In),
           close(In).

% end program source

being the contents of "file.p4":

[0 ~ ge(1-K), 0 ~ le(1-K)].

Can anyone of you see the problem?

Cheers,

Augusto.

-------------------------------------------------------------------
Augusto Burgueno         CERT  BP 4025  31055 Toulouse cedex France
tel: (+33) (0)5 62 25 26 61             fax: (+33) (0)5 62 25 25 93



Sat, 10 Jul 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

2. Followup to "Fortran calling "c", and "c" calling Fortran

3. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

4. Parsing ""D""?

5. "Fifth", "Forth", zai nar?

6. Ruby "finalize", "__del__"

7. beginners "let"/"random" question

8. ANNOUNCE: new "plus"- and "dash"-patches available for Tcl7.5a2/Tk4.1a2

9. Looking for "stdin", "stdout"

10. Fortran calling "c", and "c" calling Fortran

11. Fortran calling "c", and "c" calling Fortran

 

 
Powered by phpBB® Forum Software