Skip to content
Permalink
Browse files

[bonsai][compiler] Fix the compilation and installation of the compiler.

  • Loading branch information...
ptal committed Feb 22, 2019
1 parent bf6477d commit fcf3f2bac2474eebb3bdb770a3b81f63b751658a
@@ -9,15 +9,17 @@ These two paradigms are not mainstream and it is very likely that you did not he
In this tutorial, we walk you through the syntax and semantics of spacetime with various examples.
Our goal is to keep the tutorial accessible to programmers and computer scientists, and to give you an idea of the kind of problems this language can solve.

Independently of your background, a first step is to read the [Getting Started](getting-started.md) chapter.
We introduce the concepts of [Synchronous Programming](synchronous-programming.md) and the syntax of spacetime through several small examples.
Independently of your background, a first step is to read the [Getting Started](getting-started.html) chapter.
We introduce the concepts of [Synchronous Programming](synchronous-programming.html) and the syntax of spacetime through several small examples.
We make sure the build system is working out for you.
Secondly, we introduce some novelties of [Spacetime Programming](learn-spacetime.md) with examples stemming from constraint satisfaction problems such as Sudoku.
We next consider the more advanced concept of [Universe](universe.md) which is useful to design restarting search strategies.
Finally, we go through a full application of this language by designing a interactive search strategy for an [application of musical composition](application-composition.md).
Secondly, we introduce some novelties of [Spacetime Programming](learn-spacetime.html) with examples stemming from constraint satisfaction problems such as Sudoku.
We next consider the more advanced concept of [Universe](universe.html) which is useful to design restarting search strategies.
Finally, we go through a full application of this language by designing a interactive search strategy for an [application of musical composition](application-composition.html).

The code is available on [github](https://github.com/ptal/bonsai).

Note that this tutorial is a work-in-progress.

### Syntax cheat sheet

`p` and `q` are statements, `e` is an expression, `x` a variable identifier and `st` is a spacetime attribute (either `single_space`, `single_time` and `world_line`).
@@ -2,9 +2,8 @@

* [Introduction](README.md)
* [Getting Started](getting-started.md)
* [Synchronous Programming](synchronous-programming.md)
* [Learn Spacetime](learn-spacetime.md)
* [Universe](universe.md)
* [Application: Musical Composition](application-composition.md)
* [Benchmarks](benchmarks.md)
* [Contributing](contributing.md)
* [Submission to ESOP2019](complement-esop2019.md)
@@ -1,9 +1,9 @@
# Supplementary material to the submission to ESOP 2019
# Benchmark of the language

This supplementary page completes the evaluation of spacetime presented in the paper.
It also gives instructions to compile the examples presented in the paper.

If you want to replicate any benchmark and running examples, please go through the [Getting Started](getting-started.md) section first.
If you want to replicate any benchmark and running examples, please go through the [Getting Started](getting-started.html) section first.

## Evaluation

@@ -49,12 +49,13 @@ As for correctness, spacetime always find the same number of solutions as Choco,

### How to run the benchmark

First install spacetime by following the instructions in [Getting Started](getting-started.md).
First install spacetime by following the instructions in [Getting Started](getting-started.html).
Then you can simply type:

```
```sh
cd benchmark
./run.sh
# The "2> /dev/null" is to prevent Choco to print logging messages.
./run.sh 2> /dev/null
```

The file [Benchmark.java](https://github.com/ptal/bonsai/blob/master/benchmark/src/main/java/benchmark/Benchmark.java) contains some parameters that can be tweaked such as the size of the instances and the number of trials for each instance.
@@ -63,7 +64,7 @@ The file [Benchmark.java](https://github.com/ptal/bonsai/blob/master/benchmark/s

The compiler and runtime of spacetime are well tested, you can run the tests of the compiler with:

```
```sh
cargo test
cd runtime
mvn test
@@ -79,7 +80,7 @@ The [benchmark problems](https://github.com/ptal/bonsai/blob/master/benchmark/sr
To explore a simple example, have a look at the [HelloWorld](https://github.com/ptal/bonsai/tree/master/examples/bonsai/HelloWorld) folder.
It can be run with the following commands:

```
```sh
cd examples/bonsai/HelloWorld
./run.sh
```
@@ -1 +1,30 @@
# Learn Spacetime

Please [install spacetime](getting-started.md) first to run the program of this section.

## Running a first program

In this section, we compile a first spacetime program in a Java project.
Go to the toy project available at [examples/bonsai/HelloWorld](https://github.com/ptal/bonsai/tree/master/examples/bonsai/HelloWorld) and launch the following script:

```sh
./run.sh
```

It compiles and runs the code.
It prints the message `HelloWorld` 5 times:

```
Hello world!
1
Hello world!
2
Hello world!
3
Hello world!
4
5
```

You can start from this code to modify it.
The standard library of spacetime is usable and you can find different modules in the directory [libstd](https://github.com/ptal/bonsai/tree/master/libstd/src/main/java/bonsai).

0 comments on commit fcf3f2b

Please sign in to comment.
You can’t perform that action at this time.