Skip to content

IETS3/iets3.opensource

Repository files navigation

iets3.opensource

Build instructions

Using Gradle

If you want to build the project, no prerequisites are required. Run ./gradlew build from the checkout directory. This will download the required mbeddr platform language library from the itemis Nexus repository. When the build finishes, you can open the project in MPS in <iets3.opensource>/code/languages/org.iets3.opensource

To publish this project's artifacts to the Maven local repository, run ./gradlew publishToMavenLocal.

If you want to use a custom version of mbeddr with Gradle, publish its artifacts to the local Maven repository (consult the mbeddr documentation).

Supported MPS versions

The latest supported MPS version is master, plus the three previous versions on maintenance branches.

What does support mean in this case?

We take care of porting changes done in older supported MPS versions to the newer ones. For details, see the wiki.

What MPS versions are currently supported?

MPS version Nexus branch
Master artifacts.itemis.cloud master
2024.1 artifacts.itemis.cloud maintenance/mps20241
2023.2 artifacts.itemis.cloud maintenance/mps20232
2022.3 artifacts.itemis.cloud maintenance/mps20223
2022.2 artifacts.itemis.cloud maintenance/mps20222

Documentation

Community

Slack

Ask your questions about KernelF and talk to other users and authors of the IETS3 language library on the public Slack channel.

Opening the project in MPS

Open the folder [ROOT]/code/languages/org.iets3.opensource in MPS, where ROOT is the root folder of this project.

Project Structure

The project is separated into the following virtual packages:

_build

Name Description
build-allScripts.xml This Ant script generates the overall build script that also contains the script for running the tests from the command line.
prebuild.xml This Ant script contains the analysis language, core base, and expressions base.
build-languages.xml This Ant script contains all languages and generates the finished zip file.
build-distro.xml This Ant script combines the files from the mbeddr platform with the files from the previous script.
build-tests.xml This Ant script contains all the test languages and solutions and also runs the KernelF generated tests as part of the build. This is achieved by including an instance of RunKernelFGeneratedTests.
build-testInterpreter.xml This Ant script generates and builds all project components to run the interpreter on test cases, without generating code for the tests. All test cases (specified per solution here) are not generated but directly run using the interpreter.

analysis

Name Description
org.iets3.analysis.base  This language contains basic concepts and interfaces and a plugin solution related to solvers.

assessment

Name Description
org.iets3.core.assessment It contains an AssessmentQuery to find untraced elements. It can be used inside an instance of Assessment inside an AssessmentContainer. It also contains a generic trace query to find traced elements.

comp (component)

Name Description
org.iets3.components.core.interpreter It contains the interpreter for the components language.
org.iets3.components.core.sandbox It is a sandbox for components.
org.iets3.components.plugin It contains a custom project view that displays all the components in the project.
tests.ts.components.core It contains test cases related to the components language.
org.iets3.components.core This language adds support for components (KernelF reference: page 24).
org.iets3.components.functional This language adds support for functional components.
org.iets3.components.hardware This language adds support for hardware components.
org.iets3.components.req It adds support for components in requirements.
test.iets3.component.attribute This language adds test attributes to components (see instances in components tests).

core

Name Description
org.iets3.core.plugin It contains a custom project view that displays all nodes related to the specification.
tests.org.iets3.core.comments It contains tests for comments.
org.iets3.core.attributes It contains the language that implements attributes for components.
org.iets3.core.base This language contains basic concepts/interfaces and a plugin solution related to this project.
org.iets3.core.users This language allows specifying users and user directories. Not used anywhere.

expr

The package genjava contains interpreters for generating Java code from KernelF. It also included an example for generating Java code from state machines.

Core language constructs (lang-core)

This package contains the following parts of KernelF (full paper, reference) including runtime solution and interpreters:

Package Name Description
org.iets3.core.expr.base KernelF base language reference
org.iets3.core.expr.collections support for lists, maps, sets KernelF reference: page 5
org.iets3.core.expr.lambda anonymous functions lambda) KernelF reference: page 6
org.iets3.core.expr.path path expressions (record) KernelF reference: page 61
org.iets3.core.expr.repl read–eval–print loop KernelF reference: page 12
org.iets3.core.expr.simpleTypes simple types (bool, numeric, string) KernelF reference: page 2
org.iets3.core.expr.simpleTypes.tests simple type tests It contains tests for simple types.
org.iets3.core.expr.tests expression test language It implements a language for testing expressions.
org.iets3.core.expr.toplevel top level expressions It contains expressions that can be used at the top level (records, functions, constants, etc). A top level can be, for example, a Library.
org.iets3.core.expr.tracing tracing It is a utility language that helps with tracing.

Advanced language constructs (lang-advanced)

This package contains the following parts of KernelF (full paper, reference) including runtime solution and interpreters:

Package Name Description
org.iets3.core.expr.adt algebraic data types(ADT) MPS Platform Docs
org.iets3.core.expr.data data tables MPS Platform Docs
org.iets3.core.expr.dataflow data flow MPS Platform Docs
org.iets3.core.expr.datetime date type KernelF reference: page 19
org.iets3.core.expr.doc expression documentation It contains additional top-level expressions for documentation purposes.
org.iets3.core.expr.lookup lookup table It implements a lookup table that supports a lookup method that returns the cell content at the specified index. example: KernelF reference: page 17
org.iets3.core.expr.math math expressions KernelF reference: page 6, MPS Platform Docs
org.iets3.core.expr.messages messages MPS Platform Docs
org.iets3.core.expr.metafunction meta functions KernelF reference: page 28
org.iets3.core.expr.natlang natural language expressions tests: #1
org.iets3.core.expr.query query expressions MPS Platform Docs
org.iets3.core.expr.stringvalidation string validation This language implements efficient string validation.
org.iets3.core.expr.temporal temporal type KernelF reference: page 20, MPS Platform Docs
org.iets3.core.expr.typetags type tags KernelF reference: page 67
org.iets3.core.expr.typetags.units old units MPS Platform Docs
org.iets3.core.expr.typetags.phyunits physical units MPS Platform Docs
org.iets3.core.expr.util#DecTab binary decision table
org.iets3.core.expr.util#DecTree decision tree MPS Platform Docs
org.iets3.core.expr.util#MultiDecTab multi-criteria decision table MPS Platform Docs
org.iets3.core.expr.util#RangeSpecifier ranges

Stateful language constructs (lang-stateful)

This package contains the following parts of KernelF (full paper, reference) including runtime solution and interpreters:

Package Name Description
org.iets3.core.expr.mutable mutable expressions KernelF reference: page 9
org.iets3.core.expr.process processes including multi-party-boolean-decisions KernelF reference: page 27
org.iets3.core.expr.statemachines state machines KernelF reference: page 10

Plugins

Package Description
org.iets3.core.expr.doc.plugin It implements a custom project view for bookmarks(IBookmark).
org.iets3.core.expr.lambda.plugin It contains refactoring actions for lambda expressions.
org.iets3.core.expr.plugin It contains various actions related to the KernelF language.
org.iets3.core.expr.repl.plugin It contains various actions related to REPL.

Tests

The tests are grouped into the playground, test suites and node test cases. The language org.iets3.core.expr.testExecution contains a configuration for the test execution mode (generator, interpreter).

req

This package includes all things related to the requirement documents.

Package Description
org.iets3.req.plugin It contains requirement-related actions, projection modes, and a custom project view that displays all requirements in the project.
org.iets3.req.glossary This language allows for defining terms in glossaries, which can be referenced in requirement documents.
org.iets3.req.req.core This language implements requirements documents. A new document can be created with the root node RequirementsChunk.

trace

This package includes all things related to tracing (KernelF reference: page 27).

Package Description
test.iets3.core.tracequery It contains trace tests.
org.iets3.core.trace It implements trace attributes (can be, for example, used in components).
org.iets3.core.test It is a language for trace testing.

variability

Name Description
org.iets3.variability.artifacts.base  This language contains basic concepts and interfaces related to variability.

Devkits

The following devkits are available:

Package Contents
org.iets3.core.expr.interpreter.devkit interpreters for core expressions
org.iets3.core.expr.base.devkit core expressions + their interpreters
org.iets3.core.expr.core.devkit base devkit + Read–Eval–Print Loop(REPL) + tracing
org.iets3.core.expr.advanced.devkit core expressions + interpreters
org.iets3.core.expr.stateful.devkit stateful expressions + interpreters
org.iets3.core.expr.repl.devkit Read–Eval–Print Loop(REPL)
org.iets3.components.devkit components
org.iets3.components.functional.devkit components + functional components
org.iets3.components.hardware.devkit components + hardware components
org.iets3.core.expr.genjava.core.devkit java generation of core expressions
org.iets3.core.expr.genjava.advanced.devkit java generation of advanced expressions
org.iets3.core.expr.genjava.stateMachineExample.devkit java generation of state machine example
org.iets3.core.expr.genall.core.devkit all core generation devkits
org.iets3.core.expr.genall.advanced.devkit all advanced generation devkits
org.iets3.req requirements

Creating a PR

When you open a PR, the build on TeamCity needs to be approved by a colleague at itemis, and a PR review is necessary. If this doesn't happen, please ask in the Slack channel. Often, builds fail at the following step: Check for dirty files. If that happens, some migrations were not executed in the project. Run ./gradlew migrate remigrate or gradlew.bat migrate remigrate on the command line to execute them and commit the changes. You can also copy the diff from the build log and apply it with git apply as a patch. You need to strip the line numbers, though:

  • Mac: pbpaste | sed 's/^.\{13\}//' | git apply
  • Windows Powershell: Get-Clipboard | ForEach-Object { $_ -replace '^.{13}', '' } | git apply
  • Linux solution 1: xclip -o | sed 's/^.\{13\}//' | git apply
  • Linux solution 2: xsel --clipboard --output | sed 's/^.\{13\}//' | git apply

Automatic Updating Of Dependencies

The Renovate bot updates the dependencies automatically for the master branch or optionally other branches and creates PRs for those changes. The configuration can be found at renovate.json5. The documentation for the configuration can be found at https://docs.renovatebot.com/configuration-options/.

About

Open Source Parts of IETS3

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 41