ftsrg / codemodel-rifle Goto Github PK
View Code? Open in Web Editor NEWGraph-based incremental static analysis of ECMAScript 6 source code repositories
Home Page: http://docs.inf.mit.bme.hu/codemodel-rifle/
License: Eclipse Public License 1.0
Graph-based incremental static analysis of ECMAScript 6 source code repositories
Home Page: http://docs.inf.mit.bme.hu/codemodel-rifle/
License: Eclipse Public License 1.0
Gradle to 4.5.1
Neo4j to 3.3.3
Neo4j driver to 1.4.6 (we don't need the async features introduced in 1.5.0)
When exporting from exporter.js with the syntax export { name1 as default }
then name1 should be the default export of the module. Instead, it gets exported as an ordinary variable with the name "default". This is most possibly a Shift Parser bug.
Node IDs should be indexed, so setting relationships among (very much) ASG-nodes would be faster.
Neo4j provides a way to create indices on arbitrary properties, but they are not immediately available, but are created in the background:
CREATE INDEX ON :Node(id)
The syntax also suggests to append the Node
label to every ASG-node, so they can be ID-indexed alike.
The ImpermanentGraphDatabase is created on-the-run, so we do not have the time for the index to be created in the background. Searching for a solution to create an "immediate" index for an empty database.
The modules in the import-export cypher queries are connected with the following condition:
exporter.parsedFilePath CONTAINS import.moduleSpecifier
If exporter.js
exports export { name1 as exportedName1 }
and importer.js
imports import { exportedName1 as importedName1 } from "exporter"
, then:
exporter.parsedFilePath
is /path/to/codemodel/rifle/resources/exporter.js
import.moduleSpecifier
is simply exporter
This is usually enough if there are only few modules with significantly different names, but is not perfect: if there are more than one exporter.js
in different paths, there will be collisions, I guess. Edge cases and solutions are to be examined.
I am not sure how to display imported namespaces in the ASG. If no other variables are created in the importer module, the variable map is not even created. Not sure if the individual variables should be merged, or only their declarations or in some way, the namespace as one entity.
After merging imports and exports, we should have one global scope for a project with the child scopes connected. Now we have one GlobalScope for each imported file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.