From aac6b89d40591701e0bbe724efcd75f9f624fe6a Mon Sep 17 00:00:00 2001 From: Niklas Rentz <47597619+NiklasRentzCAU@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:49:29 +0200 Subject: [PATCH 01/12] Update ci.yml Adopt is deprecated and to be replaced by temurin, see https://github.com/actions/setup-java/?tab=readme-ov-file#supported-distributions --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b6e70851..5dab83d13b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: uses: actions/setup-java@v2 with: java-version: '17' - distribution: 'adopt' + distribution: 'temurin' # Configure maven artifact caching - name: Cache local Maven repository From aa59be058c6dd9a202c3e8b8a36be2be51e43633 Mon Sep 17 00:00:00 2001 From: Niklas Rentz Date: Mon, 14 Oct 2024 13:00:04 +0200 Subject: [PATCH 02/12] language server: added all (missing) ELK algorithms to the language server. --- .../de.cau.cs.kieler.language.server/pom.xml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/language-server/de.cau.cs.kieler.language.server/pom.xml b/language-server/de.cau.cs.kieler.language.server/pom.xml index 16b03d1ab3..1625c873de 100644 --- a/language-server/de.cau.cs.kieler.language.server/pom.xml +++ b/language-server/de.cau.cs.kieler.language.server/pom.xml @@ -39,6 +39,56 @@ + + org.eclipse.elk + org.eclipse.elk.alg.disco + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.force + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.graphviz.dot + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.graphviz.layouter + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.layered + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.mrtree + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.radial + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.rectpacking + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.spore + ${elk-version} + + + org.eclipse.elk + org.eclipse.elk.alg.topdownpacking + ${elk-version} + org.eclipse.xtext org.eclipse.xtext From 8cfc732480203185f7c059ccbbaf47c874f11cf4 Mon Sep 17 00:00:00 2001 From: Alexander Schulz-Rosengarten Date: Thu, 17 Oct 2024 16:42:20 +0200 Subject: [PATCH 03/12] build: Upgraded target platform --- ....cau.cs.kieler.semantics.targetplatform.target | 6 +++--- build/pom.xml | 8 ++++---- .../de.cau.cs.kieler.language.server/pom.xml | 15 ++++++++++++++- oomph/kieler-semantics-developers.setup | 10 +++++----- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/build/de.cau.cs.kieler.semantics.targetplatform/de.cau.cs.kieler.semantics.targetplatform.target b/build/de.cau.cs.kieler.semantics.targetplatform/de.cau.cs.kieler.semantics.targetplatform.target index 1ff95bdf73..fe4c356df8 100644 --- a/build/de.cau.cs.kieler.semantics.targetplatform/de.cau.cs.kieler.semantics.targetplatform.target +++ b/build/de.cau.cs.kieler.semantics.targetplatform/de.cau.cs.kieler.semantics.targetplatform.target @@ -10,7 +10,7 @@ - + @@ -21,12 +21,12 @@ - + - + diff --git a/build/pom.xml b/build/pom.xml index 955af77a4b..2eb6a9ae67 100644 --- a/build/pom.xml +++ b/build/pom.xml @@ -12,15 +12,15 @@ 0.9.1 3.0.2.v20240507 - 0.22.0 + 0.23.0 0.51.0.v20240410 - 2.34.0 - 2.34.0 + 2.36.0 + 2.36.0 - 2.7.5 + 4.0.8 true diff --git a/language-server/de.cau.cs.kieler.language.server/pom.xml b/language-server/de.cau.cs.kieler.language.server/pom.xml index 1625c873de..729306eaab 100644 --- a/language-server/de.cau.cs.kieler.language.server/pom.xml +++ b/language-server/de.cau.cs.kieler.language.server/pom.xml @@ -135,6 +135,19 @@ ${lsp4j-version} + + + + org.eclipse.platform + org.eclipse.core.runtime + 3.31.100 + + + org.eclipse.platform + org.eclipse.equinox.common + 3.19.100 + + @@ -147,7 +160,7 @@ org.eclipse.jdt org.eclipse.jdt.core - 3.30.0 + 3.39.0 - 4.0.8 + 2.7.5 true From 6ed1faf8909a7be34513ce02e3f8377a3d651317 Mon Sep 17 00:00:00 2001 From: Alexander Schulz-Rosengarten Date: Mon, 21 Oct 2024 16:41:47 +0200 Subject: [PATCH 06/12] Adjusted uber jar script for latest conflict --- build/scripts/uberjar.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build/scripts/uberjar.py b/build/scripts/uberjar.py index 832b1358fa..e1501364a0 100644 --- a/build/scripts/uberjar.py +++ b/build/scripts/uberjar.py @@ -73,6 +73,7 @@ 'META-INF/NOTICE', 'META-INF/p2.inf', 'META-INF/versions/*/module-info.class', + 'META-INF/versions/*/OSGI-INF/MANIFEST.MF', 'OSGI-INF/l10n/bundle.properties', 'OSGI-INF/repositoryManager.xml', 'docs/*', From f47ab4d6055930e712b2f3d18a7563c515dcc6dd Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Tue, 22 Oct 2024 16:33:23 +0200 Subject: [PATCH 07/12] Avoid unnecessary parsing of model file --- .../KiCoolLanguageServerExtension.xtend | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/language-server/de.cau.cs.kieler.language.server/src/de/cau/cs/kieler/language/server/kicool/KiCoolLanguageServerExtension.xtend b/language-server/de.cau.cs.kieler.language.server/src/de/cau/cs/kieler/language/server/kicool/KiCoolLanguageServerExtension.xtend index 86d905be3a..459400415a 100644 --- a/language-server/de.cau.cs.kieler.language.server/src/de/cau/cs/kieler/language/server/kicool/KiCoolLanguageServerExtension.xtend +++ b/language-server/de.cau.cs.kieler.language.server/src/de/cau/cs/kieler/language/server/kicool/KiCoolLanguageServerExtension.xtend @@ -52,6 +52,7 @@ import org.eclipse.xtext.ide.server.ILanguageServerExtension import org.eclipse.xtext.ide.server.concurrent.RequestManager import org.eclipse.xtext.resource.XtextResourceSet import org.eclipse.xtext.util.CancelIndicator +import de.cau.cs.kieler.core.services.KielerLanguage /** * Implements methods to extend the LSP to allow compilation. Moreover, getting compilation systems and showing @@ -63,6 +64,8 @@ import org.eclipse.xtext.util.CancelIndicator class KiCoolLanguageServerExtension implements ILanguageServerExtension, KiCoolCommandExtension, ILanguageClientProvider { protected static val LOG = Logger.getLogger(KiCoolLanguageServerExtension) + + protected static val LANGUAGES = KielerLanguage.getAllRegisteredLanguages() @Inject @Accessors(PUBLIC_GETTER) RequestManager requestManager @@ -305,16 +308,29 @@ class KiCoolLanguageServerExtension implements ILanguageServerExtension, KiCoolC * @return CS specified by the above parameters. */ def getCompilationSystems(String uri, int index, boolean filterForSimulation, boolean snapshotModel) { - var Object model + var Class modelClass if (snapshotModel && diagramState !== null && diagramState.getKGraphContext(uri) !== null) { - model = diagramState.getKGraphContext(uri).inputModel + modelClass = diagramState.getKGraphContext(uri).inputModel?.class } else if (index != -1) { - model = this.objectMap.get(uri).get(index) + modelClass = this.objectMap.get(uri).get(index)?.class } else { - // get model of model specified by uri - model = getModelFromUri(uri) + for(l : LANGUAGES) { + for(ext: l.supportedResourceExtensions) { + if (uri.endsWith(ext)) { + if (l.supportedModels.size == 1) { + modelClass = l.supportedModels.head + } else { + modelClass = l.supportedModels.get(l.supportedResourceExtensions.indexOf(ext)) + } + } + } + } + if (modelClass === null) { + // get model of model specified by uri (reparsing) + modelClass = getModelFromUri(uri)?.class + } } - return getCompilationSystems(model, filterForSimulation, snapshotModel) + return getCompilationSystems(modelClass, filterForSimulation, snapshotModel) } /** @@ -324,10 +340,10 @@ class KiCoolLanguageServerExtension implements ILanguageServerExtension, KiCoolC * @param filterForSimulation true if only simulation cs should be returned * @return CS specified by the above parameters. */ - def getCompilationSystems(Object model, boolean filterForSimulation, boolean snapshotModel) { + def getCompilationSystems(Class modelClass, boolean filterForSimulation, boolean snapshotModel) { this.getSystemsThread = new GetSystemsThread([ - if (model !== null && model.class !== modelClassFilter) { - modelClassFilter = model.class + if (modelClass !== null && modelClass !== modelClassFilter) { + modelClassFilter = modelClass } var systems = getSystemModels(true, modelClassFilter) var systemDescriptions = getSystemDescription(systems, snapshotModel) From 4ad543f7c0d5eaa30f98a59d1f4fd811924506c4 Mon Sep 17 00:00:00 2001 From: Alexander SR Date: Tue, 22 Oct 2024 17:11:59 +0200 Subject: [PATCH 08/12] Moved adadptive fonts in same category as adaptive zoom --- .../cs/kieler/sccharts/ui/synthesis/hooks/FontSizeHook.xtend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/FontSizeHook.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/FontSizeHook.xtend index 057ef33614..1f0fe99520 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/FontSizeHook.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/FontSizeHook.xtend @@ -44,7 +44,7 @@ class FontSizeHook extends SynthesisHook { public static final SynthesisOption ADAPTIVE_FONTS = SynthesisOption.createCheckOption("Adaptive Fonts", false) - .setCategory(GeneralSynthesisOptions::LAYOUT) + .setCategory(GeneralSynthesisOptions::NAVIGATION) static final int SIMPLE_STATE_FONT_SIZE = 11 @@ -94,4 +94,4 @@ class FontSizeHook extends SynthesisHook { } } } -} \ No newline at end of file +} From 48e5178176c27676f623e516b3e55d2776a9196c Mon Sep 17 00:00:00 2001 From: Logan Kenwright Date: Sun, 27 Oct 2024 18:47:22 +1300 Subject: [PATCH 09/12] moved signal bodies to discrete scope so that the compiler doesn't get confused with local scopes --- .../transformators/incremental/SignalTransformation.xtend | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/de.cau.cs.kieler.esterel/src/de/cau/cs/kieler/esterel/processors/transformators/incremental/SignalTransformation.xtend b/plugins/de.cau.cs.kieler.esterel/src/de/cau/cs/kieler/esterel/processors/transformators/incremental/SignalTransformation.xtend index fa483f6ffd..adb7c027e6 100644 --- a/plugins/de.cau.cs.kieler.esterel/src/de/cau/cs/kieler/esterel/processors/transformators/incremental/SignalTransformation.xtend +++ b/plugins/de.cau.cs.kieler.esterel/src/de/cau/cs/kieler/esterel/processors/transformators/incremental/SignalTransformation.xtend @@ -136,8 +136,10 @@ class SignalTransformation extends AbstractSCEstDynamicProcessor { val parallel = createParallel val thread2 = createThread parallel.threads.add(thread2) - thread2.statements.addAll(module.statements) - thread2.statements.add(createAssignment(term, createTrue)) + var scope = createScopeStatement + thread2.statements.add(scope) + scope.statements.addAll(module.statements) + scope.statements.add(createAssignment(term, createTrue)) module.statements.add(parallel) module.declarations.add(decl) From 7aa2585d4faf02c619818a4c42d80c344ab499b3 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Mon, 9 Dec 2024 15:38:24 +0100 Subject: [PATCH 10/12] replace region surrounding spacing by ELK nodeNodeSpacing This makes is possible to control the spacing directly through layout options, which is convenient, but the spacing on the outside of the layout i.e. the spacing between the border of the state and the regions is slightly different than before. --- .../de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend | 2 +- .../sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend index f9f654ec9b..7f426e9830 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend @@ -491,7 +491,7 @@ class StateSynthesis extends SubSynthesis { node.setLayoutOption(RectPackingOptions.WHITE_SPACE_ELIMINATION_STRATEGY, WhiteSpaceEliminationStrategy.EQUAL_BETWEEN_STRUCTURES) node.setLayoutOption(RectPackingOptions.OMIT_NODE_MICRO_LAYOUT, true) node.setLayoutOption(CoreOptions::PADDING, new ElkPadding(0)) - node.setLayoutOption(CoreOptions::SPACING_NODE_NODE, 1.0) + node.setLayoutOption(CoreOptions::SPACING_NODE_NODE, 5.0) } def static void configureLayoutRegionDependencies(KNode node) { diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend index 5e68ab9050..fe179f6427 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend @@ -76,7 +76,7 @@ class ControlflowRegionStyles { background = REGION_BACKGROUND.color; foreground = REGION_FOREGROUND.color; lineWidth = 1; - setSurroundingSpace(2, 0); +// setSurroundingSpace(2, 0); ] } From 639daa60edc1fd8a23d9d3d7a45a3c207e06aeb4 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Mon, 9 Dec 2024 15:43:59 +0100 Subject: [PATCH 11/12] Update ControlflowRegionStyles.xtend --- .../sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend index fe179f6427..5522cca762 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend @@ -76,7 +76,6 @@ class ControlflowRegionStyles { background = REGION_BACKGROUND.color; foreground = REGION_FOREGROUND.color; lineWidth = 1; -// setSurroundingSpace(2, 0); ] } @@ -337,4 +336,4 @@ class ControlflowRegionStyles { def KRectangle setUserScheduleStyle(KRectangle krendering) { krendering.foreground = USER_SCHEDULE_COLOR.color } -} \ No newline at end of file +} From 5c8850e97ec5fd3b1fc93e8bb8bbfae803852281 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Mon, 9 Dec 2024 16:11:17 +0100 Subject: [PATCH 12/12] resolve conflict --- .../cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend | 2 +- .../sccharts/ui/synthesis/hooks/ActionsAsDataflowHook.xtend | 2 +- .../cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend index 7f426e9830..7a6158a614 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/StateSynthesis.xtend @@ -375,7 +375,7 @@ class StateSynthesis extends SubSynthesis { || (SHOW_INHERITANCE.booleanValue && !state.allVisibleInheritedRegions.empty) || !state.declarations.filter(MethodImplementationDeclaration).empty ) { - node.addRegionsArea + node.addRegionsArea(state) node.setLayoutOption(CoreOptions.NODE_SIZE_CONSTRAINTS, EnumSet.of(SizeConstraint.MINIMUM_SIZE)) } } diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/ActionsAsDataflowHook.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/ActionsAsDataflowHook.xtend index aa0d67c82f..981ac68a3f 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/ActionsAsDataflowHook.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/ActionsAsDataflowHook.xtend @@ -77,7 +77,7 @@ class ActionsAsDataflowHook extends SynthesisHook { if (SHOW_ACTIONS_AS_DATAFLOW.booleanValue) { container.children.remove(actionContainer) - node.addRegionsArea + node.addRegionsArea(state) val actions = newArrayList(state.actions) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend index afd8910176..8855cc614f 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend @@ -377,9 +377,10 @@ class StateStyles { /** * Add a child area to a macro state */ - def addRegionsArea(KNode node) { + def addRegionsArea(KNode node, State state) { node.contentContainer.addChildArea().setGridPlacementData() => [ - from(LEFT, 5, 0, TOP, -4, 0).to(RIGHT, 5, 0, BOTTOM, 5, 0) + val spacing = state.isInitial ? 9 : 7; + from(LEFT, spacing, 0, TOP, -4, 0).to(RIGHT, spacing, 0, BOTTOM, spacing, 0) minCellHeight = 5; minCellWidth = 5; ]