Module Pulselib.PulseAbductiveDomain
module BaseDomain = PulseBaseDomainmodule BaseMemory = PulseBaseMemorymodule BaseStack = PulseBaseStackmodule type BaseDomainSig = sig ... endsignature common to the "normal"
Domain, representing the post at the current program point, and the invertedPreDomain, representing the inferred pre-condition
module PostDomain : BaseDomainSigThe post abstract state at each program point, or current state.
module PreDomain : BaseDomainSigThe inferred pre-condition at each program point, biabduction style.
type t= private{post : PostDomain.t;state at the current program point
pre : PreDomain.t;inferred procedure pre-condition leading to the current program point
path_condition : PulseBasicInterface.PathCondition.t;arithmetic facts true along the path (holding for both
preandpostsince abstract values are immutable)topl : PulseTopl.state;state at of the Topl monitor at the current program point, when Topl is enabled
skipped_calls : PulseBasicInterface.SkippedCalls.t;metadata: procedure calls for which no summary was found
}pre/post on a single program path
val leq : lhs:t -> rhs:t -> boolval pp : Stdlib.Format.formatter -> t -> unitval mk_initial : IR.Tenv.t -> IR.Procdesc.t -> tval get_pre : t -> BaseDomain.tval get_post : t -> BaseDomain.t
module Stack : sig ... endstack operations like
BaseStackbut that also take care of propagating facts to the precondition
module Memory : sig ... endmemory operations like
BaseMemorybut that also take care of propagating facts to the precondition
module AddressAttributes : sig ... endattribute operations like
BaseAddressAttributesbut that also take care of propagating facts to the precondition
val is_local : IR.Var.t -> t -> boolval find_post_cell_opt : PulseBasicInterface.AbstractValue.t -> t -> BaseDomain.cell optionval get_unreachable_attributes : t -> PulseBasicInterface.AbstractValue.t listcollect the addresses that have attributes but are unreachable in the current post-condition
val add_skipped_call : IR.Procname.t -> PulseBasicInterface.Trace.t -> t -> tval add_skipped_calls : PulseBasicInterface.SkippedCalls.t -> t -> tval set_path_condition : PulseBasicInterface.PathCondition.t -> t -> tval is_isl_without_allocation : t -> boolval is_pre_without_isl_abduced : t -> bool
type summary= private tprivate type to make sure
summary_of_postis always called when creating summaries
val skipped_calls_match_pattern : summary -> boolval summary_of_post : IR.Tenv.t -> IR.Procdesc.t -> IBase.Location.t -> t -> (summary, [> `MemoryLeak of summary * IR.Procname.t * PulseBasicInterface.Trace.t * IBase.Location.t | `PotentialInvalidAccessSummary of summary * PulseBasicInterface.AbstractValue.t * (PulseBasicInterface.Trace.t * PulseBasicInterface.Invalidation.must_be_valid_reason option) ]) IStdlib.IStd.result PulseBasicInterface.SatUnsat.tTrim the state down to just the procedure's interface (formals and globals), and simplify and normalize the state.
val set_post_edges : PulseBasicInterface.AbstractValue.t -> BaseMemory.Edges.t -> t -> tdirectly set the edges for the given address, bypassing abduction altogether
val set_post_cell : (PulseBasicInterface.AbstractValue.t * PulseBasicInterface.ValueHistory.t) -> BaseDomain.cell -> IBase.Location.t -> t -> tdirectly set the edges and attributes for the given address, bypassing abduction altogether
val incorporate_new_eqs : PulseBasicInterface.PathCondition.new_eqs -> t -> (t, [> `PotentialInvalidAccess of t * PulseBasicInterface.AbstractValue.t * (PulseBasicInterface.Trace.t * PulseBasicInterface.Invalidation.must_be_valid_reason option) ]) IStdlib.IStd.resultCheck that the new equalities discovered are compatible with the current pre and post heaps, e.g.
x = 0is not compatible withxbeing allocated, andx = yis not compatible withxandybeing allocated separately. In those cases, the resulting path condition isPathCondition.false_.
val initialize : PulseBasicInterface.AbstractValue.t -> t -> tRemove "Uninitialized" attribute of the given address
val set_uninitialized : IR.Tenv.t -> [ `LocalDecl of IR.Pvar.t * PulseBasicInterface.AbstractValue.t option | `Malloc of PulseBasicInterface.AbstractValue.t ] -> IR.Typ.t -> IBase.Location.t -> t -> tAdd "Uninitialized" attributes when a variable is declared or a memory is allocated by malloc.
module Topl : sig ... end