错误断言z3中数据类型的数据类型

时间:2013-12-04 12:49:27

标签: z3 smt

我遇到了这个问题:

(set-option :print-success true)
(declare-datatypes () (( Data nil (cons (giorno Int) (mese Int)(anno Int) ))))
(declare-datatypes () (( Eta  (cons1  (data Data) (io Int)))))
(assert (forall ( (e Eta) )
(and (< 0 ((giorno data) e)) (> 0 ((giorno data) e))
) ) )
(check-sat)

和z3让我回答:

  

Z3(7,12):错误:无效的合格/索引标识符,'_'或'as'预期

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

我认为正确的代码是

(set-option :print-success true)
(declare-datatypes () (( Data nil (cons (giorno Int) (mese Int)(anno Int) ))))
(declare-datatypes () (( Eta  (cons1  (data Data) (io Int)))))
(assert (forall ( (e Eta) )
(and (< 0 (giorno (data e))) (> 0 (giorno (data e))))))
(check-sat)

,输出

success 
success 
success 
success 
unsat