Module Binsec_codex_lib.Binsec2syntax_tree

This file provides the decomposition from specific Dba.Expr.t to the language-agnostic Syntax_tree.t, and checks that the index used to identify expressions are correct (internally, using a single function as the source of truth for this decomposition).

val expr_of_binsec_expr : Binsec.Dba.Expr.t -> Syntax_tree.expr
val instr_of_binsec_instr : Binsec.Dba.Instr.t -> Syntax_tree.expr
val check_instr_idx : Binsec.Dba.Instr.t Syntax_tree.located -> idx:int -> Binsec.Dba.Expr.t -> Binsec.Dba.Expr.t Syntax_tree.located

check_instr_idx (instr,locid) ~idx e checks that the index idx that we use to identify an expression is consistent, in that the named expression corresponds to the one obtained by pattern matching.

val check_expr_idx : Binsec.Dba.Expr.t Syntax_tree.located -> idx:int -> Binsec.Dba.Expr.t -> Binsec.Dba.Expr.t Syntax_tree.located

check_expr_idx: see check_instr_idx.