Availability:built-in
expand_goal(+Goal1,
-Goal2)This predicate is normally called by the compiler to perform
preprocessing using goal_expansion/2.
The predicate computes a fixed-point by applying transformations until
there are no more changes. If optimisation is enabled (see -O
and
optimise), expand_goal/2
simplifies the result by removing unneeded calls to true/0
and fail/0
as well as unreachable branches.