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

Custom datatypes [dReal v3.16.04.01] [OSX 10.11.4] #301

Open
Nikh13 opened this issue Sep 12, 2016 · 1 comment
Open

Custom datatypes [dReal v3.16.04.01] [OSX 10.11.4] #301

Nikh13 opened this issue Sep 12, 2016 · 1 comment

Comments

@Nikh13
Copy link

Nikh13 commented Sep 12, 2016

Hi,

I have recently moved to dReal from z3 due to its obvious advantage dealing with non-linear theories. However, for some of the problems I have been working on, I wish to declare functions with a non-numeric(i.e string or character) domain.

For e.g in z3:
(declare-datatypes () ((State stopped running)))
was a supported statement which declared the datatype State with the domain {stopped,running}.

I could then simply declare a function as
(declare-fun currentState () State)

and it would set the domain for currentState to {stopped,running}

Is there any way to declare such custom datatypes in dReal as well?

@soonho-tri
Copy link
Member

Hi @Nikh13,

Unfortunately, we don't support declare-datatypes. As far as I know, it's an experimental feature which possibly will be included in the next standard of SMTLIB.

We do support Bool, Int, and Real sorts. I think you may encode the datatype using two Bool variables.

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

No branches or pull requests

2 participants