我有一个变量,我想在同一个函数中生成几次,每次都使用相同的约束集。我可以设置一次约束并gen
多次设置约束吗?也就是说,而不是这样:
var a:uint;
gen a keeping {it in [100..120];};
// some code that uses a
.
.
.
gen a keeping {it in [100..120];};
// some code that uses a
.
.
.
gen a keeping {it in [100..120];};
// some code that uses a
// etc...
我想这样做:
var a:uint;
keep a in [100..120];
.
.
.
gen a;
// some code that uses a
.
.
.
gen a;
// some code that uses a
.
.
.
gen a;
// some code that uses a
// etc...
这样,如果我想更改a
s 约束,我只需要做一次。