From 8308a9ce3c6877da22503214b19a5ef407f914f9 Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Thu, 6 Sep 2018 11:24:13 +0200 Subject: [PATCH] update docker and readme --- .travis.yml | 15 ------------- Dockerfile | 4 ++-- README.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 62 insertions(+), 18 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eb9ca9548..000000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: java -jdk: - - oraclejdk8 -install: true -script: - - scripts/get-neo4j.sh - - ./gradlew inits build -x :trainbenchmark-generator-sql:test -x :trainbenchmark-tool-mysql:test -x :trainbenchmark-tool-rdf4j:test -x :trainbenchmark-tool-blazegraph:test --stacktrace -notifications: - slack: ftsrg:YMFDeJB1YkOli9BXOKvtoB1Y - email: false - on_success: change - on_failure: always -branches: - except: - - ingraph diff --git a/Dockerfile b/Dockerfile index a88d0b1b5..026776b4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,9 @@ RUN Rscript /trainbenchmark/trainbenchmark-reporting/install.R WORKDIR /trainbenchmark COPY trainbenchmark/ /trainbenchmark/ -RUN sudo chown -R user:user /trainbenchmark +RUN chown -R user:user /trainbenchmark COPY docker /trainbenchmark/docker -RUN sudo chown -R user:user /trainbenchmark/docker +RUN chown -R user:user /trainbenchmark/docker COPY docker/bashrc /home/user/.bashrc RUN ./gradlew --no-daemon preprocess diff --git a/README.md b/README.md index 2d4f99e7c..835c6bc70 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,27 @@ The following table shows the relation of the terminology used in the paper and ## The Grammar Extension Preprocessor `RelAst` +To transform the grammar extension we provide a preprocessor for JastAdd +This preprocessor including its source code is provided in the `preprocessor` subdirectory. + +Its usage is: +- Running the preprocessor `java -jar relast-compiler.jar` +Run preprocessor on train benchmark (output written to standard output): + + - `cat examples/TrainBenchmark.relast` + - `java -jar relast-compiler.jar examples/TrainBenchmark.relast` + +Run preprocessor and write output to files: + + `java -jar relast-compiler.jar examples/TrainBenchmark.relast --file` + `cat examples/TrainBenchmarkGen.ast` + `cat examples/TrainBenchmarkGen.jadd` + +Run preprocessor and write output to files (with a different list class): + + `java -jar relast-compiler.jar examples/TrainBenchmark.relast --listClass=MyListClass --file` + `cat examples/TrainBenchmarkGen.ast` + `cat examples/TrainBenchmarkGen.jadd` ## The Train Benchmark @@ -117,9 +138,47 @@ However, since there are some software requirements imposed by the benchmark, pa #### Running the Benchmark with Docker +##### Loading the Docker Image -#### Running the Benchmark directly +- Variant 1 (recommended): Load the provided docker image + - Prerequisites: An installation of Docker in the `PATH` + - Steps: + - Unpack the provided archive and open a terminal in the extracted directory + - `docker load --input trainbenchmark-docker.tar` +- Variant 2: Build the docker image from the provided Dockerfile + - Prerequisites: An installation of Docker in the `PATH` + - Steps: + - Unpack the provided archive and open a terminal in the extracted directory + - `docker build -t trainbenchmark .` + - `docker run -it trainbenchmark` +##### Running the Docker Image +- `docker run -it trainbenchmark` + To make the results available outside the container, run + `docker run -it -v "$PWD"/docker-results:/trainbenchmark/results:Z -v "$PWD"/docker-diagrams:/trainbenchmark/diagrams:Z trainbenchmark` +- A command prompt is opened and some information is displayed +- Follow the instructions below +#### Running the Benchmark directly +- For running a standard run, + - `./run_small` + - `./run_medium` + - `./run_full` +- For running a custom run, + - run `./gradlew preprocess` to generate the + - run `./gradlew build shadowJar -x test` + - run `./gradlew initScripts` + - configure the scripts either by running `./scripts/configure.sh 1 <MAXSIZE> <TIMEOUT in s> <REPETITIONS>` + Where MAXSIZE is one of 2,4,8,16,32,64,128,256,512,1024. The larger sizes use **a lot of** disk space! + - *Alternatively*, run `` + - run `./gradlew initScripts` + - run `./gradlew generate` + - run the benchmark + - run `./gradlew individualInjectBenchmark` for the *inject* scenarios + - run `./gradlew individualRepairBenchmark` for the *repair* scenarios + - Plot the diagrams for the current run: `./gradlew plotIndividual` + +- The resulting data are in the `results` and the `diagrams` folder + - When running with docker, the data are also in `docker-results` and `docker-diagrams` on the host machine. -- GitLab