Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Primus.Interpreter
The Interpreter.
The Interpreter is the core component of the Primus Machine. It provides lots of observations, giving other components an ability to track every event that happens during the program evaluation. The components can affect the results of evaluation in a limited way, by affecting the state of the components that are used by the Interpreter, name the Environment and the Memory.
Note: we the observation (x,y,z) notation in the documentation to denote an observation of a value represented with the (x,y,z) tuple, that in fact corresponds to observation >>> fun (x,y,z) -> ...
jumping (cond,dest) happens just before a jump to dest is taken under the specified condition cond. Note: the cond expression is always true and is computed from the path constraints of all outcoming edges of a block.
cfi_violation x occurs when the CFI is not preserved. The control flow integrity (CFI) is violated when a call doesn't return to an expected place. This might be an indicator of malicious code or an improper control flow graph.
After the observation is made the cfi_violation trap is signaled, which could be handled via the cfi_violation_handler.
pagefault_hanlder is a trap handler that is invoked when the Pagefault exception is raised by the machine memory component. If the handler is provided via the Linker, then it is invoked, otherwise a segmentation fault is raised. If the handler returns normally then the faulty operation is repeated.
Note, page faults are usually handled together with the pagefault observation.
since 1.5
val division_by_zero_handler : string
division_by_zero_hanlder is a trap handler for the Division_by_zero exception. If it is linked into the machine, then it will be invoked when the division by zero trap is signaled. If it returns normally, then the result of the faulty operation is undefined.
since 1.5
val cfi_violation_handler : string
division_by_zero is the name of a trap handler for the Cfi_violation exception. If it is linked into the machine, then it will be invoked when the cfi-violation trap is signaled. If it returns normally, then the result of the faulty operation is undefined.