Is it true that in NuSMV there is no value like NULL, nil, None?
And that we should not make a model for a process because the models should repesent electronic circuits?
My scenario is that I have one UART connector, a main memory and a process where the latter reads and writes to main memory and read and write to the UART. In the main memory there is data named K
that should stay the same. We want to prove that if the process doesn't write to K' then the value of
K` equals its next value.
I wonder if my model is fine-grained enough or if it is too abstract. Also if I used the right data types.
MODULE UART (proc, output, input)
VAR state : {idle, receive, transmit};
Rx : unsigned word [ 8 ]; --vector of bytes
Tx : unsigned word [ 8 ];
ASSIGN
next (Rx) :=
case
proc = read : input; TRUE : (Rx);
esac;
next (Tx) :=
case
proc = write : output; TRUE : (Tx);
esac;
next (state) :=
case
proc = write : receive; proc = read : transmit; TRUE : idle;
esac;
TRANS
proc != read -> next (Rx) = Rx;
MODULE MEM (proc, input, output)
VAR K : unsigned word [ 8 ]; data : array 0 .. 7 of array 0 .. 7 of unsigned word [ 8 ];
ASSIGN
init (data[1][0]) := K;
next (K) :=
case
output = data[1][0] : output;
TRUE : K;
esac;
MODULE main
VAR proc : {idle, read, write}; input : unsigned word [ 8 ];
output : unsigned word [ 8 ];
memory : MEM (proc, input, output);
uart0 : UART (proc, input, output);
ASSIGN init (input) := memory.data[0][0]; init (output) := memory.data[0][0];
LTLSPEC G (output != memory.data[1][0]) -> G (memory.K = next (memory.K))