Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacksongl/semanticdiff
A project aimed at detecting inconsistency among semantic-preserving code transformations for JavaScript.
https://github.com/jacksongl/semanticdiff
Last synced: about 1 month ago
JSON representation
A project aimed at detecting inconsistency among semantic-preserving code transformations for JavaScript.
- Host: GitHub
- URL: https://github.com/jacksongl/semanticdiff
- Owner: JacksonGL
- Created: 2015-02-17T02:40:49.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-06T05:19:05.000Z (almost 10 years ago)
- Last Synced: 2024-10-26T00:06:31.364Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.43 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SemanticDiff
A research project aimed at detecting inconsistency among semantic-preserving code transformations for JavaScript.This repository currently has been tested on Mac OS.
Install
-------------------------To run SemanticDiff you need to install jalangi2 first.
Install jalangi2
-------------------------See the Jalangi2 Repository here:
https://github.com/Samsung/jalangi2Install some node.js packages:
-------------------------```
npm install acorn
npm install escodegen
npm install promise
npm install argparse
npm install esotope
npm install [email protected]
npm install qunit
npm install phantom
npm install phantomjs -g
```Run SemanticDiff on node.js
-------------------------The last argument specifies the target JavaScript program to be analysed.
```
node ../jalangi2/src/js/commands/jalangi.js --inlineIID --inlineSource --analysis ../jalangi2/src/js/sample_analyses/ChainedAnalysesNoCheck.js --analysis src/js/analyses/lib/Utils.js --analysis src/js/analyses/traceRecorder.js tests/tiny_tests/test1.js
```Use SemanticDiff to detect inconsistency on simple JS minimization:
-------------------------The last argument specifies the target JavaScript program to be analysed.
```
./script/genTrace.sh
```Use of the Google Closure Compiler
-------------------------```
java -jar thirdParty/closure/compiler.jar --compilation_level WHITESPACE_ONLY --js_output_file tests/tiny_tests/regexp_min.js tests/tiny_tests/regexp.js
```Useful Resources
-------------------------Debugging JavaScript with SourceMap
https://developer.chrome.com/devtools/docs/javascript-debugging
Events to be observed by SemanticDiff
-------------------------* write to global variable
* putField on objects accessable from global name space
* console
* ajax
* alert
* modify domThings that could make minimization to go wrong
-------------------------* use of ```eval```
* statement without semicolon at the endAlso need to handle the ```math.random``` function
Resouces concerning the Google Closure Compiler
-------------------------[Compiler Assumptions](https://github.com/google/closure-compiler/wiki/Compiler-Assumptions)