sample:
circuit
inputs
a,b,c
outputs
d,e,f
g1:
and
(a,b),i1
g2:
or
(c,i1),d
g3:
nand
(b,c),e
g4:
xor
(a,b,c),f
endcircuit