-
Notifications
You must be signed in to change notification settings - Fork 3
Framework concepts
Several concepts of this description are heavily in WIP state in the project.
Codemodel-Rifle analyses ECMAScript 6 code repositories incrementally. The ultimate goal of the project is to give insights of ECMAScript 6 code repositories by performing static analysis on not only individual modules, but on several related JavaScript-modules connected to each other, providing a wider range of finding human errors.
Rifle begins the repository analysis procedure with parsing every .js-extensioned file (henceforth: Module
or mainly CompilationUnit
) with the Shift Java ES2016 parser into an AST. The given AST is then processed according to our custom logic defined in the ASTScopeProcessor class, transforming the AST into an ASG (Abstract Syntax Graph), and loading it into a Neo4j graph database. This way, we can define Cypher graph queries to manipulate the ASG and to find error-patterns in it.
At the beginning, every CompilationUnit
of the analysed repository is a separate graph. At every repository check, we connect these separate graphs according to ECMAScript 6 import and export statements, so related CompilationUnit
s will be ASG-connected, enabling us to run queries involving multiple CompilationUnit
s. See Processing modules with Codemodel-Rifle.
One of the project's main points is to analyse repositories incrementally, reducing several minutes or even hours per repository analysis to several seconds. This is planned to be done via Git diffs: at every repository analysis, only the changed files are updated in the graph.
The analysis queries are planned to be run with FTSRG's ingraph Neo4j driver, which is incremental itself: it evaluates standing queries over a continously changing graph very effectively.
Codemodel-Rifle // Graph-based incremental static analysis of ECMAScript 6 source code repositories
All code in this repository is available under the Eclipse Public License v1.0 and is supported by the MTA-BME Lendület Research Group on Cyber-Physical Systems.