MODULE M; (*
JG, 17 Sep 85*)
FROM SYSTEM IMPORT WORD, ADDRESS, ADR;
FROM D IMPORT ObjRec, Obj, New, Open, data;
CONST m = 8; name = "Xerox PARC";
TYPE R =
RECORD
u: INTEGER; v: BOOLEAN; w: CARDINAL; ch: CHAR
END;
T = RECORD
u: ARRAY [0..7] OF BITSET;
v: RECORD p, q: BOOLEAN END
END;
M = ARRAY [0..m+1], [m+2..6*(2+m)-1] OF T;
VAR i, j, k, l :
INTEGER;
r: R; obj: Obj;
adr: ADDRESS;
pr1, pr2: POINTER TO R;
ch: CHAR;
a: ARRAY [0..m-1] OF BOOLEAN;
b: M;
c: ARRAY [-2..15] OF CHAR;
proc: PROCEDURE (INTEGER, VAR R, M, ARRAY OF CHAR);
MODULE G;
IMPORT ADR, R, M, adr, c; EXPORT n, s, t, V;
VAR n: CARDINAL; s, t, x, y: BITSET;
PROCEDURE V(m: CARDINAL; VAR r: R); CODE 111B; 111B END V;
BEGIN n := 0; adr := ADR(c)
END G;
MODULE H;
IMPORT s, t, n; EXPORT W;
PROCEDURE W(i: CARDINAL): BITSET;
BEGIN RETURN s*(t/BITSET(i)) END W;
BEGIN s := {}; t := {n}
END H;
P
ROCEDURE P(i:
INTEGER;
VAR r: R; b: M; c:
ARRAY
OF
CHAR);
VAR j, k:
INTEGER;
n: CARDINAL;
pr1, pr2: POINTER TO R;
s, t: BITSET;
ch: CHAR;
d: M;
e: ARRAY [0..100] OF CHAR;
g: ARRAY [0..3] OF RECORD
CASE ch:
CHAR
OF "a": x:
WORD; y: ObjRec |"b": z: M
END
END;
PROCEDURE Q(
VAR k:
INTEGER;
VAR u:
ARRAY
OF
CHAR);
VAR s, t: BITSET; q: INTEGER;
PROCEDURE f(i:
INTEGER):
INTEGER;
VAR j, k: INTEGER;
BEGIN j := i + j + k; RETURN i - 1
END f;
BEGIN
IF k = 0 THEN New (obj)
ELSIF (3 IN s) AND (k < 9) AND NOT (5 IN t) THEN i ← -i
ELSIF a[i] THEN a[i] := NOT a[i]
ELSE s ← s * {1, 2, 3}; j := - (k + 5)
END;
WITH r DO v := BOOLEAN(u); u := 1 - u END;
l := f(n); Q(q, u); V(n, r)
END Q;
BEGIN
New (obj); Open (obj);
data.h := s + (s - t)*t;
r.v := pr1^.v;
pr2 := pr1; pr2^ := pr1^;
adr := pr1; adr := ADR(b); adr := ADR(pr1^);
WITH g[i]
DO
IF ch = "a" THEN x := y.h ELSE z[j,k].u[i] := {0} END
END;
REPEAT
WHILE (i < 10) & ((j >= 8)
OR (k < 16))
DO
j := 49; n := 3; i := i + 1; k := i - j;
k := i DIV 8 + j MOD 8;
ch := "J";
a[2] := TRUE; a[j+1] := FALSE;
a[i] := (i <= j) & (j <= k) OR a[i+1];
a[k-2] := a[n+1];
r.v := a[(j+1)*(i-1)+3];
a[i DIV 2] := r.v;
s := {9}; t := {2..5, 7..11};
INCL(t, 17); EXCL (s, 29);
b[2, 23].u[5] := s*t;
d[i+j, k-l].v.q ← s <= t;
LOOP
IF (i < 100) & (j >= 8) OR (k < 16) THEN EXIT END;
INC(j); DEC(k);
FOR i := 1
TO k-1
DO
j := j + j;
k := (i - i)*(j + k*l*2);
WHILE (j + k < 10) & (j*(i - k) >= 8)
OR (0 < 1)
DO
WITH r DO u := u + INTEGER(w) END;
CASE i
OF
-1: i := i + 1 + 15 | 2: j := j - (34*79) | 5..8: k := 16*8*k
ELSE i := 0
END
END
END
END
END
UNTIL (10 > i) & ((j >= 8) OR (k < 16));
c [i] := c [i+1];
c := "USA"; c := e; c := c;
P(i+j, r, b, c);
Q(j, c)