a complete working version for static analysis part of the DSL (after solving most of the known issues)