Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Z3 量化超表达式向量索引_Z3 - Fatal编程技术网

Z3 量化超表达式向量索引

Z3 量化超表达式向量索引,z3,Z3,在example.cpp中的expr_向量示例中,我们可以量化expr_向量索引。例如,如果我们有以下代码片段: expr_vector steps(c); expr b = c.bool_val(true); for(unsigned i = 0; i<N ; i++ ) { expr step = c.int_const(...) if( i == 0 ) b = b && step == 0 ; else b = b && step

在example.cpp中的expr_向量示例中,我们可以量化expr_向量索引。例如,如果我们有以下代码片段:

expr_vector steps(c); 
expr b = c.bool_val(true); 
for(unsigned i = 0; i<N ; i++ ) 
{  expr step = c.int_const(...)

  if( i == 0 ) b = b && step == 0 ; 
  else b = b && step == steps[i-1] + 1 ; 
  steps.push_back(step); 
}
expr_矢量步长(c);
expr b=c.bool_val(真);

对于(无符号i=0;iNo),这是不可能的,expr\u向量就像具有固定大小和显式索引的法向量。也就是说,可以使用数组来表示您的问题(例如,请参阅);然而,这可能以性能为代价,因为根据不同的理论组合,可能必须选择不同的决策程序

expr choice = c.int_const("choice); 
b = b && 0 <= choice && choice < N; 
b = b && steps[choice] > 5 ;