Go to file
Grigorii Kirgizov 00dc426f43 Consider case of NestedNewExpression for class creators (MPSCR-29) 2020-05-22 22:36:10 +03:00
.idea Updated the git configuration 2015-12-28 10:36:45 +01:00
.mps Fix build scripts and regenerate. 2020-05-09 10:54:18 +02:00
coderules Adjust principal constraints analysis to not consider node refs wrapped in terms 2020-05-22 21:40:03 +03:00
docs Document Operations of Reactor. 2019-10-16 13:31:22 +02:00
gradle/wrapper Update to gradle 6.3 2020-04-13 18:00:15 +02:00
reactor Document RuleMatchingProbe (most importantly, its matches() contract). 2020-04-30 15:38:34 +03:00
samples Consider case of NestedNewExpression for class creators (MPSCR-29) 2020-05-22 22:36:10 +03:00
.gitattributes Ensure no conflicts in build.xml -- employ "ours" strategy. 2019-08-22 15:15:28 +02:00
.gitignore upd .gitignore 2019-09-11 13:24:01 +03:00
.travis.yml Run gradle build with xvfb wrapper on Travis CI. 2019-07-30 15:39:02 +02:00
INSTALL.txt Straghten up build tasks: assemble to be the default task. Remove superfluous configure_gradle script, use -P switches instead. 2019-02-04 11:32:13 +01:00
README.md Update github status buttons. 2020-02-03 11:26:11 +01:00
build.gradle Document procedure to diagnose gradle build failure. 2020-05-07 08:40:28 +02:00
build.xml Rebuild project. 2020-05-09 15:08:47 +02:00
gradle.properties Switch to using MPS 2020.1 RC for build. 2020-05-09 15:22:03 +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 Code Rules

An experimental feature of JetBrains MPS. Code rules allow to create various code analyses employing constraints handling. The examples are provided, including type checking and control flow analysis of code written using MPSs baseLanguage.

Documentation

NEW! The documentation website is available.

Status

Travis CI TeamCity TeamCity EAP
Build Status

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.

Latest release can be found here.

The author can be reached by email fedor.isakov (AT) jetbrains.com or by Twitter.

JetBrains MPS is a project developed by JetBrains and is available via web and Twitter.

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.

Code rules serve as templates that produce constraint rules. Both transformation to constraint rules and evaluating is done in-memory at the time analysis is launched. Constraint rules are processed by the embedded engine.

Samples included with this project demonstrate how coderules can be used for solving concrete tasks connected with source code analysis.

Coderules allow for extensions to be provided by derived languages. Extensions have higher priority, so its easy to override the built-in behaviour.

The semantics of constraints handling is compatible with regular Java semantics, so coderules can be safely embedded into the user code. There also exists support for launching arbitrary code from when processing constraints.

Parallel or background execution of coderules is possible thanks to the reactive extensions, in particular rxjava, which is used by the implementation.

See implementation notes for more information.

Dependencies

The source code can be opened with the latest version of JetBrains MPS. The plugin that is created with the build script is also compatible with the same version of MPS.

Project structure

  • reactor - contains the implementation of constraint processing engine
  • coderules - implementation and tests
  • samples - sample projects using coderules

Installation

See INSTALL.txt.

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.