Module Biabduction__Prover
val atom_negate : IR.Tenv.t -> Biabduction.Predicates.atom -> Biabduction.Predicates.atom
Negate an atom
Ordinary Theorem Proving
val check_equal : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> IR.Exp.t -> IR.Exp.t -> bool
Check
prop |- exp1=exp2
. Resultfalse
means "don't know".
val check_disequal : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> IR.Exp.t -> IR.Exp.t -> bool
Check whether
prop |- exp1!=exp2
. Resultfalse
means "don't know".
val type_size_comparable : IR.Typ.t -> IR.Typ.t -> bool
Return true if the two types have sizes which can be compared
val check_atom : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> Biabduction.Predicates.atom -> bool
Check whether
prop |- a
. Resultfalse
means "don't know".
val check_inconsistency_base : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> bool
Inconsistency checking ignoring footprint.
val check_inconsistency : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> bool
Inconsistency checking.
val check_allocatedness : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> IR.Exp.t -> bool
Check whether
prop |- allocated(exp)
.
val is_root : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> IR.Exp.t -> IR.Exp.t -> Biabduction.Predicates.offset list option
is_root prop base_exp exp
checks whetherbase_exp = exp.offlist
for some list of offsetsofflist
. If so, it returnsSome(offlist)
. Otherwise, it returnsNone
. Assumes thatbase_exp
points to the beginning of a structure, not the middle.
val expand_hpred_pointer : IR.Tenv.t -> bool -> Biabduction.Predicates.hpred -> bool * bool * Biabduction.Predicates.hpred
expand_hpred_pointer calc_index_frame hpred
expandshpred
if it is a |-> whose lhs is a Lfield or Lindex or ptr+off. Return(changed, calc_index_frame', hpred')
wherechanged
indicates whether the predicate has changed.
val get_bounds : IR.Tenv.t -> Biabduction.Prop.normal Biabduction.Prop.t -> IR.Exp.t -> IR.IntLit.t option * IR.IntLit.t option
Get upper and lower bounds of an expression, if any
Abduction prover
val check_implication : Biabduction.BiabductionSummary.t Absint.InterproceduralAnalysis.t -> Biabduction.Prop.normal Biabduction.Prop.t -> Biabduction.Prop.exposed Biabduction.Prop.t -> bool
check_implication p1 p2
returns true ifp1|-p2
type implication_result
=
|
ImplOK of check list * Biabduction.Predicates.subst * Biabduction.Predicates.subst * Biabduction.Predicates.hpred list * Biabduction.Predicates.atom list * Biabduction.Predicates.hpred list * Biabduction.Predicates.hpred list * Biabduction.Predicates.hpred list * (IR.Exp.t * IR.Exp.t) list * (IR.Exp.t * IR.Exp.t) list
|
ImplFail of check list
val check_implication_for_footprint : Biabduction.BiabductionSummary.t Absint.InterproceduralAnalysis.t -> Biabduction.Prop.normal Biabduction.Prop.t -> Biabduction.Prop.exposed Biabduction.Prop.t -> implication_result
check_implication_for_footprint p1 p2
returnsSome(sub, frame, missing)
ifsub(p1 * missing) |- sub(p2 * frame)
wheresub
is a substitution which instantiates the primed vars ofp1
andp2
, which are assumed to be disjoint.
Cover: minimum set of pi's whose disjunction is equivalent to true
val find_minimum_pure_cover : IR.Tenv.t -> (Biabduction.Predicates.atom list * 'a) list -> (Biabduction.Predicates.atom list * 'a) list option
Find minimum set of pi's in
cases
whose disjunction covers true