[PPL-devel] Re: [Xsb-development] read_term/2
bagnara at cs.unipr.it
Wed Aug 7 11:21:15 CEST 2002
Bart Demoen wrote:
> look in xsb_read.P
> there is something like file_read/3 with 3th arg the var list
> in a particular form
> it would be better to have this in the ISO way, but the functionality is there
Here is the hack I am using, in case others are interested.
:- import file_read/3 from xsb_read.
read_term(Term, [variable_names(VN)]) :-
file_read(0, Term, L),
convert_variable_names_list(L, VN) :-
VN = .
convert_variable_names_list([A|L], [Name=Var|VN]) :-
A =.. [_, Name, Var],
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
mailto:bagnara at cs.unipr.it
More information about the PPL-devel