Go to file
Fedor Isakov b892bc3aa5 Avoid failing on empty handlers list, MPSCR-97 2021-11-15 13:00:03 +01:00
.idea Updated the git configuration 2015-12-28 10:36:45 +01:00
.mps Restore language module smodel.queryExt in the project 2021-08-17 09:30:48 +02:00
coderules Avoid failing on empty handlers list, MPSCR-97 2021-11-15 13:00:03 +01:00
docs Fix doc site timestamp 2021-05-27 16:33:51 +02:00
gradle/wrapper Update to gradle 6.3 2020-04-13 18:00:15 +02:00
reactor Cleanup and optimize Rule.Tag, drop unused methods 2021-05-18 12:32:03 +02:00
samples Add null guard NodeBuilder rule 2021-11-15 13:00:03 +01:00
.gitattributes Ensure no conflicts in build.xml -- employ "ours" strategy. 2019-08-22 15:15:28 +02:00
.gitignore Add .mps-caches to .gitignore 2021-09-21 17:54:51 +02:00
INSTALL.txt Fix reference to JDK version in INSTALL.txt 2021-06-18 18:41:01 +02:00
README.md Update README links to up-to-date TC configurations 2021-11-04 12:48:11 +01:00
build.gradle Ensure MPS_HOME is deleted on clean 2021-09-25 19:33:18 +02:00
build.xml Fix missing dependency 2021-09-23 15:16:17 +02:00
gradle.properties Switch to the latest MPS build 2021-10-14 18:28:43 +02:00
gradlew Update to gradle 6.3 2020-04-13 18:00:15 +02:00
gradlew.bat Upgrade to gradle 6.1 2020-01-20 16:51:03 +01:00
mps-full.svg Update readme to show full MPS icon 2018-08-07 13:32:05 +02:00
settings.gradle Rename all modules/models having prefix j.m.typechecking to j.m.coderules.typechecking. The former is reserved. 2019-06-05 16:15:59 +02:00

README.md

MPS CodeRules

An experimental feature of JetBrains MPS, Coderules is collection of languages that allow to utilize logical programming approach for solving typechecking and related problems.

JetBrains MPS is a project developed by JetBrains.

Documentation

The documentation is available online.

Installation

  1. Download the two plugins from this build configuration (see "artifacts" of the last successful build):
  • jetbrains.mps.coderules-212-*.zip (Coderules and related languages and accessory solutions)
  • jetbrains.mps.core-types-212-*.zip (Type definitions for core MPS languages)
  1. Install both plugins by choosing "Install Plugin from Disk.." option from "Manage..." menu of Plugins page in the preferences.
  2. Restart MPS.

Status

TeamCity TeamCity EAP

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 ongoing research done within MPS team in the area of code analysis using constraints handling, in particular CHR.

Analysis of source model with CodeRules can be described as a two-phase process.

  1. Collecting rule tables and applying rule templates.
  2. Processing constraint rules collected in the first stage.

In the first phase, languages used by the model being analysed and surveyed for the appropriate CodeRules aspect model, which is types in case of type checking. Coderules allow for extensions to be provided by derived languages. Extensions have higher priority, so its easy to override the built-in behaviour.

The outcome of this phase is a constraint rules program, which is a collection of rule tables, which in turn represent lists of constraint rules. This “program” however, exists in memory only as it does not have any textual representation.

In the second phase the constraints program that was created in phase one is evaluated. The semantics of constraints processing is compatible with regular Java semantics.

Samples

Sources

The source code can be opened with the last release of JetBrains MPS. See INSTALL.txt for information on how to set up the project.

The author can be reached by email fedor.isakov@jetbrains.com or by Twitter.

License

Copyright 2014-2017 JetBrains s.r.o.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software 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.