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];
};