user"goal_expansion/3

user"goal_expansion(+ G,+ M,- NG)*

also available: Module:goal_expansion(+ G,+ M,- NG)

YAP supports goal_expansion//33. This is an user-defined procedure that is called after term expansion when compiling or asserting goals for each sub-goal in a clause. The first argument is bound to the goal and the second to the module under which the goal G will execute. If goal_expansion//33 succeeds the new sub-goal NG will replace G and will be processed in the same way. If goal_expansion//33 fails the system will use the defaultyap+flrules.