-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allow user to send and recieve custom messages to and from the SMT solver #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/context.rs
Outdated
/// Directly send a command to the solver. | ||
pub fn send(&mut self, cmd: SExpr) -> io::Result<()> { | ||
let solver = self | ||
.solver | ||
.as_mut() | ||
.expect("send requires a running solver"); | ||
solver.send(&self.arena, cmd) | ||
} | ||
|
||
/// Directly receive a response from the solver. | ||
pub fn recv(&mut self) -> io::Result<SExpr> { | ||
let solver = self | ||
.solver | ||
.as_mut() | ||
.expect("recv requires a running solver"); | ||
solver.recv(&self.arena) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a raw_
prefix (or something, open to bikeshedding) and a note in the doc comment to signify that these are low-level, "raw" APIs, check
/set_option
/etc. should generally be preferred, and are only intended as an escape hatch for solver-specific commands that this crate doesn't have built-in support for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I also moved these calls to the bottom of the impl
just so that they aren't at the top of cargo doc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Published 0.2.3 with this |
Fixes #30