BackwardAnalyser.MakeFunctor used to create a module implementing forward analysis.
It takes a module implementing the Logic interface and returns a module implementing the S signature.
Each instruction is annotated with its OUT domain and the IN domain is passed to the next instruction. Domain are updated using the functions provided by the Logic module. Control flow is handled as follow :
then and else with the input domain d, producing two annotations a_then a_else * we merge the two annotations using the Logic.account function inline int i; for i = 0 to 10 { ... } becomes :
inline int i; inline int i_proxy = 0; while (i_proxy < 10) { i = i_proxy; ... i_proxy++; } * we analyse the while loop with the while loop logic * we forget the proxy variable introduced by the for loop
type domain = L.domainval analyse_function :
('info, 'asm) Jasmin.Prog.func ->
(domain Annotation.annotation, 'asm) Jasmin.Prog.funcEntrypoint for analysis. args :
('info,'asm) Prog.func (function to analyse) returns :d(domain Annotation.annotation, 'asm) Prog.func (annotated function)