我在文档中读到可以编写规则
syntax Exp ::= randBounded(Int, Int)
rule randBounded(M, N) => I
requires M <=Int I andBool I <=Int N
[unboundVariables(I)]
我想randBounded(4,6)
返回一些随机整数。但是,当我尝试它时,它会返回一个整数V0
并设置约束V0 <=Int 10 ==K true
。
相反,有没有办法为范围内的每个整数生成显式分支?
例如,我想--search
产生 3 种配置:每个整数 4、整数 5 和整数 6 一个。