It's probably worth actually analyzing what meaning the current logic
type actually conveys. IMO it's a complex object which actually has
multiple orthogonal values -
Logic Value - 1,0 (bool)
Certainty - known/unknown (bool) 0 => X
Strength - Supply... (enum) 0 => Z
and for a driver -
Active - On/Off (bool) Off => Z
If you want to determine the value you start with whether the driver is
active, if it is you look for a non-zero strength, if it has that you
look for a non-zero certainty, and then you can take the 1/0 value.
If you view logic as a type templated on <bool,bool,enum>, then you
could use the same template to create other types e.g. wreal might be
<real,bool,1> (using just active/inactive for Z).
The reason for viewing things this way is that in a cross-type
resolution (as in D2As) you can't do anything with Xs and Zs, so it's
useful to be able to access the "value" part of the signal if certainty
is not 100%.
Just more food for thought,
Kev.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Sep 8 12:46:46 2010
This archive was generated by hypermail 2.1.8 : Wed Sep 08 2010 - 12:46:48 PDT