Skip to content

Add interface to cvc5 sygus bindings#39

Merged
joaomhmpereira merged 4 commits into
formalsec:mainfrom
UQ-PAC:main
Feb 10, 2026
Merged

Add interface to cvc5 sygus bindings#39
joaomhmpereira merged 4 commits into
formalsec:mainfrom
UQ-PAC:main

Conversation

@ndrwbrwn

@ndrwbrwn ndrwbrwn commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Hi!

I've been working on a project in OCaml that benefits from an interface to a SyGuS solver. Cvc5 is one of those solvers, and this project seems to be the best set of bindings out there, so the quickest and easiest option for me to get SyGuS support in OCaml was to hack it onto your bindings.

In this PR is a working, basic implementation of exactly as much SyGuS stuff as I needed:

There's a couple other SyGuS-relevant functions here and there that I haven't bothered to add, mostly because I didn't need them. But this is easily enough to get started with Cvc5 SyGuS using these bindings, you can implement the examples from the Cvc5 docs and it all works.

Also, my system complained about the use of int in those original loops, so I switched it out for size_t. Since I first wrote these bindings, I see it's been changed for long unsigned int anyway (in 7d8a1a6), which fixes the compiler error, but AFAIK size_t is technically a more accurate type anyway, so I left my version in this PR. Happy to revert, up to you.

Hopefully someone else can benefit from the SyGuS interface :)

greatly increase CPU abuse

dummy implementation (all returning TermManager)
@joaomhmpereira

joaomhmpereira commented Feb 10, 2026

Copy link
Copy Markdown
Member

Hi!

Thank you so much for the contribution! I’m glad these bindings were useful for your SyGuS project. Everything looks good to me, and I agree that size_t is more accurate here.

Assuming the build workflow finishes cleanly, I’m happy to merge this.

Thanks again!

@ndrwbrwn

Copy link
Copy Markdown
Contributor Author

No worries, happy to contribute. Being able to lean on an existing implementation of the Term/TermManager refcounting stuff was super helpful. Thanks for the quick response, too!

@joaomhmpereira joaomhmpereira merged commit 2c39334 into formalsec:main Feb 10, 2026
2 checks passed
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 this pull request may close these issues.

2 participants