Implementierung
Go to file
2021-06-15 12:17:06 +02:00
frontend Reduce min height of proof tree 2021-04-04 17:39:49 +02:00
src Link to the repository 2021-03-31 15:01:01 +02:00
.gitignore Vaadin 18 -> 19 2021-03-10 16:07:52 +01:00
.gitlab-ci.yml CI: use nixpkgs 2021-06-15 12:17:06 +02:00
calcCoverage.sh Scripts used in CI 2021-03-14 11:08:40 +01:00
cover2cover.py Scripts used in CI 2021-03-14 11:08:40 +01:00
Dockerfile Installation instructions 2021-03-11 13:28:04 +01:00
LICENSE GPLv3 licensing 2021-03-14 10:00:22 +00:00
package.json Vaadin 18 -> 19 2021-03-10 16:07:52 +01:00
pnpm-lock.yaml Vaadin 18 -> 19 2021-03-10 16:07:52 +01:00
pom.xml Include manual report data 2021-03-12 10:42:22 +01:00
README.md Merge branch 'master' of https://git.scc.kit.edu/pse-typinferenz/typicalc 2021-03-12 13:32:44 +01:00
shell.nix CI: use nixpkgs 2021-06-15 12:17:06 +02:00
source2filename.py Scripts used in CI 2021-03-14 11:08:40 +01:00
tsconfig.json Convert frontend scripts to TypeScript 2021-03-10 18:39:41 +01:00
webpack.config.js Vaadin init 2021-01-26 16:05:33 +01:00

Typicalc

The project is a standard Maven project, so you can import it to your IDE of choice. Read more how to set up a development environment for Vaadin projects (Windows, Linux, macOS).

To Vaadin documentation

Running and debugging the application

Running the application from the command line.

To run from the command line, use mvn and open http://localhost:8080 in your browser.

Running and debugging the application in Intellij IDEA

  • Locate the Application.java class in the Project view. It is in the src folder, under the main package's root.
  • Right click on the Application class
  • Select "Debug 'Application.main()'" from the list

After the application has started, you can view it at http://localhost:8080/ in your browser. You can now also attach break points in code for debugging purposes, by clicking next to a line number in any source file.

Running and debugging the application in Eclipse

  • Locate the Application.java class in the Package explorer. It is in src/main/java, under the main package.
  • Right click on the file and select Debug As --> Java Application.

Do not worry if the debugger breaks at a SilentExitException. This is a Spring Boot feature and happens on every startup.

After the application has started, you can view your it at http://localhost:8080/ in your browser. You can now also attach break points in code for debugging purposes, by clicking next to a line number in any source file.

Fuzzing with JQF

Zest

Run:

mvn test-compile jqf:fuzz -Dclass=edu.kit.typicalc.model.parser.LambdaParserFuzzTest -Dmethod=testInference

This will use the LambdaTermGenerator to create random lambda terms that are then passed to the ModelImpl.

AFL

First install the necessary JQF tools: https://github.com/rohanpadhye/jqf/wiki/Fuzzing-with-AFL

Remove the @Ignore annotation in LambdaParserFuzzTest and run:

mvn test-compile
jqf-afl-fuzz -c target/test-classes:target/classes -i src/test/resources/terms/ edu.kit.typicalc.model.parser.LambdaParserFuzzTest testLambdaParserAFL

Generated inputs are stored in fuzz-results/queue/. More samples can be added to src/test/resources/terms/ to speed up the process.

Running tests + calculating test coverage

First run the unit tests:

mvn jacoco:prepare-agent test jacoco:report

Then run the application with the JaCoCo agent: (adjust the path to the agent jar)

mvn package -Pproduction
cp target/typicalc-1.0-SNAPSHOT.jar /tmp
java  -javaagent:$HOME/.m2/repository/org/jacoco/org.jacoco.agent/0.8.6/org.jacoco.agent-0.8.6-runtime.jar=port=36320,destfile=jacoco-it.exec,output=tcpserver -jar /tmp/typicalc-1.0-SNAPSHOT.jar

To run the integration tests:

mvn integration-test
mvn jacoco:dump@pull-test-data -Dapp.host=localhost -Dapp.port=36320 -Dskip.dump=false

JaCoCo execution data of manual tests should be exported to target/jacoco-manual.exec.

Finally, a code coverage report can be generated:

mvn antrun:run@generate-report -Dskip.int.tests.report=false

The report can be found at target/coverage-report/html/jacoco-multi/index.html.

Deploying using Docker

To build the Dockerized version of the project, run:

docker build . -t typicalc:latest

Once the Docker image is correctly built, you can run it:

docker run -p 80:8080 typicalc:latest

Deploying using a JAR

First build the application:

mvn clean package -Pproduction

Then run the server:

PORT=80 java -jar target/typicalc-1.0-SNAPSHOT.jar