import "StandardLibrary" mapping relation Fib Integer Integer rule FibRecurrence where @when Fib ?n ?a Fib (?n+1) ?b ?n < 20 @where Fib (?n+2) (?a + 1) rule PrintIt where @when Fib ?n ?a @to Execute (print "\(?n) -> \(?a)") main = transformation OneShotForward where Fib 0 1 Fib 1 1 -- 21 -> 11 20 -> 11 19 -> 10 18 -> 10 17 -> 9 16 -> 9 15 -> 8 14 -> 8 13 -> 7 12 -> 7 11 -> 6 10 -> 6 9 -> 5 8 -> 5 7 -> 4 6 -> 4 5 -> 3 4 -> 3 3 -> 2 2 -> 2 1 -> 1 0 -> 1 ()