Skip to content
Permalink
Browse files

[doc] Add companion guide to the paper submitted to PPDP19.

  • Loading branch information...
ptal committed May 11, 2019
1 parent 4df3e18 commit 6811e080919bd2de2818bfdf12f543529e8c0fdf
@@ -6,6 +6,8 @@
[travis]: https://travis-ci.org/ptal/bonsai
-->

[Companion guide to the paper submitted to PPDP19](http://hyc.io/spacetime/PPDP19.html)

Spacetime programming is a programming language on top of Java to describe search strategies exploring combinatorial state-space such as in constraint satisfaction problems.
Please consult the [spacetime manual](http://hyc.io/spacetime) for more information.

@@ -1,61 +1,75 @@
problems,size,nodes,solutions,fails,time(timeout=1080s),nodes per seconds,obj
NQueens,4,11,2,4,4315082(4ms)(0s),2549n/s,na
NQueens,5,27,10,4,5436722(5ms)(0s),4966n/s,na
NQueens,6,71,4,32,12060357(12ms)(0s),5887n/s,na
NQueens,7,207,40,64,19239670(19ms)(0s),10759n/s,na
NQueens,8,723,92,270,41507869(41ms)(0s),17418n/s,na
NQueens,9,2701,352,999,134018818(134ms)(0s),20153n/s,na
NQueens,10,10343,724,4448,288574479(288ms)(0s),35841n/s,na
NQueens,11,44327,2680,19484,1234262063(1234ms)(1s),35913n/s,na
NQueens,12,209051,14200,90326,6033862755(6033ms)(6s),34646n/s,na
NQueens,13,1053345,73712,452961,31593087031(31593ms)(31s),33340n/s,na
NQueens,14,5689301,365596,2479055,177211833093(177211ms)(177s),32104n/s,na
NQueensChoco,4,11,2,4,204633(0ms)(0s),53754n/s,na
NQueensChoco,5,27,10,4,235566(0ms)(0s),114617n/s,na
NQueensChoco,6,71,4,32,519718(0ms)(0s),136612n/s,na
NQueensChoco,7,207,40,64,935391(0ms)(0s),221297n/s,na
NQueensChoco,8,723,92,270,2870142(2ms)(0s),251903n/s,na
NQueensChoco,9,2681,352,989,10414608(10ms)(0s),257426n/s,na
NQueensChoco,10,10223,724,4388,40039151(40ms)(0s),255325n/s,na
NQueensChoco,11,43723,2680,19182,179399336(179ms)(0s),243718n/s,na
NQueensChoco,12,205819,14200,88710,896483444(896ms)(0s),229584n/s,na
NQueensChoco,13,1035143,73712,443860,5694564313(5694ms)(5s),181777n/s,na
NQueensChoco,14,5579051,365596,2423930,29763594814(29763ms)(29s),187445n/s,na
LatinSquare,30,685,1,0,601579096(601ms)(0s),1138n/s,na
LatinSquare,35,902,1,0,1371971201(1371ms)(1s),657n/s,na
LatinSquare,40,1223,1,0,2574607016(2574ms)(2s),475n/s,na
LatinSquare,45,1550,1,0,4973909990(4973ms)(4s),311n/s,na
LatinSquare,50,1979,1,0,8382301179(8382ms)(8s),236n/s,na
LatinSquare,55,2370,1,0,12266404153(12266ms)(12s),193n/s,na
LatinSquare,60,2953,1,0,19276435692(19276ms)(19s),153n/s,na
LatinSquare,65,3403,1,0,33301966542(33301ms)(33s),102n/s,na
LatinSquare,70,3929,1,0,48180524734(48180ms)(48s),81n/s,na
LatinSquare,75,4481,1,0,68495985452(68495ms)(68s),65n/s,na
LatinSquare,80,5267,1,0,94365742593(94365ms)(94s),55n/s,na
LatinSquareChoco,30,685,1,0,621461014(621ms)(0s),1102n/s,na
LatinSquareChoco,35,902,1,0,1330421168(1330ms)(1s),677n/s,na
LatinSquareChoco,40,1223,1,0,2503450986(2503ms)(2s),488n/s,na
LatinSquareChoco,45,1550,1,0,4557103940(4557ms)(4s),340n/s,na
LatinSquareChoco,50,1979,1,0,7829274683(7829ms)(7s),252n/s,na
LatinSquareChoco,55,2370,1,0,14454058294(14454ms)(14s),163n/s,na
LatinSquareChoco,60,2953,1,0,19469066122(19469ms)(19s),151n/s,na
LatinSquareChoco,65,3403,1,0,30288080613(30288ms)(30s),112n/s,na
LatinSquareChoco,70,3929,1,0,43307048274(43307ms)(43s),90n/s,na
LatinSquareChoco,75,4481,1,0,62123523848(62123ms)(62s),72n/s,na
LatinSquareChoco,80,5267,1,0,85653803458(85653ms)(85s),61n/s,na
GolombRulerIOLB,4,9,3,2,1277767(1ms)(0s),7043n/s,6
GolombRulerIOLB,5,19,3,7,2239983(2ms)(0s),8482n/s,11
GolombRulerIOLB,6,47,4,20,4461597(4ms)(0s),10534n/s,17
GolombRulerIOLB,7,487,5,239,36040899(36ms)(0s),13512n/s,25
GolombRulerIOLB,8,3705,8,1845,185321829(185ms)(0s),19992n/s,34
GolombRulerIOLB,9,31127,11,15553,1647811861(1647ms)(1s),18889n/s,44
GolombRulerIOLB,10,238219,11,119099,13422315277(13422ms)(13s),17747n/s,55
GolombRulerIOLB,11,4389807,16,2194888,277510878623(277510ms)(277s),15818n/s,72
GolombRulerChocoIOLB,4,7,2,2,747536(0ms)(0s),9364n/s,6
GolombRulerChocoIOLB,5,11,2,4,833751(0ms)(0s),13193n/s,11
GolombRulerChocoIOLB,6,29,3,12,1109435(1ms)(0s),26139n/s,17
GolombRulerChocoIOLB,7,167,4,80,4625705(4ms)(0s),36102n/s,25
GolombRulerChocoIOLB,8,981,7,484,30585592(30ms)(0s),32073n/s,34
GolombRulerChocoIOLB,9,5041,10,2511,94337582(94ms)(0s),53435n/s,44
GolombRulerChocoIOLB,10,31943,10,15962,813255733(813ms)(0s),39277n/s,55
GolombRulerChocoIOLB,11,569303,15,284637,23262703536(23262ms)(23s),24472n/s,72
NQueens,7,207,40,64,65225438(65ms)(0s),3173n/s,na
NQueens,8,723,92,270,99686608(99ms)(0s),7252n/s,na
NQueens,9,2681,352,989,204056097(204ms)(0s),13138n/s,na
NQueens,10,10223,724,4388,592906732(592ms)(0s),17242n/s,na
NQueens,11,43723,2680,19182,1217384553(1217ms)(1s),35915n/s,na
NQueens,12,205819,14200,88710,4663934739(4663ms)(4s),44129n/s,na
NQueens,13,1035143,73712,443860,24265896974(24265ms)(24s),42658n/s,na
NQueens,14,5579051,365596,2423930,131519925612(131519ms)(131s),42419n/s,na
NQueens,15,32206521,2279184,13824077,771097875379(771097ms)(771s),41767n/s,na
InlinedNQueens,7,207,40,64,5247465(5ms)(0s),39447n/s,na
InlinedNQueens,8,723,92,270,16640931(16ms)(0s),43447n/s,na
InlinedNQueens,9,2681,352,989,56200953(56ms)(0s),47703n/s,na
InlinedNQueens,10,10223,724,4388,197126152(197ms)(0s),51860n/s,na
InlinedNQueens,11,43723,2680,19182,794134623(794ms)(0s),55057n/s,na
InlinedNQueens,12,205819,14200,88710,3695337204(3695ms)(3s),55696n/s,na
InlinedNQueens,13,1035143,73712,443860,16444764745(16444ms)(16s),62946n/s,na
InlinedNQueens,14,5579051,365596,2423930,89955045285(89955ms)(89s),62020n/s,na
InlinedNQueens,15,32206521,2279184,13824077,528215872611(528215ms)(528s),60972n/s,na
NQueensChoco,7,207,40,64,1087630(1ms)(0s),190322n/s,na
NQueensChoco,8,723,92,270,4334730(4ms)(0s),166792n/s,na
NQueensChoco,9,2681,352,989,12185741(12ms)(0s),220011n/s,na
NQueensChoco,10,10223,724,4388,47172640(47ms)(0s),216714n/s,na
NQueensChoco,11,43723,2680,19182,201298713(201ms)(0s),217204n/s,na
NQueensChoco,12,205819,14200,88710,967410041(967ms)(0s),212752n/s,na
NQueensChoco,13,1035143,73712,443860,5327423735(5327ms)(5s),194304n/s,na
NQueensChoco,14,5579051,365596,2423930,30617350383(30617ms)(30s),182218n/s,na
NQueensChoco,15,32206521,2279184,13824077,185290846333(185290ms)(185s),173816n/s,na
LatinSquare,30,685,1,0,800939856(800ms)(0s),855n/s,na
LatinSquare,35,902,1,0,1428724569(1428ms)(1s),631n/s,na
LatinSquare,40,1223,1,0,2287014233(2287ms)(2s),534n/s,na
LatinSquare,45,1550,1,0,4066126599(4066ms)(4s),381n/s,na
LatinSquare,50,1979,1,0,6878192986(6878ms)(6s),287n/s,na
LatinSquare,55,2370,1,0,10821861706(10821ms)(10s),219n/s,na
LatinSquare,60,2953,1,0,16415906185(16415ms)(16s),179n/s,na
LatinSquare,65,3403,1,0,28009854992(28009ms)(28s),121n/s,na
LatinSquare,70,3929,1,0,39782924716(39782ms)(39s),98n/s,na
LatinSquare,75,4481,1,0,57178647691(57178ms)(57s),78n/s,na
LatinSquare,80,5267,1,0,77074673704(77074ms)(77s),68n/s,na
LatinSquare,85,5799,1,0,106179325404(106179ms)(106s),54n/s,na
LatinSquare,90,6673,1,0,140812767972(140812ms)(140s),47n/s,na
LatinSquareChoco,30,685,1,0,605656456(605ms)(0s),1131n/s,na
LatinSquareChoco,35,902,1,0,1263023461(1263ms)(1s),714n/s,na
LatinSquareChoco,40,1223,1,0,2368616588(2368ms)(2s),516n/s,na
LatinSquareChoco,45,1550,1,0,4288279957(4288ms)(4s),361n/s,na
LatinSquareChoco,50,1979,1,0,7186051461(7186ms)(7s),275n/s,na
LatinSquareChoco,55,2370,1,0,11508484565(11508ms)(11s),205n/s,na
LatinSquareChoco,60,2953,1,0,17788946906(17788ms)(17s),166n/s,na
LatinSquareChoco,65,3403,1,0,28250578406(28250ms)(28s),120n/s,na
LatinSquareChoco,70,3929,1,0,40445232775(40445ms)(40s),97n/s,na
LatinSquareChoco,75,4481,1,0,57634070913(57634ms)(57s),77n/s,na
LatinSquareChoco,80,5267,1,0,79133749800(79133ms)(79s),66n/s,na
LatinSquareChoco,85,5799,1,0,108513936438(108513ms)(108s),53n/s,na
LatinSquareChoco,90,6673,1,0,146163576628(146163ms)(146s),45n/s,na
InlinedGolombRulerIOLB,7,167,4,80,41060035(41ms)(0s),4067n/s,25
InlinedGolombRulerIOLB,8,981,7,484,112644843(112ms)(0s),8708n/s,34
InlinedGolombRulerIOLB,9,5041,10,2511,338809882(338ms)(0s),14878n/s,44
InlinedGolombRulerIOLB,10,31943,10,15962,1834998928(1834ms)(1s),17407n/s,55
InlinedGolombRulerIOLB,11,569303,15,284637,40130887392(40130ms)(40s),14186n/s,72
InlinedGolombRulerIOLB,12,4629587,16,2314778,425847842965(425847ms)(425s),10871n/s,85
InlinedGolombRulerIOLB,13,9711873,19,4855914,timeout,na,na
GolombRulerIOLB,7,167,4,80,10082190(10ms)(0s),16563n/s,25
GolombRulerIOLB,8,981,7,484,55519340(55ms)(0s),17669n/s,34
GolombRulerIOLB,9,5041,10,2511,308010474(308ms)(0s),16366n/s,44
GolombRulerIOLB,10,31943,10,15962,2141341691(2141ms)(2s),14917n/s,55
GolombRulerIOLB,11,569303,15,284637,51923570028(51923ms)(51s),10964n/s,72
GolombRulerIOLB,12,4629587,16,2314778,495762264874(495762ms)(495s),9338n/s,85
GolombRulerIOLB,13,8443559,19,4221757,timeout,na,na
GolombRulerChocoIOLB,7,167,4,80,2628680(2ms)(0s),63529n/s,25
GolombRulerChocoIOLB,8,981,7,484,16555108(16ms)(0s),59256n/s,34
GolombRulerChocoIOLB,9,5041,10,2511,120859398(120ms)(0s),41709n/s,44
GolombRulerChocoIOLB,10,31943,10,15962,1025313273(1025ms)(1s),31154n/s,55
GolombRulerChocoIOLB,11,569303,15,284637,27253887097(27253ms)(27s),20888n/s,72
GolombRulerChocoIOLB,12,4629587,16,2314778,279881961982(279881ms)(279s),16541n/s,85
GolombRulerChocoIOLB,13,14125191,19,7062570,timeout,na,na
@@ -43,8 +43,8 @@ private void start() {
// WARM-UP
// runChocoNQueens(14);
// Benches
// benchNQueens();
// benchLatinSquare();
benchNQueens();
benchLatinSquare();
benchGolombRuler();
}

@@ -61,9 +61,9 @@ private void benchNQueens() {
}

private void benchGolombRuler() {
// for (Integer n : paramsGolombRuler) {
// runBonsaiInlinedGolombRulerIOLB(n);
// }
for (Integer n : paramsGolombRuler) {
runBonsaiInlinedGolombRulerIOLB(n);
}
for (Integer n : paramsGolombRuler) {
runBonsaiGolombRulerIOLB(n);
}
@@ -73,9 +73,9 @@ private void benchGolombRuler() {
// for (Integer n : paramsGolombRuler) {
// runBonsaiGolombRulerMDLB(n);
// }
// for (Integer n : paramsGolombRuler) {
// runChocoGolombRulerIOLB(n);
// }
for (Integer n : paramsGolombRuler) {
runChocoGolombRulerIOLB(n);
}
// for (Integer n : paramsGolombRuler) {
// runChocoGolombRulerFFM(n);
// }
@@ -27,7 +27,7 @@
#[run(WhenT.whenAndTell, "94")]
#[run(WhenT.nonMonotonicTell, "4")]
#[run(WhenT.nonMonotonicTell2, "344")]
#[debug(WhenT.example4_4_thesis, "33")]
// #[debug(WhenT.example4_4_thesis, "33")]

package test;

@@ -0,0 +1,47 @@
# Companion guide to the paper submitted to PPDP19

This supplementary material gives instructions to compile and run the examples and benchmarks presented in the paper submitted to PPDP19.

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

## Demo of the examples in the paper

We provide a demonstration of the programs given in the paper in the directory [PPDP19](https://github.com/ptal/bonsai/tree/PPDP19/examples/bonsai/PPDP19).
After installing spacetime, you can simply type:

```sh
cd examples/bonsai/PPDP19
./run.sh
```

## Additional examples of strategies

Examples are provided in the [standard library](https://github.com/ptal/bonsai/tree/master/libstd/src/main/java/bonsai) of spacetime.
In particular, we have the following:

* [Depth-bounded discrepancy search (DDS)](https://github.com/ptal/bonsai/blob/PPDP19/libstd/src/main/java/bonsai/strategies/DDS.bonsai.java)
* [Improved Limited Discrepancy Search (ILDS)](https://github.com/ptal/bonsai/blob/PPDP19/libstd/src/main/java/bonsai/strategies/ILDS.bonsai.java)
* Highest and lowest discrepancy first variations of LDS can be obtained by changing the queueing strategy from `StackLR` to `StackRL`.

## How to run the benchmark

After installing spacetime, you can simply type:

```sh
cd benchmark
./run.sh
```

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.

## Tests

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
```

There are about 200 tests, ranging from the static analysis of the compiler ([compile-fail](https://github.com/ptal/bonsai/tree/master/data/test/compile-fail) and [compile-pass](https://github.com/ptal/bonsai/tree/master/data/test/compile-pass)) as well as the runtime behavior ([run-pass](https://github.com/ptal/bonsai/tree/master/data/test/run-pass)) to the correctness of the lattice library.
@@ -5,5 +5,5 @@
* [Learn Spacetime](learn-spacetime.md)
* [Universe](universe.md)
* [Application: Musical Composition](application-composition.md)
* [Benchmarks](benchmarks.md)
* [Complementary materials](PPDP19.md)
* [Contributing](contributing.md)
@@ -44,13 +44,13 @@ fn test_data_dir(filter: bool) {
engine.run();
}

// #[test]
// fn test_data_directory()
// {
// test_data_dir(false);
// }

#[test]
fn debug_run() {
test_data_dir(true);
fn test_data_directory()
{
test_data_dir(false);
}

// #[test]
// fn debug_run() {
// test_data_dir(true);
// }

0 comments on commit 6811e08

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