8000 C++ API for Datalog engine missing declare_vars · Issue #1832 · Z3Prover/z3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

C++ API for Datalog engine missing declare_vars #1832

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

Closed
tyavuz opened this issue Sep 18, 2018 · 2 comments
Closed

C++ API for Datalog engine missing declare_vars #1832

tyavuz opened this issue Sep 18, 2018 · 2 comments

Comments

@tyavuz
Copy link
tyavuz commented Sep 18, 2018

Hello,

I tried to use the C++ API for Z3's datalog engine following the Python examples at http://www.cs.tau.ac.il/~msagiv/courses/asv/z3py/fixedpoints-examples.htm. I couldn't find a declare_vars method of the fixedpoint class. I believe that absence of this method creates the following issue: When I create a number of rules and facts and pose a query, my program crashes due to an exception. The error I get says:

failed: Uninterpreted 'b' in directCall:
calls(#0,#1) :-
cgedge(#2,#3),
(= (:var 3) b),
(= (:var 2) a),
(= (:var 1) b),
(= (:var 0) a).

I would appreciate any feedback. Thanks.
Tuba

@NikolajBjorner
Copy link
Contributor

add_var is a function implemented on the python side for convenience. From C++ you would have to create rules as quantified formulas, binding all relevant variables. Use the function expr forall(expr_vector const & xs, expr const & b) to bind the variables that are used in each rule.

@tyavuz
Copy link
Author
tyavuz commented Sep 18, 2018

Thanks a lot!

66A6

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
0