Bap_wp.Run_parametersThis module contains the parameters the user can set from the command line interface to WP. These flags specify which properties WP should check and updates the default options.
module Env = Environmentmodule Err :
Monads.Std.Monad.Result.S
with type 'a t :=
'a
Monads.Std.Monad.Result.T1(Bap_main.Extension.Error)(Monads.Std.Monad.Ident).t
and type 'a m :=
'a
Monads.Std.Monad.Result.T1(Bap_main.Extension.Error)(Monads.Std.Monad.Ident).m
and type 'a e :=
'a
Monads.Std.Monad.Result.T1(Bap_main.Extension.Error)(Monads.Std.Monad.Ident).e
and type err := Bap_main.Extension.Error.tA result monad that includes Extension.Error.t as the error type. This error is returned when a user passes in an invalid parameter.
type t = {}The available options to be set. Each flag corresponds to a parameter in the set with the BAP custom command line.
validate flags files ensures the user inputted the appropriate flags for the inputted files. In the case the user has invalid flags, an error is returned.
validate_func name checks the user inputted a name for the function to analyze. Returns an error when name is empty.
validate_debug options checks the user inputted the supported options for the debug printer flag. Returns an error when an unsupported option is inputted.
validate_show options checks the user inputted the supported options for the show printer flag. Returns an error when an unsupported option is inputted.
validate_compare_func_calls flag files checks that the flag is only set when there are two files to compare. Returns an error otherwise.
val validate_compare_post_reg_vals :
string list ->
string list ->
( unit, Bap_main.error ) Stdlib.resultvalidate_compare_post_reg_vals regs files checks that the list of registers to compare is only set when there are two files to compare. Returns an error otherwise.
val validate_mem_flags :
t ->
string list ->
( unit, Bap_main.error ) Stdlib.resultvalidate_mem_flags flags files checks that a memory comparison flag is only set when there are two files to compare, and that only one flag is set at a time. Returns an error otherwise.
validate_check_invalid_derefs flag files checks that the flag is only set when there are two files to compare. Returns an error otherwise.
validate_ogre flags checks that the user hasn't provided inconsistent info about which ogre files to use, and updates them with explicit paths if needed. Returns an error otherwise.
val parse_loop_invariant :
string ->
Bap_core_theory.Theory.target ->
Bap.Std.Sub.t ->
Env.loop_invariantsparse_loop_environment invariant target sub parses the invariant which is an S-expression representing the address of a loop header and its corresponding loop invariant, and returns a format accepted by the environment.
i.e., parse_loop_environment "(((address 0x12) (invariant
"(assert (= foo bar))")))" x86 sub.
val default : func:string -> tCreates the default parameters for easy invocation