# interactive-program-repair

> Interactive program repair in JavaScript

Latest version **0.0.9** (published 2020-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install interactive-program-repair
pnpm add interactive-program-repair
yarn add interactive-program-repair
bun add interactive-program-repair
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2020-06-01 |
| First published | 2020-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 292.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael Jae-Yoon Chung |
| Maintainers | mjyc |

## Links

- npm: https://www.npmjs.com/package/interactive-program-repair
- Repository: https://github.com/mjyc/interactive-program-repair
- Homepage: https://github.com/mjyc/interactive-program-repair#readme
- Issues: https://github.com/mjyc/interactive-program-repair/issues
- npm.io page: https://npm.io/package/interactive-program-repair

## Dependencies (2)

- [xstream](https://npm.io/package/xstream.md) 11.11.0
- [@cycle/time](https://npm.io/package/@cycle/time.md) 0.19.0

## Recent versions

- 0.0.9 (latest) — 2020-06-01
- 0.0.8 — 2020-06-01
- 0.0.7 — 2020-06-01
- 0.0.6 — 2020-01-27
- 0.0.5 — 2020-01-27
- 0.0.4 — 2020-01-26
- 0.0.3 — 2020-01-26
- 0.0.2 — 2020-01-26
- 0.0.1 — 2020-01-26

## README

# Interactive Program Repair

Interactive program repair in JavaScript.

This repo is based on "Iterative Repair of Social Robot Programs from Implicit User Feedback via Bayesian Inference" published in [RSS](https://roboticsconference.org/)2020.

## Examples

### Neck Exercise Program Repair

First, install nodejs (>= v10.16.0) and npm (>= 6.9.0). Then

1. Run the neck exercise program (or use [Codesandbox](https://codesandbox.io/s/github/mjyc/interactive-program-repair/tree/master/tools/robot)):
  ```
  cd tools/robot;
  npm install;
  npm build;
  npm start;
  ```

2. Follow the instructions. Once done, scroll down to find the "Download" button and click it to download the human-robot-interaction traces.
    - Note: you can review recorded data by running
      ```
      cd tools/dataplayer;
      npm install;
      echo '{ fileprefix: "prefix_to_downloaded_files" }' > src/settings.json
      npm start;
      ```

3. Run
  ```
  cd examples/example_program_repair
  node main.js downloaded_fileprefix/traces_{date}.json
  ```
  The output shows repaired program parameters.

### Testing Repair via a Human Simulator

Run

```
cd pkgs/callbag-fsm && npm install; # install dependencies
node demo4repair.js > path_to_simulated_human_inputs; # generate simulated data
cd ../../;
node examples/repair/main path_to_simulated_human_inputs # run repair with the generated data
```

See [`./pkgs/callbag-fsm/demo4repair.js`](./pkgs/callbag-fsm/demo4repair.js) for a human simulator implementation; details are available at [`./pkgs/callbag-fsm`](./pkgs/callbag-fsm).

## Thank you

- [Maya Cakmak](https://github.com/mayacakmak) for her support
- [Julie L. Newcomb](https://jn80842.github.io/) for inspiring discussions
- [Nicolas Dubien](https://github.com/dubzzz) for creating [fast-check](https://github.com/dubzzz/fast-check) where I learned about [model-based testing](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md)

---
_Source: https://npm.io/package/interactive-program-repair · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
