Module Machine.Main

The Legacy Main System.

This module together with the add_component function builds the legacy main system (bap:legacy-main). The add_component function adds a component to this system.

The built system could be obtained with the legacy_main_system function and run as usual via the System module. The old Main(M).run interface is still provided for backward compatibility.

This interface is deprecated and is provided for backward compatibility. Use the System interface to define and run Primus systems.

Parameters

module M : S

Signature

val run : ?envp:string array -> ?args:string array -> Bap.Std.project -> unit M.t -> (exit_status * Bap.Std.project) M.m

run ?envp ?args proj returns a computation that will run a program represented with the proj data structure.

The envp and args parameters are constants, and can be accessible during the computation using Machine.envp and Machine.argp.

The computation evaluates to a pair (result,project) where result is a result of computation and project can be modified by the primus components, e.g., annotated with attributes, etc.