Process INV(Bool ia, ix) { static Bool a,x static Process INV1 { INV1 <- (a.0 x.1)INV1 + (a.1 x.0)INV1 } return INV1[ia/a,ix/x] } Process AND2(Bool ia, ib, ix) { static Bool a,b,x static Process AND { AND <- (a.0 b.0 x.0)AND + (a.1 b.0 x.0)AND + (a.0 b.1 x.0)AND + (a.1 b.1 x.1)AND } return AND[ia/a, ib/b, ix/x] } Process OR2(Bool ia, ib, ix) { static Bool a, b, x static Process OR { OR <- (a.0 b.0 x.0)OR + (a.1 b.0 x.1)OR + (a.0 b.1 x.1)OR + (a.1 b.1 x.1)OR } return OR[ia/a, ib/b, ix/x] } Process DFF(Bool id, Event iclk, Bool iq, bool Hi) { static Bool d,q static Event clk static Process D00, D01, D10, D11 { D00 <- (d.0 q.0)D00 + (d.1 q.0)D10 + (d.0 clk q.0)D00 D10 <- (d.0 q.0)D00 + (d.1 q.0)D10 + (d.1 clk q.0)D11 D01 <- (d.1 q.1)D11 + (d.0 q.1)D01 + (d.0 clk q.1)D00 D11 <- (d.1 q.1)D11 + (d.0 q.1)D01 + (d.1 clk q.1)D11 } return (Hi ? D11 : D00)[id/d, iq/q, iclk/clk] }