Skip to content

Conversation

daniel-raffler
Copy link
Contributor

Hello,
in this PR we add support for arrays to the Yices2 backend. Yices has supported arrays for a while, however, the implementation is a bit non-standard. Instead of the usual array operations from SMTLIB we have to use function terms:

  • Const become (lambda (x::T) c) where T is the index type and c the default element
  • Select becomes regular function application
  • Store become function update where we "fix" the function for a single value

Array types from SMTLIB then map to (curried) function types in Yices2

There can be some confusion between UF terms and arrays as both are just function terms in Yices2. We work around issue this by explicitly keeping track of all our UF declarations in the FormulaCreator and assume all other function terms must be arrays

kfriedberger
kfriedberger previously approved these changes Sep 12, 2025
Copy link
Member

@kfriedberger kfriedberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks good at first view.

Does it work with existing Yices2 bindings or do we need an update?
I saw the other PR. I am just wondering, whether we can merge this first.

@daniel-raffler
Copy link
Contributor Author

The implementation looks good at first view.

Does it work with existing Yices2 bindings or do we need an update? I saw the other PR. I am just wondering, whether we can merge this first.

Hello Karlheinz,
thanks for the quick review! Arrays will work with the current version of Yices, so we could merge this before the update

Copy link
Member

@kfriedberger kfriedberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be merged

@kfriedberger kfriedberger merged commit 525472a into master Sep 13, 2025
3 checks passed
@daniel-raffler
Copy link
Contributor Author

Thanks for merging! I think we still need to update javasmt-yices2 before the next release? However, this can be done after we've updated to yices 2.7.0

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

Successfully merging this pull request may close these issues.

2 participants