Trivial Prolog in Java

01: package ca.draisey.free.tprolog;
02:
03:
04:
05:
06:
07: // -- the required hook for a single object that traces the execution of the interpreter --
08: abstract class Succession extends Monitor {
09:         // inherits monitor() throws MonitorException
10:         // overriden by the implementing database
11:         abstract void queryDatabase( final Term goal, final Variables goals, final Successor success );
12:         abstract class SuccessionSuccessor extends Successor {
13:                 {
14:                         monitor();
15:                 }
16:                 final Succession succession()
17:                 {
18:                         return Succession.this;
19:                 }
20:         }
21: }
22:
23: // fin