The BAP Microexecution Framework
Module Bap_primus . Std . Primus . Machine

Machine identifier type.

val init : unit observation

A synonym to System.init

val finished : unit observation

A synonym to System.fini

val exn_raised : exn observation

exn_raised exn occurs every time an abnormal control flow is initiated

val kill : id observation

kill id occurs when the machine id is killed.

When this observation is made the machine enters the restricted mode with non-determinism and observations disabled.

module State : sig ... end

Machine State.

type 'a state = 'a State.t
module type State = sig ... end

An interface to the state.

module type S = sig ... end

The Machine interface.

module type Component = functor (Machine : S) -> sig ... end

A generic machine component.

type component = (module Component)

The Machine component.

module Make (M : Monads.Std.Monad.S) : S with type 'a m := 'a M.t

Make(Monad) a monad transformer that wraps the Machine into an arbitrary Monad.

module Main (M : S) : sig ... end

The Legacy Main System.

val add_component : component -> unit

add_component comp registers the machine component comp in the Primus Framework. The component's init function will be run every time the Machine compuation is run. After all components are initialized, the init observation is made.

The components shall not access the interpreter in their init function. Instead, they should subscribe to observations and/or initialize the machine state via Linker/Memory/Env components.

See also a more general register_component function.