Legend:
Library
Module
Module type
Parameter
Class
Class type
Approximate parser for non-syntactically valid files.
Heuristic: try to detect
open Module_path
include Module_path
Module_path . not module identifier
module M and match them to the corresponding toplevel structure item.
As a consequence, the set of bound modules at any point in the approximated m2l ast should be a superset of the set of bound module in the wished AST. Notwithstanding inclusion of UIDENT signature, the dependencies inferred for the corresponding AST shall yield a lower bound for the wished dependencies.
We can also transform the corresponding approximated AST to eliminate all binding and convert opening and including modules to module access. Infering dependencies from this AST will gives us an upper bound of wished dependencies. *