Server
module Opcode : sig ... end
Type of opcodes
Set the address (unix socket filename) to connect to (must be called before first call to lift) Overrides the environment variable.
Start the server listening on the unix domain socket filename supplied by either a call to set_addr
or environment variable GTIRB_SEM_SOCKET
, or default file ./aslp_rpc_socket
.
(will not return until server is shutdown)
type stats = {
success : int;
Number of requests which returned instruction semantics
*)fail : int;
Number of requests which returned a lifter error
*)total_lifter_calls : int;
Number of times the lifter was invoked (cache-misses)
*)cache_hit_rate : float;
Hit-rate for the in-memory instruction cache
*)unique_failing_opcodes_le : Opcode.t list;
The list of opcodes which produced lifter errors for lifetime of the server
*)}
val get_local_lifter_stats : unit -> stats
Return statistics on the number of opcodes lifted through lift_opcode.
These invoke the lifter directly.
val lift_opcode :
?cache:bool ->
opcode:Opcode.t ->
int ->
Aslp_common.Common.opcode_sem
Invoke the (online) lifter directly to lift an opcode.
val lift_opcode_offline_lifter :
opcode:Opcode.t ->
int ->
Aslp_common.Common.opcode_sem
Lift an opcode directly using the offline lifer. This is substantially faster but produces more verbose code.