;;;; Test input for functions that put simple ;;;; expressions in normal form. ;;;; ;;;; File: normal-x.in ;;;; Author: CS 51 (Bob Walton) ;;;; Version: 3 (load "normal-x.lsp") ---> ;; Loading file normal-x.lsp ... ;; Loading of file normal-x.lsp is finished. T (normal-1 '(+ (+ x y) z)) ---> (+ X (+ Y Z)) (normal-1 '(+ (+ w x) (+ y z))) ---> (+ W (+ X (+ Y Z))) (normal-1 '(+ (+ (+ (+ (+ u v) w) x) y) z)) ---> (+ U (+ V (+ W (+ X (+ Y Z))))) (normal-1 '(+ (+ (+ (+ (+ (+ u a) v) b) w) c) x)) ---> (+ A (+ B (+ C (+ U (+ V (+ W X)))))) (time (normal-1 '(+ (+ (+ (+ u a) v) b) w))) ---> Real time: 0.006829f0 sec. Run time: 0.006832f0 sec. Space: 3552 Bytes (+ A (+ B (+ U (+ V W)))) (time (normal-1 '(+ (+ (+ (+ (+ (+ u a) v) b) w) c) x))) ---> Real time: 0.051704f0 sec. Run time: 0.051728f0 sec. Space: 26208 Bytes (+ A (+ B (+ C (+ U (+ V (+ W X)))))) (time (normal-1 '(+ (+ (+ (+ (+ (+ (+ (+ u a) v) b) w) c) x) d) y))) ---> Real time: 0.319984f0 sec. Run time: 0.319152f0 sec. Space: 155232 Bytes (+ A (+ B (+ C (+ D (+ U (+ V (+ W (+ X Y)))))))) (time (normal-1 '(+ (+ (+ (+ (+ (+ (+ (+ (+ (+ u a) v) b) w) c) x) d) y) e) z))) ---> Real time: 2.196511f0 sec. Run time: 1.778272f0 sec. Space: 826464 Bytes GC: 1, GC time: 0.005856f0 sec. (+ A (+ B (+ C (+ D (+ E (+ U (+ V (+ W (+ X (+ Y Z)))))))) ) ) (setf *trace* t) ---> T (rr-time (normal-2 '(+ (+ (+ x a) y) b))) ---> ((+ X A) => (+ A X)) ((+ X A) => (+ A X)) ((+ (+ A X) Y) => (+ A (+ X Y))) ((+ X A) => (+ A X)) ((+ X A) => (+ A X)) ((+ (+ A X) Y) => (+ A (+ X Y))) ((+ (+ A (+ X Y)) B) => (+ A (+ (+ X Y) B))) ((+ (+ X Y) B) => (+ X (+ Y B))) ((+ Y B) => (+ B Y)) ((+ Y B) => (+ B Y)) ((+ X (+ B Y)) => (+ B (+ X Y))) ((+ (+ X Y) B) => (+ X (+ Y B))) ((+ Y B) => (+ B Y)) ((+ Y B) => (+ B Y)) ((+ X (+ B Y)) => (+ B (+ X Y))) Real time: 0.00391f0 sec. Run time: 0.003904f0 sec. Space: 28200 Bytes Number of Rewrites: 15 Number of failures to find any rewrite: 106 (+ A (+ B (+ X Y))) (setf *trace* nil) ---> NIL (setf *trace* t) ---> T (rr-time (normal-3 '(+ (+ (+ x a) y) b))) ---> ((+ X A) => (+ A X)) ((+ (+ A X) Y) => (+ A (+ X Y))) ((+ (+ A (+ X Y)) B) => (+ A (+ (+ X Y) B))) ((+ (+ X Y) B) => (+ X (+ Y B))) ((+ Y B) => (+ B Y)) ((+ X (+ B Y)) => (+ B (+ X Y))) Real time: 9.77f-4 sec. Run time: 9.76f-4 sec. Space: 12720 Bytes Number of Rewrites: 6 Number of failures to find any rewrite: 11 (+ A (+ B (+ X Y))) (setf *trace* nil) ---> NIL (rr-time (normal-2 '(+ (+ (+ (+ u a) v) b) w))) ---> Real time: 0.008798f0 sec. Run time: 0.008784f0 sec. Space: 6336 Bytes Number of Rewrites: 37 Number of failures to find any rewrite: 298 (+ A (+ B (+ U (+ V W)))) (rr-time (normal-3 '(+ (+ (+ (+ u a) v) b) w))) ---> Real time: 9.77f-4 sec. Run time: 9.76f-4 sec. Space: 1728 Bytes Number of Rewrites: 9 Number of failures to find any rewrite: 16 (+ A (+ B (+ U (+ V W)))) (rr-time (normal-2 '(+ (+ (+ (+ (+ (+ u a) v) b) w) c) x))) ---> Real time: 0.070244f0 sec. Run time: 0.070272f0 sec. Space: 47040 Bytes GC: 1, GC time: 0.006832f0 sec. Number of Rewrites: 265 Number of failures to find any rewrite: 2298 (+ A (+ B (+ C (+ U (+ V (+ W X)))))) (rr-time (normal-3 '(+ (+ (+ (+ (+ (+ u a) v) b) w) c) x))) ---> Real time: 0.001951f0 sec. Run time: 0.001952f0 sec. Space: 4032 Bytes Number of Rewrites: 21 Number of failures to find any rewrite: 31 (+ A (+ B (+ C (+ U (+ V (+ W X)))))) (rr-time (normal-2 '(+ (+ (+ (+ (+ (+ (+ (+ u a) v) b) w) c) x) d) y))) ---> Real time: 0.397054f0 sec. Run time: 0.391376f0 sec. Space: 279744 Bytes Number of Rewrites: 1553 Number of failures to find any rewrite: 14002 (+ A (+ B (+ C (+ D (+ U (+ V (+ W (+ X Y)))))))) (rr-time (normal-3 '(+ (+ (+ (+ (+ (+ (+ (+ u a) v) b) w) c) x) d) y))) ---> Real time: 0.003902f0 sec. Run time: 0.003904f0 sec. Space: 7296 Bytes Number of Rewrites: 38 Number of failures to find any rewrite: 51 (+ A (+ B (+ C (+ D (+ U (+ V (+ W (+ X Y)))))))) (rr-time (normal-2 '(+ (+ (+ (+ (+ (+ (+ (+ (+ (+ u a) v) b) w) c) x) d) y) e) z))) ---> Real time: 3.667712f0 sec. Run time: 2.149152f0 sec. Space: 1493184 Bytes GC: 3, GC time: 0.017568f0 sec. Number of Rewrites: 8225 Number of failures to find any rewrite: 75898 (+ A (+ B (+ C (+ D (+ E (+ U (+ V (+ W (+ X (+ Y Z)))))))) ) ) (rr-time (normal-3 '(+ (+ (+ (+ (+ (+ (+ (+ (+ (+ u a) v) b) w) c) x) d) y) e) z))) ---> Real time: 0.00586f0 sec. Run time: 0.005856f0 sec. Space: 11520 Bytes Number of Rewrites: 60 Number of failures to find any rewrite: 76 (+ A (+ B (+ C (+ D (+ E (+ U (+ V (+ W (+ X (+ Y Z)))))))) ) )