Skip to content

Commit 4cbbb3a

Browse files
authored
Reinstate missing simplify_bool_pattern binding (#910)
This function got missed out when I rebased some commit history in #897
1 parent 236a777 commit 4cbbb3a

File tree

4 files changed

+280
-367
lines changed

4 files changed

+280
-367
lines changed

bindings/python/runtime.cpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@ void *constructInitialConfiguration(const KOREPattern *initial);
4747
void bind_runtime(py::module_ &m) {
4848
auto runtime = m.def_submodule("runtime", "K LLVM backend runtime");
4949

50-
// This simplification should really be a member function on the Python
51-
// Pattern class, but it depends on the runtime library and so needs to be
52-
// bound as a free function in the kllvm.runtime module.
53-
m.def(
54-
"simplify_pattern",
55-
[](std::shared_ptr<KOREPattern> pattern, std::shared_ptr<KORESort> sort) {
56-
return bindings::simplify(pattern, sort);
57-
});
50+
// These simplifications should really be member functions on the Python
51+
// Pattern class, but they depend on the runtime library and so need to be
52+
// bound as free functions in the kllvm.runtime module.
53+
m.def("simplify_pattern", bindings::simplify);
54+
m.def("simplify_bool_pattern", bindings::simplify_to_bool);
5855

5956
// This class can't be used directly from Python; the mutability semantics
6057
// that we get from the Pybind wrappers make it really easy to break things.

0 commit comments

Comments
 (0)