|
2 | 2 |
|
3 | 3 |  |
4 | 4 |
|
| 5 | +## Welcome to LiquidJava |
5 | 6 |
|
6 | | -### Welcome to LiquidJava! |
7 | | - |
8 | | -LiquidJava is an additional typechecker for Java that supports liquid types and typestate. |
| 7 | +LiquidJava is an additional type checker for Java that based on liquid types and typestates. |
9 | 8 |
|
10 | 9 | Simple example: |
11 | 10 |
|
12 | | - |
13 | 11 | ```java |
14 | 12 | @Refinement("a > 0") |
15 | 13 | int a = 3; // okay |
16 | 14 | a = -8; // type error! |
17 | 15 | ``` |
18 | 16 |
|
19 | | -This project has the LiquidJava verifier, the api and some examples for testing. |
| 17 | +This project has the LiquidJava verifier, the API and some examples for testing. |
20 | 18 | You can find out more about LiquidJava in the following resources: |
21 | 19 |
|
22 | 20 | * [Website](https://catarinagamboa.github.io/liquidjava.html) |
23 | 21 | * [Examples of LiquidJava](https://github.com/CatarinaGamboa/liquidjava-examples) |
24 | | -* [LiquidJava Specification of Java StdLib](https://github.com/CatarinaGamboa/liquid-java-external-libs) |
| 22 | +* [LiquidJava Specification of the Java Standard Library](https://github.com/CatarinaGamboa/liquid-java-external-libs) |
25 | 23 | * [VSCode plugin for LiquidJava](https://github.com/CatarinaGamboa/vscode-liquidjava) |
26 | 24 | <!-- * [Formalization of LiquidJava](https://github.com/CatarinaGamboa/liquidjava-formalization) - not opensource yet --> |
27 | 25 |
|
28 | | - |
29 | 26 | ## Setup the project |
| 27 | + |
30 | 28 | 1. Clone the repository; |
31 | 29 | 2. Run `setup.sh`, some dependencies include using `Java 20` or newer and using `Maven`. |
32 | 30 | 3. Open the project in your favorite IDE (we have used Eclipse and VSCode) |
33 | | -4. Use the `.pom` in `liquidjava-umbrella` to `compile` and run the `tests` |
| 31 | +4. Use the `pom.xml` in the root directory (which your IDE may have renamed to`liquidjava-umbrella`) to compile and run the tests. |
34 | 32 |
|
35 | 33 | ## Run verification |
36 | | -#### In a specific project |
| 34 | + |
| 35 | +### In a specific project |
| 36 | + |
37 | 37 | Run the file `liquidjava-verifier\api\CommandLineLaucher` with the path to the target project for verification. |
38 | 38 | If there are no arguments given, the application verifies the project on the path `liquidjava-example\src\main\java`. |
39 | 39 |
|
40 | | - |
41 | 40 | ## Testing |
42 | | -Run `mvn test` to run all the tests in liquidjava. |
43 | 41 |
|
44 | | -The starter test file is `TestExamples.java` which uses the test suite under the `liquidjava-examples/testSuite`. |
| 42 | +Run `mvn test` to run all the tests in LiquidJava. |
| 43 | + |
| 44 | +The starter test file is `TestExamples.java` which uses the test suite under the `liquidjava-examples/testSuite`. |
| 45 | + |
| 46 | +Paths in the test suite are considered test cases if: |
45 | 47 |
|
46 | | -Paths in the testSuite are considered test cases if: |
47 | 48 | 1. File that start with `Correct` or `Error` (e.g, "CorrectRecursion.java") |
48 | 49 | 2. Package/Folder that contains the word `correct` or `error`. |
49 | 50 |
|
50 | 51 | Therefore, files/folders that do not pass this description are not verified. |
51 | 52 |
|
52 | 53 | ## Project structure |
53 | | -- **docs**: documents used for the design of the language. The folder includes a readme to a full artifact used in the design process, here are some initial documents used to prepare the design of the refinements language at its evaluation |
54 | | -- **liquidjava-api**: inlcudes the annotations that can be introduced in the Java programs to add the refinements |
55 | | -- **liquidjava-examples**: includes a main folder with the current example that the verifier is testing; the test suite that is used in maven test is under the `testSuite` folder |
56 | | -- **liquidjava-verifier**: has the project for verification of the classes |
57 | | - - *api*: classes that test the verifier. Includes the `CommandLineLauncher` that runs the verification on a given class or on the main folder of `liquidjava-examples` if no argument is given. This package includes the JUnit tests to verify if the examples in `liquidjava-example/tests` are correctly verified. |
58 | | - - *ast*: represents the abstract syntax tree of the refinement's language. |
59 | | - - *errors*: package for reporting the errors. |
60 | | - - *processor*: package that handles the type checking. |
61 | | - - *rj_language*: handles the processing of the strings with refinements. |
62 | | - - *smt*: package that handles the translation to the smt solver and the processing of the results the smt solver produces. |
63 | | - - *utils*: includes useful methods for all the previous packages. |
64 | | - - *test/java/liquidjava/api/tests* contains the `TestExamples` class used for running the testSuite |
65 | | - |
66 | 54 |
|
| 55 | +* **docs**: documents used for the design of the language. The folder includes a readme to a full artifact used in the design process, here are some initial documents used to prepare the design of the refinements language at its evaluation |
| 56 | +* **liquidjava-api**: inlcudes the annotations that can be introduced in the Java programs to add the refinements |
| 57 | +* **liquidjava-examples**: includes a main folder with the current example that the verifier is testing; the test suite that is used in maven test is under the `testSuite` folder |
| 58 | +* **liquidjava-verifier**: has the project for verification of the classes |
| 59 | + * *api*: classes that test the verifier. Includes the `CommandLineLauncher` that runs the verification on a given class or on the main folder of `liquidjava-examples` if no argument is given. This package includes the JUnit tests to verify if the examples in `liquidjava-example/tests` are correctly verified. |
| 60 | + * *ast*: represents the abstract syntax tree of the refinement's language. |
| 61 | + * *errors*: package for reporting the errors. |
| 62 | + * *processor*: package that handles the type checking. |
| 63 | + * *rj_language*: handles the processing of the strings with refinements. |
| 64 | + * *smt*: package that handles the translation to the SMT solver and the processing of the results the SMT solver produces. |
| 65 | + * *utils*: includes useful methods for all the previous packages. |
| 66 | + * *test/java/liquidjava/api/tests* contains the `TestExamples` class used for running the test suite. |
0 commit comments