Skip to content

Commit

Permalink
Updated for v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnaldo committed Nov 29, 2022
1 parent 55516e4 commit 688f624
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 36 deletions.
48 changes: 17 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $ cd esmeta && git submodule update --init && sbt assembly && source .completion
If you see the following message, ESMeta is successfully installed:
```bash
$ esmeta
# Welcome to ESMeta v0.1.0-RC1 - ECMAScript Specification Metalanguage.
# Welcome to ESMeta v0.1.0 - ECMAScript Specification Metalanguage.
# Please type `esmeta help` to see the help message.
```

Expand Down Expand Up @@ -96,7 +96,9 @@ It supports the following commands:
and global options:
- `-silent` does not show final results.
- `-error` shows error stack traces.
- `-status` exits with status.
- `-time` displays the duration time.
- `-test262dir={string}` sets the directory of Test262 (default: `$ESMETA_HOME/tests/test262`).

If you want to see the detailed help messages and command-specific options,
please use the `help` command:
Expand All @@ -121,10 +123,10 @@ $ esmeta build-cfg
# ========================================
# build-cfg phase
# ----------------------------------------
# 0: def <SYNTAX>:CallExpression[3,0].Evaluation(this: Unknown): Unknown {
# 0: def <BUILTIN>:INTRINSICS.SyntaxError(...): Unknown {
# ...
# }
# 1: def <CONT>:AsyncGeneratorStart:cont0(): Unknown {
# 1: def <INTERNAL>:BuiltinFunctionObject.Construct(...): Normal[Object] | Abrupt[throw] {
# ...
# }
# ...
Expand Down Expand Up @@ -181,8 +183,8 @@ $ esmeta test262-test
# - harness : 96 tests are removed
# ...
# ----------------------------------------
# - total: 31,920 available tests
# - normal: 31,920 tests
# - total: 31,537 available tests
# - normal: 31,537 tests
# - error: 0 tests
# ----------------------------------------
# ...
Expand Down Expand Up @@ -304,18 +306,8 @@ $ esmeta tycheck
# ========================================
# tycheck phase
# ----------------------------------------
# - 1779 functions are initial targets.
# - 2360 functions are analyzed in 38704 iterations.
# --------------------------------------------------------------------------------
# ...
# --------------------------------------------------------------------------------
# def <SYNTAX>:ThrowStatement[0,0].Evaluation(this: Ast:ThrowStatement[0,0]): Unknown
# -> def <SYNTAX>:ThrowStatement[0,0].Evaluation(this: Ast:ThrowStatement[0,0]): Abrupt
# ...
# --------------------------------------------------------------------------------
# def ToBoolean(argument: Unknown): Unknown
# -> def ToBoolean(argument: ESValue): Boolean
# ...
# - 1806 functions are initial targets.
# - 2372 functions are analyzed in 32493 iterations.
```

You can perform type analysis on other versions of ECMA-262 with the
Expand All @@ -329,9 +321,6 @@ $ esmeta tycheck -extract:target=origin/main
$ esmeta tycheck -extract:target=2c78e6f
```

In the future version of ESMeta, we plan to support a bug detector to detect
type-related editorial bugs in ECMA-262 based on the type analysis results.


### Meta-Level Static Analyzer for ECMAScript

Expand All @@ -340,9 +329,8 @@ programs based on mechanized specifications extracted from ECMA-262. A
mechanized specification is an interpreter that can parse and execute JavaScript
programs. We introduced a way to indirectly analyze an ECMAScript/JavaScript
program by analyzing its interpreter with a restriction with the given program.
We call it _meta-level static analysis_ and will present this technique at
[ESEC/FSE
2022](https://2022.esec-fse.org/details/fse-2022-research-papers/19/Automatically-Deriving-JavaScript-Static-Analyzers-from-Specifications-using-Meta-Lev).
We call it _meta-level static analysis_ and presented this technique at
[ESEC/FSE 2022](https://dl.acm.org/doi/10.1145/3540250.3549097).

If you want to analyze JavaScript program using a meta-level static analysis,
please use the `analyze` command:
Expand All @@ -352,7 +340,7 @@ $ esmeta analyze example.js
# ========================================
# analyze phase
# ----------------------------------------
# - 111 functions are analyzed in 1708 iterations.
# - 108 functions are analyzed in 1688 iterations.
```

ESMeta supports an interactive Read–eval–print loop (REPL) for the analysis with
Expand All @@ -367,12 +355,12 @@ $ esmeta analyze example.js -analyze:repl
# - help Show help message.
# ...
#
# [1] RunJobs[62]:Call[637] -> {
# [1] RunJobs[42]:Call[339] -> {
# ...
# }

analyzer> continue
# - Static analysis finished. (# iter: 1708)
# - Static analysis finished. (# iter: 1688)

analyzer> print -expr @REALM.GlobalObject.SubMap.f.Value.SubMap.name.Value
# "f"
Expand All @@ -389,12 +377,10 @@ analyzer REPL.

### Publications

- [ASE 2020] [JISET: JavaScript IR-based Semantics Extraction
Toolchain](https://doi.org/10.1145/3324884.3416632) [[old repo](https://github.com/kaist-plrg/jiset)]
- [ICSE 2021] [JEST: N+1-version Differential Testing of Both JavaScript
Engines](https://doi.org/10.1109/ICSE43902.2021.00015) [[old repo](https://github.com/kaist-plrg/jest)]
- [ASE 2020] [JISET: JavaScript IR-based Semantics Extraction Toolchain](https://doi.org/10.1145/3324884.3416632) [[old repo](https://github.com/kaist-plrg/jiset)]
- [ICSE 2021] [JEST: N+1-version Differential Testing of Both JavaScript Engines](https://doi.org/10.1109/ICSE43902.2021.00015) [[old repo](https://github.com/kaist-plrg/jest)]
- [ASE 2021] [JSTAR: JavaScript Specification Type Analyzer using Refinement](https://doi.org/10.1109/ASE51524.2021.9678781) [[old repo](https://github.com/kaist-plrg/jstar)]
- [ESEC/FSE 2022] Automatically Deriving JavaScript Static Analyzers from Specifications using Meta-Level Static Analysis [[old repo](https://github.com/kaist-plrg/jsaver)]
- [ESEC/FSE 2022] [Automatically Deriving JavaScript Static Analyzers from Specifications using Meta-Level Static Analysis](https://doi.org/10.1145/3540250.3549097) [[old repo](https://github.com/kaist-plrg/jsaver)]

### PLDI 2022 Tutorial

Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import sbtassembly.AssemblyPlugin.defaultUniversalScript

// ESMeta version
// NOTE: please update VERSION together in top-level package.scala
ThisBuild / version := "0.1.0-rc10"
// NOTE: please update version info in the README.md file
ThisBuild / version := "0.1.0"

// Scala version
ThisBuild / scalaVersion := "3.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
"CreateArrayIterator",
"CreateBuiltinFunction",
"CreateUnmappedArgumentsObject",
"DeclarativeEnvironmentRecord.InitializeBinding",
"DeclarativeEnvironmentRecord.SetMutableBinding",
"ECMAScriptFunctionObject.Construct",
"FlattenIntoArray",
"ForIn/OfBodyEvaluation",
Expand Down Expand Up @@ -64,4 +62,4 @@
"StringCreate",
"ToBigInt",
"ToNumber"
]
]
2 changes: 1 addition & 1 deletion src/main/scala/esmeta/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import esmeta.error.NoEnvVarError
val LINE_SEP = System.getProperty("line.separator")

/** base project directory root */
val VERSION = "0.1.0-rc10"
val VERSION = "0.1.0"

/** base project directory root */
val BASE_DIR =
Expand Down

0 comments on commit 688f624

Please sign in to comment.