[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recursive structures...
From: |
Daniel Diaz |
Subject: |
Re: Recursive structures... |
Date: |
Thu, 01 Feb 2001 12:12:38 +0100 |
Hi,
In my version of GNU Prolog this does not kill the interpreter but triggers a
syntax error. 2 reasons:
1) : is not a predefined operator in GNU Prolog (: is generally used for
module
prefix and there is not yet a module support in GNU Prolog.
You can fix this adding at the beginning of your Prolog source a directive
to add such an operator using
:- op(550, xfy, :).
2) a variable is used as a functor (which is not allowed, a functor must be
an
atom. This occurs in X(a:in, b:out, c:_q).
address@hidden said:
> Hello!
> I'm trying to run such a predicate:
> rs:- _qbar=nand:X(a:in, b:out, c:_q),
> _q=nand:X(e:in, f:out, g:_qbar) % just for example
> assertz(genl(_qbar)),
> assertz(genl(_q)).
> It just kills gprolog interpreter, leaving core dump and message about
> segfault. Can somebody give me a hint on how to create such structures
> in GNU Prolog, or how such structures can be replaced with
> alternative...
> Thanks in advance.
--
===============================================
Daniel Diaz
University of Paris 1 INRIA Rocquencourt
75013 Paris FRANCE 78153 Le Chesnay FRANCE
web: http://pauillac.inria.fr/~diaz
email: address@hidden
===============================================
- Re: Recursive structures...,
Daniel Diaz <=