我遇到了这个问题:
(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'预期
我该如何解决这个问题?
答案 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