next up previous contents
Next: 3.2.7 Footening Up: 3.2 The bastron transformers Previous: 3.2.5 Deanonymization

3.2.6 Normalizing


Normalizing (command: normalize) performs several partial-evaluation-like transformations such as the propagation of passive right-hand sides of is-calls [Kra91].

For example, the constant V-binding in

 f(V,W) :- V is a & V.
leads to
f(a,W) :- & a.

Sample dialog (only after flatter can normalize operate):

rfi-p> az f(k[]) :- g(h()) & j(k[]).
rfi-p> normalize
rfi-p> listing
f(k[]) :- g(h()) & j(k[]).
rfi-p> flatter
rfi-p> listing
f(_1) :- _1 is k[], _2 is h(), g(_2), _3 is k[] & j(_3).
rfi-p> normalize
rfi-p> listing
f(_1) :- _1 is k[], _2 is h(), g(_2) & j(_1).

Harold Boley (