From 243b3ed420ddd4da9809020d1b7cedd8bf446725 Mon Sep 17 00:00:00 2001 From: Benedikt Radtke Date: Tue, 12 Jan 2021 18:00:30 +0100 Subject: [PATCH] Expose the checkpoint and some task/frame members public --- isla-lib/Cargo.toml | 2 +- isla-lib/src/executor.rs | 18 +++++++++--------- isla-lib/src/smt.rs | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/isla-lib/Cargo.toml b/isla-lib/Cargo.toml index 64af7c7e..499d4c05 100644 --- a/isla-lib/Cargo.toml +++ b/isla-lib/Cargo.toml @@ -23,7 +23,7 @@ lalrpop-util = "0.19.0" crossbeam = "0.7.3" lazy_static = "1.4.0" toml = "0.5.5" -z3-sys = "0.5.0" +z3-sys = "0.6.3" libc = "0.2.5" serde = { version = "1.0.104", features = ["derive"] } bincode = "1.2.1" diff --git a/isla-lib/src/executor.rs b/isla-lib/src/executor.rs index b76fd9d9..4f0e365a 100644 --- a/isla-lib/src/executor.rs +++ b/isla-lib/src/executor.rs @@ -426,13 +426,13 @@ pub struct Frame<'ir, B> { /// executing thread. It is turned into an immutable `Frame` when the /// control flow forks on a choice, which can be shared by threads. pub struct LocalFrame<'ir, B> { - function_name: Name, - pc: usize, + pub function_name: Name, + pub pc: usize, forks: u32, backjumps: u32, local_state: LocalState<'ir, B>, memory: Memory, - instrs: &'ir [Instr], + pub instrs: &'ir [Instr], stack_vars: Vec>, stack_call: Stack<'ir, B>, backtrace: Backtrace, @@ -1050,12 +1050,12 @@ impl Default for TaskState { /// SMT solver state, and finally an option SMTLIB definiton which is /// added to the solver state when the task is resumed. pub struct Task<'ir, 'task, B> { - id: usize, - frame: Frame<'ir, B>, - checkpoint: Checkpoint, - fork_cond: Option, - state: &'task TaskState, - stop_functions: Option<&'task HashSet>, + pub id: usize, + pub frame: Frame<'ir, B>, + pub checkpoint: Checkpoint, + pub fork_cond: Option, + pub state: &'task TaskState, + pub stop_functions: Option<&'task HashSet>, } impl<'ir, 'task, B> Task<'ir, 'task, B> { diff --git a/isla-lib/src/smt.rs b/isla-lib/src/smt.rs index 42fdd126..813dd933 100644 --- a/isla-lib/src/smt.rs +++ b/isla-lib/src/smt.rs @@ -311,7 +311,7 @@ use smtlib::*; pub struct Checkpoint { num: usize, next_var: u32, - trace: Arc>>, + pub trace: Arc>>, } impl Checkpoint { @@ -451,8 +451,8 @@ pub type EvPath = Vec>; #[derive(Debug)] pub struct Trace { checkpoints: usize, - head: Vec>, - tail: Arc>>, + pub head: Vec>, + pub tail: Arc>>, } impl Trace {