|
SearchNavigationUser login |
state space explosion
|
||||
The development of this site is supported by the National Science Foundation under Computing Research Infrastructure Grant No. 0707612.
Theme originally designed by Chris Herberte
fact properStateTransitions {
all s: State - State.last |
transition[s,s.next]
}
fact completeTraces {
all s: State |
one s.next iff transitionPossible[s]
}
Is there a more efficient pattern for the performance?
1. You will get much better performance if you write the constraints in a way that allows the analyzer to construct "partial instances". Just write a parameterless function to assign a value to each of the relations of the static architecture
enum A {a1, a2, a3}
enum B {b1, b2, b3}
fun r[] : A -> B { a1->b2 + a2->b3 }
2. Do use the Alloy ordering module. It will fire built-in symmetry breaking, which will dramatically improve performance. It will also ensure that the states in the trace are named s0, s1, etc. To avoid the problem of having to fill out the traces, just write your spec to allow early termination (by stuttering, so that a state can repeat at the end).
3. There is an experimental feature that is not documented that does the greedy search you describe. I'll see if we can get something written up to share with you about how to use it.
Daniel
abstract sig DataPort extends Port {
...
conn: lone PortConnection
}
one sig dataPortIn6 extends DataPort {
} {
...
conn = connection9
}
In the current version I removed this conn filed from the DataPort signature and I assign the relation values in a function in the following:
fun conn[]: DataPort ->Connection {
... +
dataPortIn6 -> connection9
}
However, the performance of the state space generation is worse than the previous one.
The ordering module makes the performance much faster. However, we still have to state the exact number of states we generate. We just want to put an upper limit instead of specifying the exact number. I think you adress this issue in the following statement:
>>"To avoid the problem of having to fill out the traces, just write your spec to allow early termination (by
>>stuttering, so that a state can repeat at the end)"
Is there any link or documentation how to do this?
And lastly, I will be much appreciate if you share the the experimental feature. I am not sure how much effective the "complete traces" fact that we are using is.
Regards,
Arda
run p for 30
You might specify it in more detail, such as
run p for 3, but 10 Location, 1 Aircraft, 30 Transition
When applicable, this can help with scaling a lot.