<> <> <> <> <<>> DIRECTORY CoreBoole, Rope; CoreBooleTest: CEDAR PROGRAM IMPORTS CoreBoole = BEGIN OPEN CoreBoole; <> Decoder: PUBLIC PROC [] RETURNS [result: Expression] = { pBar: Expression _ true; gBar: Expression _ true; a, b, c, d: Expression; plus, or, and, xor: Expression; a _ Var["a"]; b _ Var["b"]; c _ Var["c"]; d _ Var["d"]; plus _ And[c, d]; xor _ And[Not[c], d]; and _ And[c, Not[d]]; or _ And[Not[c], Not[d]]; pBar _ If[plus, Xor[a, Not[b]], pBar]; gBar _ If[plus, Or[Not[a], Not[b]], gBar]; pBar _ If[or, Nor[a, b], pBar]; pBar _ If[and, Not[And[a, b]], pBar]; pBar _ If[xor, Xor[a, Not[b]], pBar]; result _ And[gBar, pBar]; }; END.