KJS: A Complete Formal Semantics of JavaScript
4 days ago
- #JavaScript
- #K Framework
- #Formal Semantics
- KJS is the most complete and thoroughly tested formal semantics of JavaScript to date.
- KJS passes all 2,782 core language tests from the ECMAScript conformance test suite.
- KJS provides a semantic coverage metric for test suites and can be used for formal analysis and verification.
- Installation instructions for Debian/Ubuntu distributions include JDK 1.8, build-essential, git, and maven.
- KJS is compatible with a customized version of the K framework, which can be installed via git.
- Node.js is required for testing programs with unsupported libraries like Math.sin.
- KJS supports only a part of standard libraries and may fail with unsupported functions like Date.now().
- The ECMAScript conformance test suite can be run with parallel processes, taking about 2 hours for all tests.
- KJS reports parsing errors for 6 programs due to grammar mismatches in function declarations.
- KJS supports standard built-in objects partially or fully, with some like Math and Date not defined.
- Applications of KJS include security attack detection, test coverage measurement, and program verification.
- A virtual machine with all required programs and libraries pre-installed is available.