Download
language Essence 1.3
$ this .param file describes the full-adder example from csplib.org/Problems/prob042
$ GATE FUNCTIONS
letting OR be function(
[true, true] --> true,
[true, false] --> true,
[false, true] --> true,
[false, false] --> false
)
letting AND be function(
[true, true] --> true,
[true, false] --> false,
[false, true] --> false,
[false, false] --> false
)
letting XOR be function(
[true, true] --> false,
[true, false] --> true,
[false, true] --> true,
[false, false] --> false
)
$ OTHER PARAMS
letting numGates be 5
$ define function of each gate
letting gateFuncs be function(
1 --> XOR,
2 --> AND,
3 --> XOR,
4 --> AND,
5 --> OR
)
$ define inputs to each gate
$ -1 indicates false external input
$ 0 indicates true external input
$ external inputs CANNOT be faulty
letting gateInpts be function(
1 --> [-1, -1],
2 --> [-1, -1],
3 --> [-1, 1],
4 --> [-1, 1],
5 --> [2, 4]
)
$ define observed outputs, not expected outputs
letting finalOutputs be function(
3 --> true,
5 --> false
)