open-index/open-npm huggingface dataset:
npm package: @stopify/elementary-js
Description: JavaScript without sharp edges.
Latest version: 1.3.3

# ElementaryJS

ElementaryJS is JavaScript, but with sharp edges removed. We use it
in the Ocelot JavaScript IDE. For an overview of what ElementaryJS does,
[see this page](https://umass-compsci220.github.io/Ocelot/)

## Building

On initialization (or when you update `package.json`):

    npm install

To build:

    npm run-script build

To lint:

    npm run-script lint

To test:

    npm run-script test

## Development

- `src/types.ts`: Types used throughout the codebase.

- `src/visitor.ts`: The heart of the ElementaryJS compiler. This code performs static checks and inserts dynamic checks that ElementaryJS enforces.

- `src/runtime.ts`: The ElementaryJS runtime system. This module has the implementations of the dynamic checks that the compiler inserts.

- `src/index.ts`: Entrypoint of the ElementaryJS package. This is the interface to ElementaryJS.

- `tests/`: Unit tests.

- `eval/`: Scripts and files used for evaluating ElementaryJS effectiveness.

## Unsupported Features

ElementaryJS does not support some JavaScript features, not because we intend to omit them, but because we haven't done the work to support them:

1. Array spread syntax
2. Destructuring assignment
npm package: @stopify/higher-order-functions
Description: A polyfill for higher-order functions that are compatible with Stopify
Latest version: 0.7.3

# @stopify/higher-order-functions

JavaScript programs that use native higher-order functions (e.g.,
``Array.prototype.map``, ``Array.prototype.filter``, etc.) are not compatible
with Stopify, since Stopify cannot instrument native functions to capture
continuations. This package provides polyfills for these functions that work
with Stopify.

# Usage

Before compiling the program with Stopify, use the compiler in this library to
call the polyfill functions:

```javascript
const ast = babylon.parse(code);
const polyfilled = polyfillHofFromAst(ast.program);
const runner = stopify.stopifyLocallyFromAst(polyfilled,
    undefined, compilerOpts, runtimeOpts);
```

This wraps arrays to call ``$stopifyArray``, which needs to be a global:

```javascript
runner.g.$stopifyArray: function(array: any) {
    return require('@stopify/higher-order/functions/dist/ts/mozillaHofPolyfill.lazy')
        .stopifyArray(array);
}
```
npm package: @stopify/normalize-js
Description: An ANF-inspired normalization of JavaScript
Latest version: 0.7.4

# @stopify/normalize-js

This package implements a semantics-preserving transformation
for JavaScript that is inspired by A Normal Form [^1]. The transformation
guarantees that:

1. All applications are named, unless they are in tail position.
   (A flag can be set to name applications in tail position too.)
2. All loops are *while* loops.
3. All branches are  *if* statements.
4. No declarations are hoisted.
5. All variables are declared before use.
6. No *continue* statements exist.

The transformation does introduce new *break* statements and labelled
statements.

## Using This Tool Independently

1. In the root of the repo:

    ```
    $ yarn
    ```

2. Then in this directory:

    ```
    $ yarn run build
    ```

3. Then run!

    ```
    node ./dist/ts/main.js <filename>
    ```


[^1]: Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen.
      The Essence of Compiling with Continuations. In Proceedings of
      *ACM SIGPLAN Conference on Programming Language Design and Implementation
      (PLDI)*, 1993.
npm package: @stopify/project-interpreter
Description: Support code for the interpreter project
Latest version: 1.1.5

[![Build Status](https://travis-ci.org/umass-compsci220/project-interpreter.svg?branch=master)](https://travis-ci.org/umass-compsci220/project-interpreter)

# Support Code for the Interpreter project

To build and test:

```
yarn install
yarn run build
yarn run test
```
npm package: @stopify/stopify
Description: Stopify makes JavaScript a better target language for high-level languages and web-based programming tools
Latest version: 0.7.7

# Stopify [![Build Status](http://23.20.114.147:5000/buildStatus/icon?job=stopify-build/master)](http://23.20.114.147:5000/blue/organizations/jenkins/stopify-build/activity?branch=master)

Stopify is a JavaScript-to-JavaScript compiler that makes JavaScript a better
target language for high-level languages and web-based programming tools.
Stopify enhances JavaScript with debugging abstractions, blocking operations,
and support for long-running computations.

Suppose you have a compiler *C* from language *L* to JavaScript. You
can apply Stopify to the output of *C* and leave *C* almost entirely
unchanged. Stopify will provide the following features:

1. Stopify will support long-running *L* programs without freezing the browser
   tab. In particular, programs can access the DOM and are not limited to
   Web Workers.

2. Stopify can pause or terminate an *L* program, even if it is an infinite
   loop.

3. Stopify can set breakpoints or single-step through the *L* program, if
   *C* generates source maps.

4. Stopify can simulate an arbitrarily deep stack and proper
   tail calls. This feature is necessary to run certain functional programs
   in the browser.

5. Stopify can simulate blocking operations on the web.

We have tested Stopify with ten languages: (1) C++, (2) Clojure, (3) Dart, (4)
Java, (5) JavaScript, (6) OCaml, (7) Pyret, (8) Python, (9) Scheme, and (10)
Scala. Some of these are available on the Stopify demo page
([www.stopify.org](http://www.stopify.org)) and the rest are coming soon.

To learn how to use Stopify in your own project, see the 
[Stopify Manual](http://www.stopify.org/manual.html).

For a technical overview of Stopify, see our PLDI 2018 paper
[Putting in All the Stops: Execution Control for JavaScript](https://arxiv.org/abs/1802.02974).