Giter Site home page Giter Site logo

ftsrg / codemodel-rifle Goto Github PK

View Code? Open in Web Editor NEW
19.0 8.0 3.0 661 KB

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

Java 90.34% Shell 1.99% JavaScript 7.67%
static-analysis javascript shift-parser ecmascript6 ecmascript2016 code-analysis neo4j cypher incremental research

codemodel-rifle's People

Contributors

luczsoma avatar steindani avatar szarnyasg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codemodel-rifle's Issues

Bump versions

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)

IDs should be indexed to speed up setting node relationships at repository sync

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.

Impex modules are connected with very lazy checking

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.

How to display namespace-imports in the ASG?

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.

Merge GlobalScopes into a single scope

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.