UPPAAL SMC避免状态空间爆炸

时间:2019-05-02 11:29:13

标签: model-checking state-space uppaal

我正在尝试使用UPPAAL SMC查询更大的系统,并且最终出现“内存耗尽”错误消息。从本质上讲,UPPAAL SMC不应导致状态空间爆炸,这就是为什么我问是否可以在不引起状态空间爆炸的情况下使用SMC查询。

如果我尝试在很多状态下执行以下操作:

UppaalSystem system = engine.getSystem(document, problems);
engine.query(system, "", "E[<=100; 100](max: sum(i : id_t) Device(i).edge1)", queryListener);

我收到以下错误消息:

<html>Memory exhausted. See <br>http://bugsy.grid.aau.dk/bugzilla3/show_bug.cgi?id=63 <br>for more information.</html>

at com.uppaal.engine.Engine.getSystem(Engine.java:352)

是否可以在不调用占用大量内存的engine.getSystem()的情况下查询Uppaal SMC?

Here is the uppaal model of my "device" template

1 个答案:

答案 0 :(得分:0)

问题出在不同的模板中:瓶颈在于select语句,该语句生成2 ^ 20 = 1048576边。

exponential explosion of edges

对于SMC,最好使用随机函数在一个边缘上生成所有可能性:

enter image description here

其中randomInit如下所示:

typedef int[0,(1<<DEVICE_SIZE)-1] uint20_t;

void randomInit(bool& test[DEVICE_SIZE])
{
    uint20_t number = fint(random(1<<DEVICE_SIZE));
    for (i: id_t)
       test[i] = (number >> i) & 1;
}

请注意,由于使用了E<>A[],像randomfint这样的符号查询将无法在这种模型上使用!