Skip to content

Code changes and organization#45

Open
folmate wants to merge 2 commits intoOpenModelica:mainfrom
PELAB-LiU:pr
Open

Code changes and organization#45
folmate wants to merge 2 commits intoOpenModelica:mainfrom
PELAB-LiU:pr

Conversation

@folmate
Copy link
Copy Markdown

@folmate folmate commented Apr 8, 2026

@lenaRB
As discussed during our last meeting, I starter cleaning up some of the changes I made.

So here is the first batch of changes (preserving java 1.8)

  • Code is split into 4+1 packages
    • crml.compiler: Code related to translating CRML to Modelica
    • crml.langauge: Code related to parsing CRML
    • crml.omc: Code related to running OpenModelica
    • crml.test: Test related stuff (I hope to eventually move it to /src/test/java)
    • crml: Application code (main)
  • Parsing CRML models should be done with crml.language.Parser. It has static functions to parse input from File, Path, String and CharStream. Latter 2 expect the textual model, not a textual path. Return type is a ParserResult that wraps the related artifacts. (It was originally a record, but that is not available in Java 1.8.)

I have a few more question for the continuation:

  • How strict is the requirement to use Groovy for Gradle, instead of Kotlin? (I find Kotlin a bit better and I already moved my version to it.)
  • Is it ok to separate the project to submodules for language and compiler?
  • Can I make the changes to move the test from main to test? I plan to make the calls for the specific tests to make if that is ok.
  • I'm thinking about how I can address the missing language features from later Java version.
    • Is there a specific IDE that we use? Some tools only work with IntelliJ nicely and otherwise it just makes a mess.
    • Would it be a problem if parts of the code were in Kotlin? (It has most of the convenient features and should be easy to make it target the Java 1.8 JVM.)

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 8, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants