Commits

Pierre Carbonnelle committed d8e4e21 Draft

edit

Comments (0)

Files changed (1)

     split(X, Y,Z) <= (X == Y+'-'+Z)
     split(X, Y,Z) <= (Y == (lambda X: X.split('-')[0])) & (Z == (lambda X: X.split('-')[1]))
 """)
+
+from pyDatalog import pyEngine
+pyEngine.Trace = True
+print(pyDatalog.ask("split('1-2',X,Y)"))
 }}}
 
+{{{pyEngine.Trace = True}}} activates the Trace mode for debugging of the datalog program: facts discovered by the engine during execution of queries will be shown on the console.  
+
 The following example illustrates the fact that predicate can be negated and that the depth of recursion is not limited.
 
 {{{