|
1 | | -use jingle::modeling::{ModeledBlock, ModeledInstruction, ModelingContext, State}; |
| 1 | +use jingle::modeling::{ModeledBlock, ModelingContext, State}; |
2 | 2 | use jingle::JingleContext; |
3 | 3 | use std::sync::Arc; |
4 | 4 | use z3::ast::Bool; |
@@ -73,21 +73,12 @@ pub fn assert_concat<'ctx, T: ModelingContext<'ctx>>( |
73 | 73 | Ok(Bool::and(z3, &bools)) |
74 | 74 | } |
75 | 75 |
|
76 | | -pub fn assert_compatible_semantics<'ctx, S: ModelingContext<'ctx>>( |
| 76 | +pub fn assert_pointer_invariant<'ctx>( |
77 | 77 | jingle: &JingleContext<'ctx>, |
78 | | - spec: &S, |
79 | 78 | item: &ModeledBlock<'ctx>, |
80 | 79 | invariants: &[Arc<TransitionConstraintGenerator>], |
81 | 80 | ) -> Result<Bool<'ctx>, CrackersError> { |
82 | 81 | let mut bools = vec![]; |
83 | | - // First, all outputs of the item under test must be assignable to the same values |
84 | | - // as in our specification computation |
85 | | - bools.push(item.upholds_postcondition(spec)?); |
86 | | - // Secondly, if the specification has some control flow behavior, the item must be able |
87 | | - // to have the same control flow behavior |
88 | | - if let Some(b) = spec.branch_comparison(item)? { |
89 | | - bools.push(b) |
90 | | - } |
91 | 82 | // Thirdly, every input and output address must pass our pointer constraints |
92 | 83 | for invariant in invariants.iter() { |
93 | 84 | let inv = invariant(jingle, item)?; |
|
0 commit comments