有同学问我以下 circuit sat 的问题:
=========================================================================
For example, a 2-input AND gate(output: a, fan-in: x,y ) with the watched
list of (a, x),
First we give that a = 0, watched list become (x,y) ;
Then what will watched list to be if we give that x = 0? (y) or (x,y) ?
If it's (y), will the watched list become empty set if we give that y = 1 ?
(If it wasn't (y), this question needn't to be replied)
Similar to say, does the watched list have to maintain exactly 2 elements or
it can maintain less 2 element?
==========================================================================
For 2-watch scheme, the number of watch pointer needs to be 2 at all time.
When x is assigned to 0, nothing will happen because the watch value of
an AND gate's input is 1. That is, x will put a on its "watching-1 list"
but on "watching-0" list. So when x is assigned to 0, nothing will happen to
gate a.
On the other hand, if x is assigned to 1, x will call a's updateWatch()
because a is in x's watching-1 list. Since there is no more in/out pin on a
that can become watch pointer, the other watch pin, y, will get the implied
value 0.
Hope this is clear.