The program on file norma-int.sim, is an interpreter written in Scheme
for a miniature flow chart language with only two variables, x and
y. Program input is through x, and output is the final value of
y. Following is the interpreted language's program syntax:

	Program ::= (I0 I1 ... In-1)

	I       ::= x:=x+1 | x:=x-1 | y:=y+1 | y:=y-1
		 |  (goto Label) | (ifx=0goto Label) | (ify=0goto Label)

	Label   ::= 0 | 1 | ... (Label >= n causes program termination)

The static program input is a file called pgm.norma, which is

	(ifx=0goto 5)
	y:=y+1 
	y:=y+1
	x:=x-1
	(goto 0)

;-----------------------------------------------------------------------------

(load "norma-int.sim")

(define pgm (file->list "pgm.norma"))

(ntimes (lambda() (apply execute `(,pgm 4 0))) 100)

(preprocess! `execute `(s d d) "norma-int.sim")

(writelpp (showpall) "temp%%%")

(writelpp (showpallflow) "temp%%%")

(displayflow 9)
(writelpp (showpallflowid) "temp%%%")

(similix `(,pgm *** ***))

(similix `execute `(,pgm *** ***) "norma-int")

(similix `execute `(,pgm *** ***) "norma-int" "pgm.sim" 'pp)

(load-residual-program)
(ntimes (lambda() (apply execute-0 `(4 0))) 10)

(cogen `execute `(s d d) "norma-int" "norma-com.sim" 'pp)

(comp "norma-com.sim" `(,pgm *** ***) "pgm.sim" 'pp)

;-----------------------------------------------------------------------------


