Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define-sort not supported #29

Closed
bobot opened this issue Apr 12, 2020 · 2 comments · Fixed by #30
Closed

Define-sort not supported #29

bobot opened this issue Apr 12, 2020 · 2 comments · Fixed by #30

Comments

@bobot
Copy link
Contributor

bobot commented Apr 12, 2020

Sort definition (type alias) seems not supported:

(set-logic QF_LIA)
(define-sort F () Int)
(declare-fun x () F)
(assert (= x 1))
(check-sat)
(exit)

returns:

Error While typing: (= (x) 1)
File ./test.smt2, line 4, character 8-15:
The term: 1 has type int but was expected to be of type F
@Gbury
Copy link
Owner

Gbury commented Apr 12, 2020

Oops, that was an oversight on my part: to have more lightweight type-checking, definitions (including for types, instead of just for terms), are type-checked and then the defined symbol is simply declared, but that's clearly wrong for type definitions.
You'll notice that there already was a builtin functor to handle definitions by substitutions, I just forgot to use it. This should be fixed in #30 .

@Gbury Gbury closed this as completed in #30 Apr 12, 2020
@bobot
Copy link
Contributor Author

bobot commented Apr 12, 2020

Thanks for the quick fix and the explanations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants