<> <> <> DIRECTORY AlpsBool, Convert, PW, Rope; AlpsDecoder: CEDAR PROGRAM IMPORTS AlpsBool, Convert, PW, Rope = BEGIN OPEN AlpsBool; Decoder: PUBLIC PROC [] RETURNS [table: AlpsBool.TableOfVariables] = { pBar, gBar: AlpsBool.Expression _ AlpsBool.true; a, b: AlpsBool.Expression; plus, or, and, xor: AlpsBool.Expression; table _ AlpsBool.InitTableOfVariables[4+1]; table[1].name _ "a"; table[2].name _ "b"; table[3].name _ "op1"; table[4].name _ "op2"; a _ Var[1]; b _ Var[2]; plus _ And[table, Var[3], Var[4]]; xor _ And[table, Not[Var[3]], Var[4]]; and _ And[table, Var[3], Not[Var[4]]]; or _ And[table, Not[Var[3]], Not[Var[4]]]; pBar _ If[table, plus, Xor[table, a, Not[b]], pBar]; gBar _ If[table, plus, Or[table, Not[a], Not[b]], gBar]; pBar _ If[table, or, Nor[table, a, b], pBar]; pBar _ If[table, and, Not[And[table, a, b]], pBar]; pBar _ If[table, xor, Xor[table, a, Not[b]], pBar]; AlpsBool.AddOutput[table, NEW[AlpsBool.OutputRec _ [expr: pBar, name: "pBar"]]]; AlpsBool.AddOutput[table, NEW[AlpsBool.OutputRec _ [expr: gBar, name: "gBar"]]]; }; <<>> <> <> <> <> <> <> <> <> <> <> <> <> <<>> <> <> <<>> <> <> <<>> <> <> <> <<>> <> <> <<>> <<};>> END. <<>>