Hello,

another question concerning Pilog. Suppose following senseless Prolog snippet:

  t1(1).
  t1(2).
  t1(3).

  t2(4).
  t2(5).
  t2(6).

  aT(N) :- t1(N).
  aT(N) :- t2(N).

  bT(N) :- t1(N) ; t2(N).

Here the predicate aT/1 may be rewritten using the ';' operator as in bT/1. Now I have found, that Pilog offer a 'or' rule. But it seems, this does not resemble ';' of Prolog. Suppose the Pilog translation of the code above:

  (be t1 (1))
  (be t1 (2))
  (be t1 (3))

  (be t2 (4))
  (be t2 (5))
  (be t2 (6))

  (be aT (@N) (t1 @N))
  (be aT (@N) (t2 @N))

  (be bT (@N)
    (or (t1 @N) (t2 @N)))

Now calling (? (aT @N)) is running like the Prolog version and therefore as I expected. But running (? (bT @N)) will return NIL at once.

So I would like to ask, if 'or' works as intended or if there is a bug?


Thanks in advance and ciao,
Cle.

--
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe

Reply via email to