Created
December 20, 2011 13:20
-
-
Save msakai/1501545 to your computer and use it in GitHub Desktop.
Can't Z3 handle datatypes that contains sorts introduced by declare-sort/define-sort?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(declare-sort A) | |
(define-sort B () Int) | |
(declare-datatypes ((listA (nilA) (consA (hdA A) (tlA listA))))) | |
(declare-datatypes ((listB (nilB) (consB (hdB B) (tlB listB))))) | |
(declare-datatypes ((listInt (nilInt) (consInt (hdInt Int) (tlInt listInt))))) | |
; => | |
; success | |
; success | |
; (error "line 3 column 64: could not parse data-type declaration") | |
; (error "ERROR: line 3 column 47: unknown sort 'A'.") | |
; (error "line 4 column 64: could not parse data-type declaration") | |
; (error "ERROR: line 4 column 47: unknown sort 'B'.") | |
; success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-type A) | |
(define-type B int) | |
(define-type listA (datatype nilA (consA hdA::A tlA::listA))) | |
(define-type listB (datatype nilB (consB hdB::B tlB::listB))) | |
(define-type listInt (datatype nilInt (consInt hdInt::int tlInt::listInt))) | |
(check) ; => sat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment