有界上下文中数组的量化

时间:2013-07-01 11:41:37

标签: z3 smt

在有界上下文中(即所有基本排序都是位向量),我们将(2-dim)模型设置为数组。在一些公理中,我们需要量化这个数组。 一旦我们包含这样的公理,求解器就会返回未知数。从句法上看,这种量词超出了FOL的范围,但我们已经预期求解器可以识别/使用有界上下文信息。

  1. 为什么求解器不使用有界上下文信息?
  2. 是否有可能在没有手动量词爆破的情况下将其传授给求解器?
  3. 这是一个最小的例子:

    (define-sort Any () (_ BitVec 6))
    (define-sort Object () (_ BitVec 3))
    (define-sort Field () (_ BitVec 2))
    
    (define-sort Heap () (Array Object Field Any))
    (define-sort LocSet () (Array Object Field Bool))
    
    (declare-fun foo (Heap LocSet Heap) Heap)
    (assert
     (forall 
      ((?h Heap) (?s LocSet) (?h2 Heap) (?o Object) (?f Field))
      (= (select (foo ?h ?s ?h2) ?o ?f)
         (select (ite (select ?s ?o ?f) ?h ?h2) ?o ?f))))
    
    (check-sat)
    

0 个答案:

没有答案
相关问题