다음 예제에서는 각 가정에 대해 단일 부울 상수가 아닌 "(declare-const p (Int) Bool)"와 같은 해석되지 않은 부울 함수를 사용하려고했습니다. 하지만 작동하지 않습니다 (컴파일 오류가 발생합니다).부울 함수를 'check-sat'가 가정으로 지원하지 않습니까?
(set-option :produce-unsat-cores true)
(set-option :produce-models true)
(declare-fun p (Int) Bool)
;(declare-const p1 Bool)
;(declare-const p2 Bool)
; (declare-const p3 Bool)
;; We assert (=> p C) to track C using p
(declare-const x Int)
(declare-const y Int)
(assert (=> (p 1) (> x 10)))
;; An Boolean constant may track more than one formula
(assert (=> (p 1) (> y x)))
(assert (=> (p 2) (< y 5)))
(assert (=> (p 3) (> y 0)))
(check-sat (p 1) (p 2) (p 3))
(get-unsat-core)
출력
Z3(18, 16): ERROR: invalid check-sat command, 'not' expected, assumptions must be Boolean literals
Z3(19, 19): ERROR: unsat core is not available
나는 그것이 (지원되지 않는) 불가능하다는 것을 이해 부울 기능을 사용할 수 있습니다. 그 뒤에 어떤 이유가 있습니까? 거기에 다른 방법이 있습니까?
이러한 링크는 고장난 것 같습니다. 실제 코드를 게시 할 수 있습니까? –