Skip to content

Commit

Permalink
#1 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jul 1, 2021
1 parent 0d31699 commit 2e0333f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,20 @@ This is an experimental polystat static analyzer.
Download `polystat.jar` from Maven Central and then run:

```bash
$ java -jar polystat.jar --help
$ java -jar polystat.jar test.eo
```

Read the output and follow the instructions.
The `test.eo` file must contain the code in EOLANG, for example
try this simple program that has a "division by zero" bug:

```
[x] > test
div. > @
5
add.
42
x
```

The output of Polystat will show you which `x` may cause
this program to crash.
2 changes: 1 addition & 1 deletion src/main/java/org/polystat/Polystat.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void exec(final String... args) throws Exception {
this.stdout.println(error);
}
} else {
this.stdout.println("Hello, world!");
this.stdout.println("Read our README in GitHub");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/polystat/PolystatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void saysHello() throws Exception {
new Polystat(new PrintStream(out)).exec();
MatcherAssert.assertThat(
out.toString(),
Matchers.equalTo("Hello, world!\n")
Matchers.containsString("README")
);
}

Expand Down

0 comments on commit 2e0333f

Please sign in to comment.