Programs can often be made more readable by the placing of cuts as early as
possible in clauses. For example, consider the predicate
p/0 defined by
p :- a, b, !, c, d. p :- e, f.
b/0 is a test that determines which
a/0 may or may not be a test, but
not supposed to fail under any circumstances. A cut is most appropriately
placed after the call to
b/0. If in fact
the test and
b/0 is not supposed to fail, then it would be much clearer
to move the cut before the call to
A tool to aid in determinacy checking is included in the
directory. It is described in depth in bas-eff-det.