Skip to content

Commit 4db5e79

Browse files
committed
Stub out interface
1 parent e816ccd commit 4db5e79

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

bindings/core/src/core.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ simplify(std::shared_ptr<KOREPattern> pattern, std::shared_ptr<KORESort> sort) {
6464
return term_to_pattern(simplify_to_term(pattern, sort));
6565
}
6666

67+
std::shared_ptr<KOREPattern> evaluate_function(
68+
std::string const &label,
69+
std::vector<std::shared_ptr<KOREPattern>> const &args) {
70+
abort();
71+
}
72+
6773
bool is_sort_kitem(std::shared_ptr<KORESort> const &sort) {
6874
if (auto composite = std::dynamic_pointer_cast<KORECompositeSort>(sort)) {
6975
return composite->getName() == "SortKItem";

bindings/python/runtime.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ 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-
// These simplifications should really be a member function on the Python
50+
// These simplifications should really be a member function on the Python
5151
// Pattern class, but they depend on the runtime library and so need to be
5252
// bound as free functions in the kllvm.runtime module.
5353

@@ -79,6 +79,8 @@ void bind_runtime(py::module_ &m) {
7979

8080
m.def("simplify_bool_pattern", bindings::simplify_to_bool);
8181

82+
m.def("evaluate_function", bindings::evaluate_function);
83+
8284
// This class can't be used directly from Python; the mutability semantics
8385
// that we get from the Pybind wrappers make it really easy to break things.
8486
// We therefore have to wrap it up in some external Python code; see

include/kllvm/bindings/core/core.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ std::shared_ptr<kllvm::KOREPattern> simplify(
3535
bool is_sort_kitem(std::shared_ptr<kllvm::KORESort> const &sort);
3636
bool is_sort_k(std::shared_ptr<kllvm::KORESort> const &sort);
3737

38+
std::shared_ptr<kllvm::KOREPattern> evaluate_function(
39+
std::string const &label,
40+
std::vector<std::shared_ptr<kllvm::KOREPattern>> const &args);
41+
3842
} // namespace kllvm::bindings
3943

4044
#endif

0 commit comments

Comments
 (0)