Function haybale::find_zero_of_func[][src]

pub fn find_zero_of_func<'p>(
    funcname: &str,
    project: &'p Project,
    config: Config<'p, DefaultBackend>,
    params: Option<Vec<ParameterVal>>
) -> Result<Option<Vec<SolutionValue>>, String>

Given a function, find values of its inputs such that it returns zero.

funcname: Name of the function to analyze. For Projects containing C++ or Rust code, you can pass either the mangled or demangled function name (fully qualified with namespaces/modules).

project: The Project (set of LLVM modules) in which symbolic execution should take place. In the absence of function hooks (see Config), we will try to enter calls to any functions defined in the Project.

params: a ParameterVal for each parameter to the function, indicating what the initial value of that parameter should be, or if the parameter should be unconstrained (so that the analysis considers all possible values for the parameter). None here is equivalent to supplying a Vec with all ParameterVal::Unconstrained entries.

Returns Ok(None) if there are no values of the inputs such that the function returns zero.

Note: find_zero_of_func() may be of some use itself, but also serves as an example of how you can use the other public functions in the crate.