Consider these five pilog assertions.

(be do ((Question @P) @S @S) (holds @P @S))

(be holds (@A @S)
   (restoreSitArg @A @S @F)
   (2 cons (-> @F)))

(be On (3 s0))
(be On (5 s0))

(be restoreSitArg ((On @N) @S (On @N @S)))

I define some tests.

(de t_1 () # ok
  (? holds On restoreSitArg (holds (On @N) s0))  )

(de t_2 () #  ?
  (? do holds On restoreSitArg (do (Question (On @N)) s0 s0))  )

Run the first one.

1 (holds (On @N) s0)
1 (restoreSitArg (On @N) s0 (On @N s0))
1 (On 3 s0)
2 (On 5 s0)
-> NIL

Ok, in that first test, I asked for solutions to (holds (On @N) s0)), tracing 

Those are solutions I would expect, and they are correct. 

Second test.

1 (do (Question (On @N)) s0 s0)
1 (holds (On @N) s0)
1 (restoreSitArg (On @N) s0 (On @N s0))
1 (On 3 s0)
2 (On 5 s0)
-> NIL

Now here, (holds (On @N) s0) is also attempted to be proved - because it is a 
sub-goal of (do (Question (On @N)) s0 s0).

My question is, why the difference when (holds (On @N) s0) is proved? 

In one case solutions are found, in the other case it seems to miss the same 
solutions to the same goal. 




Reply via email to