Reorganize plans and rules, so that they can create a hierarchical structure e.g.
+!foo/bar(X) : X > 5 <- generic/print("larger than five").
+!foo(X) <- generic/print("master plan").
On triggering +!foo/bar(10) it shows larger than five on !foo(3) the deeper plan foo/bar is not acceptable so it searches a plan on step higher and this matches to +!foo(X) so it returns master plan.
Reorganize plans and rules, so that they can create a hierarchical structure e.g.
On triggering
+!foo/bar(10)
it showslarger than five
on!foo(3)
the deeper planfoo/bar
is not acceptable so it searches a plan on step higher and this matches to+!foo(X)
so it returnsmaster plan
.