Skip to content

WIP: Python 2.7 DriverProxy native extension#2

Open
Lukas-Dresel wants to merge 5 commits into
vlab-cs-ucsb:masterfrom
Lukas-Dresel:feat/python-bindings
Open

WIP: Python 2.7 DriverProxy native extension#2
Lukas-Dresel wants to merge 5 commits into
vlab-cs-ucsb:masterfrom
Lukas-Dresel:feat/python-bindings

Conversation

@Lukas-Dresel

Copy link
Copy Markdown
Contributor

A preliminary implementation of a Python wrapper for ABC. Currently in a WIP state, some ref-counting is still missing. This will be updated as we go. Do NOT merge this PR yet please!

This currently has a bunch of quirks, like requiring the output/ directory to exist that I haven't worked around yet.

@Lukas-Dresel

Lukas-Dresel commented Jan 29, 2018

Copy link
Copy Markdown
Contributor Author

Current usage example:

In [1]: import PythonABCSolver

In [2]: p = PythonABCSolver.DriverProxy(0)

In [3]: csts = """(set-logic QF_S)
   ...: (declare-fun var_abc () String)
   ...: (assert (= var_abc "abc"))
   ...: (check-sat)
   ...: """

In [4]: p.isSatisfiable(csts)
I0129 15:47:05.819499 24154 SyntacticOptimizer.cpp:99] and has 1 children
I0129 15:47:05.820063 24154 SyntacticOptimizer.cpp:99] and has 1 children
I0129 15:47:05.820276 24154 SyntacticOptimizer.cpp:99] and has 1 children
Out[4]: True

In [5]: p.getSatisfyingExamples()
Out[5]: {'var_abc': 'abc'}

@Lukas-Dresel Lukas-Dresel force-pushed the feat/python-bindings branch 2 times, most recently from 4b0cf14 to 116dda1 Compare March 18, 2018 22:20
@Lukas-Dresel Lukas-Dresel force-pushed the feat/python-bindings branch from 116dda1 to 679b3bd Compare March 28, 2018 22:12
@Lukas-Dresel Lukas-Dresel force-pushed the feat/python-bindings branch from 679b3bd to ce609b0 Compare March 29, 2018 01:03
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.

1 participant