Go to file
Fedor Isakov c051542440 Replace usages of java.util.HashMap with persistent map to optimize
memory allocation.
2019-05-17 18:01:34 +02:00
.idea Updated the git configuration 2015-12-28 10:36:45 +01:00
.mps Introduce a test for running model checker on all models in the project as a part of CI. 2019-01-31 11:30:02 +01:00
coderules Drop usages of Rule.tag(), replace with Rule.uniqueTag(). 2019-05-17 18:01:34 +02:00
docs Docs: more adjustments according to appearance on html page 2019-02-13 16:20:24 +03:00
gradle/wrapper Upgrade gradle to 4.10.3 2019-01-31 17:39:39 +01:00
reactor Replace usages of java.util.HashMap with persistent map to optimize 2019-05-17 18:01:34 +02:00
samples Temporarily disable a test consuming way too much memory, and as 2019-05-16 17:43:01 +02:00
.gitattributes Initial import 2014-07-03 15:02:07 +02:00
.gitignore Ensure extracted baseLanguageExt stuff can be built from command line. 2018-07-17 15:09:47 +02:00
.travis.yml Configure the dependency on conreactor to be resolved through local maven repo. Make travis install reactor libs locally. 2018-07-19 10:52:03 +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 Add TeamCity build status badge 2019-02-03 23:54:41 +01:00
build.gradle Prevent gradle from creating unnecessary build folders. 2019-02-05 15:36:00 +01:00
build.xml Drop usages of deprecated interfaces. 2019-04-26 00:22:02 +02:00
gradle.properties Switch to release MPS 2019.1 2019-04-19 12:11:23 +02:00
gradlew Add gradle wrapper. 2017-06-13 15:53:03 +02:00
gradlew.bat Add gradle wrapper. 2017-06-13 15:53:03 +02:00
mps-full.svg Update readme to show full MPS icon 2018-08-07 13:32:05 +02:00
settings.gradle Fix gradle scripts to get rid of deprecated stuff. Default task to build everything without testing. Update INSTALL.txt. 2019-02-01 00:40:59 +01: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
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.