Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TU Delft - Software Project (Interpreter) #799

Open
wants to merge 333 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
2270468
Merge branch 'error-utils' into 'dev'
AntonioLupu May 21, 2024
cc04d2a
Merge branch 'dev' into logical-operations
AntonioLupu May 21, 2024
1c797d2
Added join support
Senteran May 21, 2024
56db1ea
Checkstyle fixed
maria77102 May 21, 2024
69be2a7
Refactored method to use error utils
AntonioLupu May 21, 2024
e26f066
Fixed checkstyle
AntonioLupu May 21, 2024
4066674
Fixed list comparison functionality + tests
maria77102 May 21, 2024
a301db5
Fixed faulty implementation
AntonioLupu May 21, 2024
ecf439c
Merge branch 'logical-operations' of gitlab.ewi.tudelft.nl:cse2000-so…
AntonioLupu May 21, 2024
a28b425
Fixed branch coverage
AntonioLupu May 21, 2024
4a78764
Fixed javadoc text
AntonioLupu May 21, 2024
b85aab4
Tested join operation
Senteran May 21, 2024
53ff893
Merged into dev
Senteran May 21, 2024
fa8a76f
Merge branch 'logical-operations' into 'dev'
Senteran May 21, 2024
853182f
Merge branch 'comparison-maintainability' into 'dev'
Senteran May 21, 2024
6104ee2
Merge branch 'fix-checkstyle-errors' into 'dev'
Senteran May 21, 2024
fddc6f3
Merged to dev
Senteran May 21, 2024
ebbe15a
Fixed conflicts from merge with dev
May 21, 2024
10ca9db
Fix small issues and checkstyle
May 22, 2024
63626ff
Improved join implementation and testing
Senteran May 22, 2024
6493c1e
Changed how the result of an if is returned
May 22, 2024
502c890
Added complex test
May 22, 2024
df8e4d1
Removed unused imports
May 22, 2024
092e69b
Setting up an environment
maria77102 May 23, 2024
ac9ac3b
Fixed conditional implementation and checkstyle issues
May 23, 2024
7b99646
Removed unused imports
May 23, 2024
252dab5
Merge branch 'conditional' into 'dev'
AntonioLupu May 23, 2024
db17a7f
Merge branch 'dev' into 'further-list-operations'
Senteran May 23, 2024
c67ba47
Merge branch 'further-list-operations' into 'dev'
May 23, 2024
0af3c74
Extended max file length to 120
Senteran May 24, 2024
ef3b296
Required setup for environment
maria77102 May 24, 2024
a7fa5f1
Change interpreter methods in all classes to accomodate environments
maria77102 May 24, 2024
7ef79e5
Implemented interp method for Exists operations + Tests)
AntonioLupu May 24, 2024
dc27cfd
Variable support + tests
maria77102 May 24, 2024
75221ba
Implemented interp method for 'is absent' operation + Tests
AntonioLupu May 24, 2024
baafe87
Merge branch 'dev' into 'variable-support'
maria77102 May 24, 2024
5f92ed1
Implemented count operation + Tests
AntonioLupu May 24, 2024
d8d1dce
Implemented First operation + Tests
AntonioLupu May 24, 2024
1d06327
Fixed merge conflicts
maria77102 May 24, 2024
89c7091
Restored old files
AntonioLupu May 24, 2024
e4d1ee8
Changed the file in which methods were made and tested
AntonioLupu May 24, 2024
cc4424d
Arithmetics operations implementation with error handling and tests
May 24, 2024
e6f5bd9
Merge branch 'arithmetics' into 'dev'
AntonioLupu May 24, 2024
21baddc
Merge branch 'dev' into 'variable-support'
maria77102 May 24, 2024
2ca9c90
Fixed conflicts with dev (arithmetics)
maria77102 May 24, 2024
78ead24
Deleted comment/fixed test string
maria77102 May 24, 2024
b1ea203
Remove comments
maria77102 May 24, 2024
98e0f3a
Distinct, reverse, sum operations
Senteran May 26, 2024
c29a43f
Merge branch 'list-operations' into 'dev'
May 26, 2024
5489290
Fixed the number-based errors, now all tests pass
May 26, 2024
e2452ed
Merge branch 'dev' into 'variable-support'
maria77102 May 26, 2024
795f039
Resolved conflicts with distinct, reverse, sum
maria77102 May 26, 2024
f276edb
Merge branch 'dev' into 'main'
maria77102 May 26, 2024
dd5890b
Merge branch 'variable-support' into 'dev'
AntonioLupu May 26, 2024
a5015a4
Merged dev
AntonioLupu May 27, 2024
a48d793
Merge branch 'more-list-operations' into 'dev'
May 27, 2024
c3eff23
Added the Only-element list operation
May 28, 2024
1764c3a
Setup for record types
May 28, 2024
1904738
Added an error propagation test
May 28, 2024
0687ede
Fixed error propagation test
May 28, 2024
0cfeb87
Merge branch 'only-element' into 'dev'
Senteran May 28, 2024
5ef40b1
Added better error messages
Senteran May 30, 2024
5c8e569
Setup of new project
maria77102 May 31, 2024
329f644
Running checkstyle on subproject fixed
maria77102 May 31, 2024
b634009
Moved files into new subproject
AntonioLupu May 31, 2024
d7947f2
Changed pipeline to build and apply checkstyle on correct folders
AntonioLupu May 31, 2024
47ee051
Sorry forgot to save
AntonioLupu May 31, 2024
680e771
Added other folders in the pipeline build to actually make it pass (h…
AntonioLupu May 31, 2024
84a7d97
Made some changes to visitor and some xcore files to reduce the numbe…
Jun 1, 2024
9059414
Enum declaration (without the value reference) implementation as a re…
Jun 1, 2024
9d3ada4
Merge branch 'dev' into record-type
Jun 1, 2024
0659dd1
Added classes for date/time values
Jun 1, 2024
34e25ad
Added Simon's changes
Jun 2, 2024
a9cea42
Added implementation for constructor expressions
Jun 2, 2024
51c1a47
Added tests for Constructor Expressions for Record Types
Jun 2, 2024
2d3e676
Improved environment
Senteran Jun 4, 2024
d0acad7
Removed eobject implementation bloat
Senteran Jun 4, 2024
342f232
Improved error handling
Senteran Jun 4, 2024
1f66ef2
Revert project
Senteran Jun 4, 2024
e99513c
new readme
Senteran Jun 4, 2024
123df2f
Update .gitlab-ci.yml file to show coverage
maria77102 Jun 4, 2024
76e215a
Update .gitlab-ci.yml file to resolve dependencies
maria77102 Jun 4, 2024
29c8630
Update .gitlab-ci.yml file to find target directory
maria77102 Jun 4, 2024
5df64a2
Moved tests
maria77102 Jun 4, 2024
3c577fe
Merge branch 'refactoring-project' of gitlab.ewi.tudelft.nl:cse2000-s…
maria77102 Jun 4, 2024
81e751b
Update .gitlab-ci.yml file to show coverage using jacoco
maria77102 Jun 4, 2024
2184b1d
fix checkstyle and cache dependencies to make pipeline faster
maria77102 Jun 4, 2024
d260d27
Update .gitlab-ci.yml file to show coverage
maria77102 Jun 4, 2024
09a8b86
Update .gitlab-ci.yml file to cache dependencies
maria77102 Jun 4, 2024
d647da6
Update .gitlab-ci.yml file to (hopefully) cache dependencies
maria77102 Jun 4, 2024
c0fe4e3
Removed unnecessary things
Jun 4, 2024
6f69683
improved readme
Senteran Jun 4, 2024
6c44bb7
intercontinental ballistic missile
Senteran Jun 4, 2024
b36e1d1
attempt to remove references to old directory
Senteran Jun 4, 2024
2fa33ce
attempt to remove references to old directory
Senteran Jun 4, 2024
305d9ee
Added support for enum references as well
Jun 4, 2024
5f80df1
Added environment value in the interpreter
Jun 4, 2024
6107ebd
Merge branch 'dev' into 'main'
AntonioLupu Jun 5, 2024
f3aab4e
Removed Integer Value and changed some tests
AntonioLupu Jun 5, 2024
f9c38a0
Added implementation for feature calls and fixed constructor tests
Jun 5, 2024
f21805a
Fixed tests
maria77102 Jun 5, 2024
5dd0d25
Added tests for feature calls and fixed some checkstyle
Jun 6, 2024
cfff180
Fixed more checkstyle issues
Jun 6, 2024
8a2baa8
Changed implementation of feature calls
Jun 6, 2024
e46e51b
Merge branch 'dev' into record-type
Jun 6, 2024
01bf5e2
Removed RosettaInterpreterIntegerValue class
AntonioLupu Jun 6, 2024
dadf1c2
Made some changes so that the tests pass
AntonioLupu Jun 6, 2024
ec0b054
Added tests to check equality between ints, floats and doubles
AntonioLupu Jun 6, 2024
d1d0d92
Removed unused import
AntonioLupu Jun 6, 2024
4edc145
Added case for division by 0
AntonioLupu Jun 6, 2024
453e493
Incomplete function impl, doesn't support aliases and doesn't have fu…
Jun 6, 2024
4368060
Added some untracked files
Jun 6, 2024
1753116
Changed conditional to not evaluate both branches of if all the time
AntonioLupu Jun 6, 2024
5b366b2
Solved some conflicts
AntonioLupu Jun 6, 2024
1c4906c
List edge case test
maria77102 Jun 6, 2024
aef0b89
Merge branch 'reduceVisitorSize' into 'dev'
AntonioLupu Jun 6, 2024
bf150ae
Reverted .project file
AntonioLupu Jun 6, 2024
3959ebf
Complete implementation of functions
Jun 6, 2024
afaef5e
Checking compatibility with dev branch
Jun 6, 2024
989c9d3
Final touches to enums
Jun 6, 2024
bb207bc
Checking functions compatibility with dev
Jun 6, 2024
34e49c5
Increased coverage in interpreternew.values
maria77102 Jun 6, 2024
52a659a
Added hash/equals/to-string methods
Jun 6, 2024
b88e73f
Merge branch 'dev' into record-type
Jun 6, 2024
103b794
Merge branch 'remove-eobject-bloat' into 'dev'
Senteran Jun 6, 2024
1390aa3
Merge branch 'dev' into improve-environment
Senteran Jun 6, 2024
11c45d8
merge into dev
Senteran Jun 6, 2024
4e021c1
Increased coverage even more and removed unreachable branches
maria77102 Jun 6, 2024
691a95c
Reolved Antonio's comments
Jun 7, 2024
4aaf355
Added some extra comments
Jun 7, 2024
3a0926e
Removed unused imports
Jun 7, 2024
f01fbbd
Merge branch 'improve-environment' into 'dev'
Senteran Jun 7, 2024
6c370c1
Added error handling
Jun 7, 2024
67fbb24
Added valid method for time value
Jun 7, 2024
8cc679b
Fixed the javadoc in the main interpreter
Jun 7, 2024
4ae5e9c
Merge branch 'dev' into record-type
Jun 7, 2024
f0181a0
Fixed environment imports
Jun 7, 2024
caa64e4
Merged main
AntonioLupu Jun 7, 2024
c2dca0e
Start of implementation
Jun 10, 2024
87a10d8
Added classes for typed and typed feature values
Jun 10, 2024
0825bfe
Implemented code review suggestions
Senteran Jun 10, 2024
03dc158
merge into dev
Senteran Jun 10, 2024
e9cfc81
Added hashCode and toString, as well as some JavaDoc to the Function …
Jun 10, 2024
575356b
Added some commented changes that will be necessary once we have Enum…
Jun 10, 2024
e514c29
Merge branch 'record-type' into 'dev'
maria77102 Jun 10, 2024
76322e0
Merge branch 'small-refactoring' into 'dev'
Senteran Jun 10, 2024
d8af9ad
Fixed IntegerValue problems in record types
maria77102 Jun 10, 2024
983b38b
Merge branch 'dev' into 'main'
Senteran Jun 10, 2024
f4045d5
Added implementation for data type constructor and removed data type …
Jun 10, 2024
5c99f22
Fix merge conflicts
maria77102 Jun 11, 2024
2eb1177
Fix checkstyle
maria77102 Jun 11, 2024
a281227
Merge branch 'refactoring-project' into 'dev'
Senteran Jun 11, 2024
4a8e7c8
Added feature call implementation
Jun 12, 2024
3352ba8
Removed unused method
Jun 12, 2024
bbb3195
Merge with dev
Jun 12, 2024
f772607
Fixed conflicts
Jun 12, 2024
2f8dded
Fixed all conflicts
Jun 12, 2024
b30d65e
Fixed conflicts with dev
Jun 12, 2024
25d88d1
Fixed a bug in the tests
Jun 12, 2024
2a90cfa
Temp
Jun 12, 2024
1d5119e
Fixed checkstyle issues and reverted changes to pom and checkstyle
Jun 12, 2024
3362fe1
Added support for date subtraction
Jun 12, 2024
90a2fa4
Fixed checkstyle
Jun 12, 2024
7bd9fc3
Fixed checkstyle attempt#2
Jun 12, 2024
5209fcd
Fixed checkstyle and added supertype for data types
Jun 12, 2024
07341b4
Added tests for value classes
Jun 12, 2024
6aa84be
Fixed checkstyle #2
Jun 13, 2024
63f397f
Merge branch 'enum' into 'dev'
AntonioLupu Jun 13, 2024
4d78901
merge
Senteran Jun 13, 2024
8d91a44
Added test for data types with optional attribute
AntonioLupu Jun 13, 2024
0176022
Changed test name
AntonioLupu Jun 13, 2024
876a831
c
Senteran Jun 13, 2024
b77df01
Removed test from ConstructorExpressionTest class
AntonioLupu Jun 13, 2024
c836c72
c2
Senteran Jun 13, 2024
de3d1bf
Support for 'choice' operation
maria77102 Jun 13, 2024
284830e
Quality of code changes
Jun 13, 2024
01130b4
C
Jun 13, 2024
d3a4e4f
Conflict check
Jun 13, 2024
7d6a2f9
Improved documentation
Senteran Jun 14, 2024
9c5e7f3
Fixed some comments
Jun 14, 2024
897b80a
Merge branch 'dev' into data-types
Jun 14, 2024
fa30fce
Fixed tests
Jun 14, 2024
6b9e578
Improved the code quality of the functions
Jun 14, 2024
185137b
Fixed conflicts with dev
Jun 14, 2024
696a37d
Fixed more comments from MR
Jun 14, 2024
b0cf787
Started working on only exists
AntonioLupu Jun 14, 2024
f62575a
Improved code quality for the function interpreter, added support for…
Jun 14, 2024
5734a3a
Merge branch 'data-types' into 'dev'
AntonioLupu Jun 14, 2024
9c9c27a
Fix conflicts with dev
maria77102 Jun 14, 2024
d420634
Extra test and javadoc
maria77102 Jun 15, 2024
8ab676d
Decrease method nesting
maria77102 Jun 15, 2024
fd42663
Refactor method to separate condition verification
maria77102 Jun 15, 2024
962cc66
Implemented only-exists support
AntonioLupu Jun 15, 2024
5e51db1
Added some tests for only exists
AntonioLupu Jun 15, 2024
6dccbfe
Fixed checkstyle
AntonioLupu Jun 15, 2024
c541143
Removed error handling since it would not be reached
AntonioLupu Jun 15, 2024
1ecf649
Merge branch 'dev' into only-exists
AntonioLupu Jun 15, 2024
034dbd7
Merge branch 'choice-operation' into 'dev'
Jun 15, 2024
f1d17fa
Add support for one-of operation
maria77102 Jun 16, 2024
40fafa5
Merge branch 'errors' into 'dev'
Senteran Jun 16, 2024
137f048
Merge branch 'dev' into 'only-exists'
AntonioLupu Jun 16, 2024
8de5d5e
Changed comments explaining the methods into JavaDoc
AntonioLupu Jun 16, 2024
4a9580d
Merge branch 'only-exists' of gitlab.ewi.tudelft.nl:cse2000-software-…
AntonioLupu Jun 16, 2024
0e9ecc9
Merge branch 'only-exists' into 'dev'
Senteran Jun 16, 2024
967552b
Added the missing file
Jun 16, 2024
bc2b5ce
Fixes
Jun 16, 2024
47650ac
Fixed conflicts
Jun 16, 2024
af66af1
Merge branch 'one-of' into 'dev'
maria77102 Jun 17, 2024
161d146
Added functionality for conditions on data types
Jun 17, 2024
7bd2b7f
Added support for some parse operations
Jun 17, 2024
603c9ef
removed supposedly previousely removed error constructor
Senteran Jun 18, 2024
3ee3ef3
checkstyle fix
Senteran Jun 18, 2024
9ff853d
Merge branch 'overload' into 'dev'
Jun 18, 2024
b67998d
Merge branch 'dev' into functions
Jun 18, 2024
41b0c65
Added support for all operations
Jun 18, 2024
603a393
initial comparison test
Senteran Jun 18, 2024
d23b7b4
Solved merge conflicts
Jun 18, 2024
b2284f1
Added value tests for enums
Jun 18, 2024
b467d8e
Added support for data type declarations
Jun 18, 2024
d4d3b4a
Merge branch 'dev' into condition
Jun 18, 2024
2f5c459
Added data feature modification in functions + enum value tests
Jun 18, 2024
c35af4d
Added data changes
Jun 18, 2024
2dbf681
implemented simple test of somewhat comparison (i dont have functions…
Senteran Jun 18, 2024
1adfc50
added explanatory comments
Senteran Jun 18, 2024
aaba31e
Merge branch 'dev' into 'main'
AntonioLupu Jun 18, 2024
cba7ac6
Merge branch 'functions' into 'dev'
Senteran Jun 19, 2024
5df10a6
Merge branch 'dev' into 'parse-operations'
Senteran Jun 19, 2024
0f2f3f8
more test comment
Senteran Jun 20, 2024
89bc28b
fixed error tests and handling sort of
Senteran Jun 20, 2024
fd67fa9
merge
Senteran Jun 20, 2024
00d9e6a
merge into dev
Senteran Jun 20, 2024
0f88678
Incorporated the data changes to the functions tests
Jun 20, 2024
44feb4e
Merge branch 'dev' into functions
Jun 20, 2024
fe14b00
failed attempt at further tests
Senteran Jun 20, 2024
78b02d7
fix arithmetic
Senteran Jun 20, 2024
f58c369
?
Senteran Jun 20, 2024
dbcbf29
fix checkstyle
Senteran Jun 20, 2024
0a39fd5
Merge branch 'remove-bad-error' into comparison-testing
Senteran Jun 20, 2024
16b2e97
final stand
Senteran Jun 20, 2024
529c5b6
Changer the InterpreterBaseValue to just InterpreterValue
Jun 21, 2024
a0e1202
Merge branch 'parse-operations' of gitlab.ewi.tudelft.nl:cse2000-soft…
Jun 21, 2024
1fe9a40
Merge branch 'parse-operations' into 'dev'
Senteran Jun 21, 2024
058915f
Merge branch 'functions' into 'dev'
AntonioLupu Jun 21, 2024
0b4dcac
Merge branch 'dev' into remove-bad-error
Senteran Jun 21, 2024
d29e997
fix not null any longer
Senteran Jun 21, 2024
9530faf
fix checkstyle
Senteran Jun 21, 2024
ed37c77
Merge branch 'remove-bad-error' into 'dev'
AntonioLupu Jun 21, 2024
82cd826
testing more
Senteran Jun 21, 2024
4be2090
Merge branch 'comparison-testing' into 'dev'
maria77102 Jun 21, 2024
922bed4
Merge branch 'dev' into 'main'
Senteran Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ com.regnosys.rosetta.web/

# CVE scan reports
reports/
rosetta-lang/META-INF/
rosetta-lang/build.properties
rosetta-lang/plugin.properties
rosetta-lang/plugin.xml
37 changes: 37 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
image: maven:3.8-openjdk-17

variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"

cache:
paths:
- .m2/repository
key: one-key-to-rule-them-all


stages:
- build
- test
- checkstyle


build:
stage: build
script:
- mvn -D"maven.test.skip=true" clean package -pl rosetta-xcore-plugin-dependencies,rosetta-lang,rosetta-testing,rosetta-interpreter

test-jdk17:
stage: test
script:
- mvn $MAVEN_CLI_OPTS clean org.jacoco:jacoco-maven-plugin:prepare-agent test jacoco:report -pl rosetta-xcore-plugin-dependencies,rosetta-lang,rosetta-testing,rosetta-interpreter
- cat rosetta-interpreter/target/site/jacoco/index.html | grep -o -E "Total[^%]+?%" | sed -E "s/<.*>//" | sed -E "s/Total/TestCoverage:/"
artifacts:
paths:
- target/site/jacoco/jacoco.xml
coverage: /TestCoverage:(\d+)%/

checkstyle:
stage: checkstyle
script:
- mvn checkstyle:check -pl rosetta-interpreter

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "disabled"
}
178 changes: 59 additions & 119 deletions README.md

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions README_project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
---
title: "Rune DSL Overview"
date: 2022-02-09T00:38:25+09:00
description: "Rune is a Domain-Specific Language (DSL) that supports the modelling of operational processes for the financial markets' industry. Its purpose is to promote consistency and inter-operability between the various implementations of these processes."
draft: false
weight: 1
---

# Rune DSL

[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating)

**Continuous Integration:** [![Maven Central](https://img.shields.io/maven-central/v/com.regnosys.rosetta/com.regnosys.rosetta.parent.svg?maxAge=2592000)](https://search.maven.org/#artifactdetails%7Ccom.regnosys.rosetta%7Ccom.regnosys.rosetta.parent%7C2%7Cpom)

*Rune DSL* is a Domain-Specific Language (DSL) that supports the modelling of operational processes for the financial markets' industry. Its purpose is to promote consistency and inter-operability between the various implementations of these processes.

{{< notice info "Note" >}}
In software engineering, a [domain model](https://olegchursin.medium.com/a-brief-introduction-to-domain-modeling-862a30b38353) is a conceptual model of a business domain that incorporates both *data* and *logic* (i.e. rules and processes).
{{< /notice >}}

The key idea behind the Rune DSL is that, whilst financial markets' operational infrastructure is largely electronified, many of its underlying IT systems tend to operate in silos.

For instance, the same data are often represented differently between different applications - usually a reasonable choice when considering the respective purpose of each application. But without any formalised translation between them, data cannot easily flow from one application to another and the overall architecture looses cohesiveness. Applications also tend to mix the specification of their business logic with its technical implementation. Once buried in code, an application's logic is hard to extract and must usually be documented separately, with no guarantee of consistency.

**The Rune DSL allows to represent data and business logic in a system- and technology-agnostic way** into a cohesive domain model. By supporting a shared, formalised understanding of the financial markets' domain, it enables different technology implementations to "talk" to each other in the same native language.

A model expressed in the Rune DSL provides more than a technical specification: it automatically generates executable code, to be used directly in an implementation. Both the Rune DSL and associated code generators are available in open source.

**One important application of the Rune DSL concerns regulatory reporting**. While many financial institutions share the same reporting obligations, they usually implement their logic in slightly different ways because of siloed technology approaches. This exposes firms to non-compliance risk and fines and degrades the quality and comparability of the data that regulators collect.

Instead, Rune empowers many users within firms to take part in interpreting and codifying reporting rules, without the risk of loss-in-translation once they get implemented in IT systems. The language itself is designed to be human-readable, so that domain experts without programming experience (e.g. operations or compliance professionals) can write fully functional regulatory logic directly – a bit like in Excel.

## Rosetta

A complete end to end development environment called [Rosetta](https://ui.rosetta-technology.io/) is provided to help industry participants to create, edit or extend models using the Rune DSL. Rosetta also provides integration tools designed to facilitate firms' adoption and implementation of models within their own technology architecture.

Much like how software engineers use programming languages and tools to build and test software, it is useful to think of Rosetta as a platform with a set of tools to build and test a domain model using the Rune DSL. The [Rosetta products documentation](https://docs.rosetta-technology.io/rosetta/rosetta-products/) details the various tools and products that are available in the Rosetta platform.

In order to facilitate the use of the Rune DSL by industry members, a *Community Edition* of Rosetta that already features many of the platform's functionalities is available as a free web application. Through Rosetta, users can also access a number of open-source [modelling projects](https://docs.rosetta-technology.io/rosetta/projects/) that are based on the Rune DSL, allowing them to use, edit or extend those models.

## Rune DSL Components

The Rune DSL comprises 2 components, both open-source:

- *Syntax* - defines the language and rules for editing a model using the Rune DSL, also known as a *grammar*
- *Code generators* - from a model expressed in the Rune DSL, automatically generates executable code in other programming languages

### Syntax

The [Rune DSL repository](https://github.com/finos/rune-dsl/) contains the definition of the language. It is based on the [Eclipe Modelling Framework](https://www.eclipse.org/modeling/emf/).

The language components available in the Rune DSL and their syntax are detailed in the [Rune Modelling Components](https://docs.rosetta-technology.io/rosetta/rosetta-dsl/rosetta-modelling-component/) section of the documentation.

A [demonstration model](https://github.com/rosetta-models/demo), also available in open source, provides a set of working examples of those modelling components. Snippets extracted from this model are being used to support the DSL documentation.

### Code Generator

Code generators remove the need for software developers to translate the model specifications into executable code while ensuring the inter-operability of different implementations. The Rune DSL repository provides one default code generator, for [Java](https://www.oracle.com/java/).

To make models agnostic to the technology platform in which they are being implemented, other code generators have been provided in a variety of languages. A separate [code generator repository](https://github.com/REGnosys/rosetta-code-generators), also open source, allows the community to create and share code generators in potentially any software language.

The [Code Generator documentation](https://docs.rosetta-technology.io/rosetta/rosetta-dsl/rosetta-code-generators/) details the available code generators, the code generation mechanism and how to write and test one.

## Development setup

### Setup for developers
This guide is meant for everyone who wants to contribute to the Rune DSL and needs to get things up and running.

If this guide does not work for you, be sure to raise an issue. This way we can help you figure out what the problem is and update this guide to prevent the same problem for future users.

### 1. Building with Maven
Start by cloning the project: `git clone https://github.com/finos/rune-dsl`

Our project runs with Java 17. Make sure that your Maven also uses this version of Java by running `mvn -v`.

To build the project, run `mvn clean install`.

### 2. Setting things up in Eclipse
#### Install Eclipse IDE for Java and DSL Developers
Install the latest version of the "Eclipse IDE for Java and DSL Developers" using the [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer).

#### Install the Checkstyle plugin
We use [Checkstyle](https://checkstyle.sourceforge.io/) for enforcing good coding practices. The Eclipse plugin for Checkstyle can be found here: [https://checkstyle.org/eclipse-cs/#!/](https://checkstyle.org/eclipse-cs/#!/).

#### Install the Xsemantics plugin
We use the [Xsemantics DSL](https://github.com/eclipse/xsemantics) to define the type system of Rune. To enable language support for it in Eclipse, follow these steps:
1. Find out which version of Xsemantics you need by looking in the `pom.xml` file of the parent project. There should be a property called `xsemantics.version`.
2. Go to Help > Install New Software...
3. In 'Work with' fill in [https://download.eclipse.org/xsemantics/milestones/](https://download.eclipse.org/xsemantics/milestones/).
4. Install the appropriate version of XSemantics.

#### Setup the project
1. **Open the project in Eclipse**: File > Open Projects from File System..., select the right folder, click Finish.
2. **Update Maven dependencies**: right click on the `com.regnosys.rosetta.parent` project > Maven > Update project... and finish.

##### Troubleshooting
Make sure you have successfully run `mvn clean install`. (see section 1 of this guide)

If you're seeing 1000+ errors in the "Problems" window of Eclipse, try the following.
1. Disable auto-building. (Project > Build automatically)
2. Close Eclipse and open it again.
3. Update Maven dependencies again.
4. Re-enable auto-building.

### 3. Setting things up in Intellij
Support for developing Xtext projects in Intellij is limited. It has no support for
- editing `Xtend` files
- editing the `Xtext` file
- editing the `Xsemantics` file
- running `GenerateRosetta.mwe2`.

You can however let Maven take care of that, and still edit regular Java files, run tests, etc.

Unfortunately, there is an issue in Intellij that lets the Maven build fail, see
- https://youtrack.jetbrains.com/issue/IDEA-262695
- https://github.com/eclipse/xtext/issues/1953

In the stacktrace, you'll see a reference to a file called `plexus-classworlds.license`. It is safe to delete this file.
Once you do this, the build should succeed.

## Roadmap

Coming soon...

## Contributing
For any questions, bugs or feature requests please open an [issue](https://github.com/finos/rune-dsl/issues)
For anything else please send an email to {project mailing list}.

To submit a contribution:
1. Fork it (<https://github.com/finos/rune-dsl/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Read our [contribution guidelines](.github/CONTRIBUTING.md) and [Community Code of Conduct](https://www.finos.org/code-of-conduct)
4. Commit your changes (`git commit -am 'Add some fooBar'`)
5. Push to the branch (`git push origin feature/fooBar`)
6. Create a new Pull Request

_NOTE:_ Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool (or [EasyCLA](https://community.finos.org/docs/governance/Software-Projects/easycla)). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.

* Unsure if you are covered under an existing CCLA? Email [[email protected]](mailto:[email protected])*

## Get in touch with the Rune Team

Get in touch with the Rune team by creating a [GitHub issue](https://github.com/REGnosys/rosetta-dsl/issues/new) and labelling it with "help wanted".

We encourage the community to get in touch via the [FINOS Slack](https://www.finos.org/blog/finos-announces-new-community-slack).

## License

Copyright 2019 REGnosys

Distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

SPDX-License-Identifier: [Apache-2.0](https://spdx.org/licenses/Apache-2.0)
Loading