How can I access the values of parameterized sorts?
For instance, if I have the following declarations:
(declare-sort Pair 2)
(declare-const x (Pair Int Int))
How do I access the first element in the pair which x represents?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can create a parametric record with two selectors
firstandsecondfor accessing its field.Here is an example:
There is also a comprehensive introduction on algebraic datatypes in Z3 SMT guide.