Note that the code above was compiled as traceable, which means that it can be traced using the built-in debugger or using the programmable debugger OPIUM. To obtain maximum efficiency, the directive nodbgcomp should be used, which will set some flags to produce a more efficient and shorter code
[eclipse 2]: nodbgcomp. yes. [eclipse 3]: [user]. father(abraham, isaac). father(isaac, jacob). father(jacob, joseph). ancestor(X, Y) :- father(X, Y). ancestor(X, Y) :- ancestor(X, Z), ancestor(Z, Y). user compiled optimized 396 bytes in 0.02 seconds yes. [eclipse 4]: