Skip to content

Commit

Permalink
Expose underlying Z3_context and Z3_sort (#298)
Browse files Browse the repository at this point in the history
Closes #290
  • Loading branch information
JakobR committed May 29, 2024
1 parent d134bb3 commit 1252af7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions z3/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ impl Context {
}
}

pub fn get_z3_context(&self) -> Z3_context {
self.z3_ctx
}

/// Interrupt a solver performing a satisfiability test, a tactic processing a goal, or simplify functions.
pub fn interrupt(&self) {
self.handle().interrupt();
Expand Down
4 changes: 4 additions & 0 deletions z3/src/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ impl<'ctx> Sort<'ctx> {
Sort { ctx, z3_sort }
}

pub fn get_z3_sort(&self) -> Z3_sort {
self.z3_sort
}

pub fn uninterpreted(ctx: &'ctx Context, name: Symbol) -> Sort<'ctx> {
unsafe {
Self::wrap(
Expand Down

0 comments on commit 1252af7

Please sign in to comment.