next up previous contents
Next: Evaluating declare facts Up: 3.1.1 undeclare Previous: 3.1.1 undeclare

Transforming sg definitions

The transformation of operators which contain sg definitions is shown in the following example, a definition of Fibonacci numbers working on both ordinary integers and their successor representation.

Applying undeclare to this operator transforms each sg definition into an ordinary (ft) clause which calls an operator fib.n ( tex2html_wrap_inline2803 ). The definitions of fib.n are obtained simply by renaming the original fib clauses, using fib.1 for the first sg-block, fib.2 for the second, and fib.3 for the third.



Harold Boley (