Minor update of README: use gradle wrapper, different target to generate models.

This commit is contained in:
Fedor Isakov 2017-06-14 10:00:05 +02:00
parent ab408b0c09
commit 884a322137
1 changed files with 16 additions and 13 deletions

View File

@ -1,6 +1,6 @@
# Type Checking with Constraint Rules
An experimental feature for [JetBrains MPS](https://jetbrains.com/mps) implementing a better type checking and type inference using constraint rules.
An experimental feature for [JetBrains MPS](https://jetbrains.com/mps) implementing a better type checking and type inference using constraint rules.
## Status
@ -9,12 +9,12 @@ An experimental feature for [JetBrains MPS](https://jetbrains.com/mps) implement
The status of this project is **pre-release**. Dont rely on any of the language features or the API to be stable. The purpose of this project is to show the new technology and collect early feedback.
## Overview
This project is the result of the research done within the MPS team in the area of code analysis using constraint rules, in particular [CHR](http://www.informatik.uni-ulm.de/pm/fileadmin/pm/home/fruehwirth/constraint-handling-rules-book.html).
Typing rules serve as templates that produce constraint rules. Both transformation to constraint rules and evaluating is done in-memory at the time type checking is launched. Constraint rules are processed by the embedded [engine](https://github.com/fisakov/conreactor).
The source code also contains the typing rules for *baseLanguage*, which serve to demonstrate how the various type inference problems are solved.
The source code also contains the typing rules for *baseLanguage*, which serve to demonstrate how the various type inference problems are solved.
## Features
@ -22,7 +22,7 @@ The language *jetbrains.mps.typesystem2* enables to write typing rules. A custom
![Example of a typing rule](/doc/img/typing-rule-example.png)
Type checking plugin for MPS provides the actions for checking the types in a currently opened root.
Type checking plugin for MPS provides the actions for checking the types in a currently opened root.
![](/doc/img/menu-example.png)
@ -30,13 +30,13 @@ Constraints activation trace view for debugging the process of evaluating constr
![Activation trace](/doc/img/activation-trace-example.png)
Once finished, the constraint rules produce the inferred types and type errors, which are added as highlighter annotations to the editor.
Once finished, the constraint rules produce the inferred types and type errors, which are added as highlighter annotations to the editor.
![](doc/img/type-annotation-example.png)
## Dependencies
The source code can be opened with the latest version of JetBrains MPS, which is 2017.1. The plugin that is created with the build script is also compatible with the same version of MPS.
The source code can be opened with the latest version of JetBrains MPS, which is 2017.1 as of the time this file is written. The plugin that is created with the build script is also compatible with the same version of MPS.
## Installation
@ -46,7 +46,7 @@ See the downloads section of the latest release for the plugin archive. This arc
## Hacking
The project is built using [gradle](http://www.gradle.org). To work with the source code, follow these steps:
The project is built using [gradle](http://www.gradle.org). To work with the source code, follow these steps:
1. Install JetBrains MPS using [this link](https://jetbrains.com/mps/download).
2. Clone this repository to your local drive.
@ -56,17 +56,21 @@ The project is built using [gradle](http://www.gradle.org). To work with the sou
By doing so you skip unpacking the MPS distribution by the gradle script.
4. Run gradle using the following command:
`gradle build`
4. Run gradle using the following command to generate all models:
`./gradlew generate`
In order to execute full build, including artefacts, run this command:
`./gradlew build`
If you want to run the tests as well as building the project, execute this instead:
`gradle test`
`./gradlew test`
5. The project is now ready to be opened with MPS.
NOTE: every time the source tree is cleaned, for example with `git clean` command, the gradle build has to be run in order to download the necessary libraries.
NOTE: every time the source tree is cleaned, for example with `git clean` command, the gradle script has to be run in order to download the necessary libraries.
## License
@ -83,4 +87,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.