Commit 4bd36f0e authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Components: JavaFX editor. Merged master before review.

Issue-Ref: 3815
Issue-Url: https://af3-developer.fortiss.org/issues/3815

Signed-off-by: Florian Hölzl's avatarFlorian Hoelzl <hoelzl@fortiss.org>
parents dd13c424 b4926945
......@@ -74,18 +74,6 @@
path = org.fortiss.af3.mode.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.msc/.settings"]
path = org.fortiss.af3.msc/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.msc.ui/.settings"]
path = org.fortiss.af3.msc.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.ocra/.settings"]
path = org.fortiss.af3.ocra/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.operatorpanel/.settings"]
path = org.fortiss.af3.operatorpanel/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
......@@ -106,14 +94,6 @@
path = org.fortiss.af3.platform/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.platform.beagle/.settings"]
path = org.fortiss.af3.platform.beagle/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.platform.beagle.ui/.settings"]
path = org.fortiss.af3.platform.beagle.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.platform.hierarchic/.settings"]
path = org.fortiss.af3.platform.hierarchic/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
......@@ -134,14 +114,6 @@
path = org.fortiss.af3.project.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.refinement/.settings"]
path = org.fortiss.af3.refinement/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.refinement.ui/.settings"]
path = org.fortiss.af3.refinement.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.safety/.settings"]
path = org.fortiss.af3.safety/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
......@@ -166,14 +138,6 @@
path = org.fortiss.af3.schedule.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.specification/.settings"]
path = org.fortiss.af3.specification/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.specification.ui/.settings"]
path = org.fortiss.af3.specification.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.state/.settings"]
path = org.fortiss.af3.state/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
......@@ -190,14 +154,6 @@
path = org.fortiss.af3.task.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.testing/.settings"]
path = org.fortiss.af3.testing/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.testing.ui/.settings"]
path = org.fortiss.af3.testing.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.timing/.settings"]
path = org.fortiss.af3.timing/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
......@@ -206,11 +162,3 @@
path = org.fortiss.af3.timing.ui/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.af3.tools/.settings"]
path = org.fortiss.af3.tools/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
[submodule "org.fortiss.pragmatictransformation/.settings"]
path = org.fortiss.pragmatictransformation/.settings
url = https://git.fortiss.org/af3/plugin-settings.git
branch = master
......@@ -7,7 +7,6 @@ Bundle-Version: 2.16.0.qualifier
Bundle-Activator: eu.fbk.af3.tools.diagram.ui.DiagramUIActivator
Require-Bundle: eu.fbk.af3.tools.diagram;bundle-version="1.0.0",
org.fortiss.af3.component.ui,
org.fortiss.af3.specification,
org.eclipse.ui.workbench,
org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-11
......
AbstractComponentToImage.java 2da368d234415e072899b1827c83fa78b5523ffc GREEN
ExportComponentToImage.java 9f2c80bdb1af3bf3a6e6e7f8576785bd651e2d58 GREEN
ExportModelToDocument.java bae773e85bf862bfb45e6cdf7ae8959a9025e219 GREEN
ExportModelToDocument.java 4e13fb5d6bb0d264852bc490b51c3dd11b01f587 YELLOW
......@@ -25,7 +25,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
......@@ -73,11 +72,6 @@ public class ExportModelToDocument extends AbstractComponentToImage {
@Override
public List<IContributionItem> getContributedItems(EObject selection,
ContextMenuContextProvider contextProvider) {
// Hacky trick to allow overriding by the ocra plugin. Eclipse extension point
// should be investigated
if(Platform.getBundle("eu.fbk.af3.tools.ocra.ui") != null) {
return Collections.emptyList();
}
selectedComponent = null;
......
AnnotationConfiguration.java 8bdbeff8581523d9366f56f629ed6406f266ef63 GREEN
CodeAndOCRAContractEditorConfiguration.java c1bb0e3ed8e146d08db80af104b23cab5840101d GREEN
CodeEditorConfiguration.java b0d6dd0f6ead1a8c88e8724e9e15d439da8c0550 GREEN
CodeEditorConfiguration.java 2ca751b161d20a07e24114ada36f6bbc6470a8f9 GREEN
CodeEditorConfigurationBase.java cacadee36c976c3e34be00f400cce4af4624a1fa GREEN
UndoRedo.java 7bd80ec2023194a737470b3ebcb7600873adc067 GREEN
......@@ -34,7 +34,7 @@ import org.fortiss.af3.component.ui.editor.CodeSpecificationEditor;
* @author doebber
*/
public class CodeEditorConfiguration
extends CodeAndOCRAContractEditorConfiguration<CodeSpecification> {
extends CodeEditorConfigurationBase<CodeSpecification> {
/** Constructor. */
public CodeEditorConfiguration(CodeSpecificationEditor editor) {
......
......@@ -58,11 +58,11 @@ import org.fortiss.tooling.base.ui.editor.SourceEditorConfigurationBase;
* @author doebber
*/
public abstract class CodeAndOCRAContractEditorConfiguration<T extends EObject>
public abstract class CodeEditorConfigurationBase<T extends EObject>
extends SourceEditorConfigurationBase<T> {
/** Constructor. */
public CodeAndOCRAContractEditorConfiguration(SourceEditorBase<T> editor) {
public CodeEditorConfigurationBase(SourceEditorBase<T> editor) {
super(editor);
}
......
......@@ -11,194 +11,44 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.fortiss.af3.component.AF3ComponentActivator
Require-Bundle: org.fortiss.af3.allocation;visibility:=reexport,
org.fortiss.af3.expression;visibility:=reexport,
org.fortiss.af3.project;visibility:=reexport,
org.fortiss.pragmatictransformation,
org.fortiss.af3.tools
Export-Package: org.fortiss.af3.component;uses:="org.osgi.framework,
org.eclipse.core.runtime",
org.fortiss.af3.expression;visibility:=reexport
Export-Package: org.fortiss.af3.component,
org.fortiss.af3.component.compose,
org.fortiss.af3.component.constraint; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.component.model,
org.fortiss.tooling.kernel.extension.base,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.tooling.kernel.extension.data,
org.fortiss.af3.project.model.typesystem,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.component.model.behavior.common,
org.fortiss.af3.expression.model.terms",
org.fortiss.af3.component.generator.c; uses:="org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.expression.generator.c,
org.fortiss.tooling.kernel.extension.data,
org.fortiss.tooling.kernel.extension.base,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.generator.common.model.c,
org.fortiss.tooling.kernel.extension",
org.fortiss.af3.component.generator.component; uses:="org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.component.model,
org.fortiss.tooling.kernel.extension.data,
org.fortiss.tooling.kernel.extension.base,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.component.model.generator,
org.fortiss.af3.expression.generator,
org.fortiss.af3.expression.model.terms,
org.fortiss.af3.component.model.generator.port",
org.fortiss.af3.component.generator.java; uses:="org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.tooling.kernel.extension.data,
org.fortiss.tooling.kernel.extension.base,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.expression.generator,
org.fortiss.af3.expression.model.terms,
org.fortiss.tooling.kernel.extension,
org.fortiss.af3.generator.common.model.java",
org.fortiss.af3.component.generator.nusmv,
org.fortiss.af3.component.library; uses:="org.fortiss.af3.component.model,
org.fortiss.tooling.kernel.extension.data,
org.fortiss.tooling.kernel.model,
org.fortiss.tooling.kernel.extension",
org.fortiss.af3.component.library.prototypes;uses:="org.fortiss.af3.component.model,
org.fortiss.tooling.kernel.extension.base,
org.fortiss.tooling.kernel.extension.data",
org.fortiss.af3.component.constraint,
org.fortiss.af3.component.generator.c,
org.fortiss.af3.component.generator.component,
org.fortiss.af3.component.generator.fmu,
org.fortiss.af3.component.generator.java,
org.fortiss.af3.component.library,
org.fortiss.af3.component.library.prototypes,
org.fortiss.af3.component.listener,
org.fortiss.af3.component.migration,
org.fortiss.af3.component.model; uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.tooling.base.model.base,
org.eclipse.emf.common.util,
org.fortiss.af3.project.model.typesystem,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.expression.model.terms,
org.fortiss.af3.expression.model.definitions.library,
org.fortiss.af3.expression.model",
org.fortiss.af3.component.model.behavior;uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element",
org.fortiss.af3.component.model.behavior.code; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.component.model,
org.fortiss.af3.component.model.behavior",
org.fortiss.af3.component.model.behavior.code.impl;uses:="org.fortiss.af3.component.model,
org.fortiss.af3.component.model.behavior.code",
org.fortiss.af3.component.model.behavior.code.util; uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.component.model.behavior,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.component.model.behavior.code,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.eclipse.emf.ecore.util",
org.fortiss.af3.component.model.behavior.common; uses:="org.eclipse.emf.ecore,
org.eclipse.emf.common.util,
org.fortiss.af3.project.model.typesystem,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.expression.model.terms",
org.fortiss.af3.component.model.behavior.common.impl;uses:="org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.component.model,
org.fortiss.af3.component.model.behavior,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.af3.component.model.behavior.code.impl,
org.fortiss.af3.component.model.behavior.code.util,
org.fortiss.af3.component.model.behavior.common,
org.fortiss.af3.expression.model.terms",
org.fortiss.af3.component.model.behavior.common.util; uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.project.model.typesystem,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.component.model.behavior.common,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.eclipse.emf.ecore.util",
org.fortiss.af3.component.model.behavior.impl;uses:="org.eclipse.emf.ecore,
org.eclipse.emf.ecore.impl,
org.fortiss.af3.component.model.behavior",
org.fortiss.af3.component.model.behavior.util; uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.component.model.behavior,
org.fortiss.tooling.kernel.model,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.eclipse.emf.ecore.util",
org.fortiss.af3.component.model.generator; uses:="org.eclipse.emf.ecore,
org.eclipse.emf.common.util,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.expression.model.definitions",
org.fortiss.af3.component.model.generator.impl; uses:="org.eclipse.emf.ecore,
org.eclipse.emf.ecore.impl,
org.eclipse.emf.common.util,
org.fortiss.af3.component.model.generator,
org.eclipse.emf.common.notify,
org.fortiss.af3.expression.model.definitions.impl",
org.fortiss.af3.component.model.generator.port; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.component.model.generator,
org.fortiss.af3.expression.model.terms",
org.fortiss.af3.component.model.generator.port.impl;uses:="org.fortiss.af3.component.model.generator.port",
org.fortiss.af3.component.model.generator.port.util; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.project.model.typesystem,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.fortiss.af3.expression.model.terms,
org.fortiss.af3.component.model.generator.port,
org.eclipse.emf.ecore.util",
org.fortiss.af3.component.model.generator.util; uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.project.model.typesystem,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.component.model.generator,
org.fortiss.af3.expression.model.definitions,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.eclipse.emf.ecore.util",
org.fortiss.af3.component.model.impl; uses:="org.fortiss.af3.component.model,
org.eclipse.emf.common.util,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.af3.expression.model.terms",
org.fortiss.af3.component.model.util; uses:="org.eclipse.emf.ecore,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.component.model,
org.fortiss.tooling.base.model.layout,
org.fortiss.tooling.base.model.base,
org.fortiss.af3.project.model.typesystem,
org.fortiss.tooling.kernel.model,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.fortiss.af3.expression.model.definitions.library,
org.eclipse.emf.ecore.util",
org.fortiss.af3.component.model.behavior.common.impl,
org.fortiss.af3.component.model.behavior.common.util,
org.fortiss.af3.component.model.behavior.impl,
org.fortiss.af3.component.model.behavior.util,
org.fortiss.af3.component.model.generator,
org.fortiss.af3.component.model.generator.impl,
org.fortiss.af3.component.model.generator.port,
org.fortiss.af3.component.model.generator.port.impl,
org.fortiss.af3.component.model.generator.port.util,
org.fortiss.af3.component.model.generator.util,
org.fortiss.af3.component.model.impl,
org.fortiss.af3.component.model.util,
org.fortiss.af3.component.prototypes,
org.fortiss.af3.component.simulator; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.component.model,
org.fortiss.af3.project.typesystem,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.af3.project.typesystem.evaluation",
org.fortiss.af3.component.simulator.transform; uses:="org.fortiss.tooling.base.model.element,
org.fortiss.af3.component.model,
org.fortiss.tooling.kernel.extension.data,
org.fortiss.tooling.kernel.extension.exception,
org.fortiss.tooling.kernel.extension,
org.fortiss.af3.component.simulator",
org.fortiss.af3.component.utils; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.expression.model.terms.imperative,
org.fortiss.af3.project.model.execution,
org.fortiss.tooling.base.model.element,
org.fortiss.af3.component.model,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.af3.component.model.generator,
org.fortiss.af3.component.model.generator.port,
org.fortiss.af3.component.simulator,
org.fortiss.af3.project.model,
org.eclipse.emf.common.util,
org.fortiss.af3.project.model.typesystem,
org.fortiss.af3.component.model.behavior.common,
org.fortiss.af3.expression.model.terms,
org.fortiss.af3.expression.model",
org.fortiss.af3.component.simulator,
org.fortiss.af3.component.simulator.transform,
org.fortiss.af3.component.utils,
test.org.fortiss.af3.component,
test.org.fortiss.af3.component.library; uses:="org.eclipse.emf.ecore,
org.fortiss.af3.component.model,
org.fortiss.tooling.kernel.model,
org.fortiss.af3.project.model",
test.org.fortiss.af3.component.model; uses:="org.fortiss.af3.project.model.execution,
org.fortiss.af3.component.model,
test.org.fortiss.af3.expression.base,
org.fortiss.af3.component.model.behavior.code,
org.fortiss.af3.component.simulator",
test.org.fortiss.af3.component.simulator;uses:="test.org.fortiss.af3.testbase,
org.fortiss.af3.component.simulator"
test.org.fortiss.af3.component.codespec,
test.org.fortiss.af3.component.generator,
test.org.fortiss.af3.component.library,
test.org.fortiss.af3.component.model,
test.org.fortiss.af3.component.semantics,
test.org.fortiss.af3.component.simulator
documentation.html 5dd7922ecb86cb895bb27d11d721a6dd286ec802 GREEN
documentation.html 837e8ee051327fd1cb745cf47de5075ba4786083 YELLOW
......@@ -42,7 +42,6 @@ is called the <i>Component Architecture Root</i>.</p>
<li><tt>component.generator.component</tt>: intermediate language generator for composite components and code
specifications.</li>
<li><tt>component.generator.java</tt>: Java-code generator.</li>
<li><tt>component.generator.nusmv</tt>: a collection of transformations from this model to <i>NuSMV</i>.</li>
<li><tt>component.library</tt>: classes for dealing with the library of components.</li>
<li><tt>component.library.prototypes</tt>: prototypes for the library of components.</li>
<li><tt>component.model.behavior.common.impl</tt>: static implementations for EOperations defined by
......
......@@ -309,62 +309,4 @@
</modelElementClass>
</modelElementCompositor>
</extension>
<extension
point="org.fortiss.pragmatictransformation.pragmaticTransformationProvider">
<transformationProvider
transformationName="flattenVariableDefs">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.FlattenVariableDefs"></transformation>
</transformationProvider>
<transformationProvider transformationName="codeSpecPrepareT0">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.CodeSpecPrepareAddReturnStatement">
</transformation>
</transformationProvider>
<transformationProvider transformationName="codeSpecPrepareT1">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.CodeSpecPrepareToIfElseBlock">
</transformation>
</transformationProvider>
<transformationProvider transformationName="codeSpecPrepareT2">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.CodeSpecPrepareToIfSequence">
</transformation>
</transformationProvider>
<transformationProvider transformationName="codeSpecPrepareT3">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.CodeSpecPrepareRemoveMultipleAssignments">
</transformation>
</transformationProvider>
<transformationProvider
transformationName="arrayToStructSmallStepA">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.ArrayToStructVariableDefinition">
</transformation>
</transformationProvider>
<transformationProvider
transformationName="resolveStandaloneBooleanVars">
<transformation
transformation="org.fortiss.af3.component.generator.nusmv.StandaloneBooleanVarToFunctionCall"></transformation>
</transformationProvider>
</extension>
<extension point="org.fortiss.pragmatictransformation.pragmaticTransformationProvider">
<transformationProvider transformationName="copyProject">
<transformation transformation="org.fortiss.af3.component.generator.nusmv.CopyProject"></transformation>
</transformationProvider>
<transformationProvider transformationName="toNuSMV">
<transformation transformation="org.fortiss.af3.component.generator.nusmv.ToNuSMVComponent"></transformation>
<transformation transformation="org.fortiss.af3.component.generator.nusmv.ToNuSMVDataDictionary"></transformation>
<transformation transformation="org.fortiss.af3.component.generator.nusmv.ToNuSMVExpression"></transformation>
</transformationProvider>
<transformationProvider transformationName="resolveNoVal">
<transformation transformation="org.fortiss.af3.component.generator.nusmv.ResolveNoVal"></transformation>
</transformationProvider>
<transformationProvider transformationName="namesTransformation">
<transformation transformation="org.fortiss.af3.component.generator.nusmv.NamesTransformation"></transformation>
</transformationProvider>
</extension>
</plugin>
AF3ToNuSMVConsts.java 873d75fa85215be06915a97ddcd760883dca56db GREEN
ArrayToStructVariableDefinition.java 796523020c2b817032bb989f56094404adf84946 GREEN
CodeSpecPrepareAddReturnStatement.java e6b0dc4e41e3d29a8326d0c48027bfb76f0288ec GREEN
CodeSpecPrepareRemoveMultipleAssignments.java 795880e1dd95d0a579572c435a9c4647fb1db39a GREEN
CodeSpecPrepareToIfElseBlock.java a4a0300700fa7c3f11bb0b0a9d06f7392026bfe4 GREEN
CodeSpecPrepareToIfSequence.java aa91a979a9c9ec4bbe92976fc6f94f7a0921f4ae GREEN
CopyProject.java 222c9f6e3adb6d6df48900604a7e76a6d079132f GREEN
FlattenVariableDefs.java 5bb7a8810d31c203878b048f5eaee001e181a4b6 GREEN
MultiValuedMap.java 9a92088a5d39dab3e64dfbb05db0507cb6e89b9a GREEN
NamesTransformation.java d499765e1d165be02536fd671c9af1f4ca170c03 GREEN
ResolveNoVal.java 072925bb14e304611ced7b862b84ea48b0334839 GREEN
StandaloneBooleanVarToFunctionCall.java aee7121ff24e8a4171ce5448c96c62e1c16c109f GREEN
ToNuSMVComponent.java a987ec39c7cd04353b08a82f07574da903287d7c GREEN
ToNuSMVDataDictionary.java 2fb96751171fe55fadedacda96b1bcb2d7947f13 GREEN
ToNuSMVExpression.java 9fc83ecd70237c43007db2b80e77b5031ca2d021 GREEN
/*-------------------------------------------------------------------------+
| Copyright 2015 fortiss GmbH |
| |
| 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. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.generator.nusmv;
/**
* This class contains the constants used in the AF3 to NuSMV transformation.
*
*/
public class AF3ToNuSMVConsts {
/** The "present" variable name suffix. */
public static final String _PRESENT = "_PRESENT";
/** The suffix for the variable for module instantiations in nusmv. */
public static final String VAR = "Var";
/**
* Functions are modeled as modules in nusmv. Every such module has a variable called "res"
* representing the result of the function call.
*/
public static final String RESULT_NAME = "res";
/** The name of the current state variable in NuSMV model. */
public static final String CURRENT_STATE = "_current_state";
/** The name of the "next transition" variable in NuSMV model. */
public static final String NEXT_TRANSITION = "_next_t";
/**
* The name of the second element in an NuSMV enumeration type in the case of AF3 enumerations
* with a single element.
*/
public static final String FAKE_VALUE_NAME = "FAKE_VALUE";
}
/*-------------------------------------------------------------------------+
| Copyright 2015 fortiss GmbH |
| |
| 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. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.generator.nusmv;
import static org.eclipse.emf.ecore.util.EcoreUtil.remove;
import static org.fortiss.af3.component.utils.BehaviorModelElementFactory.createDataStateVariable;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createChannelAndAttach;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createInputPortAndAttach;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createOutputPortAndAttach;
import static org.fortiss.af3.expression.model.terms.impl.DefinedConstStaticImpl.NoVal;
import static org.fortiss.af3.expression.utils.ExpressionModelElementFactory.createDefinedType;
import static org.fortiss.af3.expression.utils.ExpressionUtils.getTypeDefinition;
import static org.fortiss.af3.expression.utils.ExpressionUtils.isArrayType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.component.model.behavior.common.DataStateVariable;
import org.fortiss.af3.component.model.behavior.common.IDataStateVariableProvider;
import org.fortiss.af3.expression.model.definitions.FunctionParameter;
import org.fortiss.af3.expression.model.definitions.Structure;
import org.fortiss.af3.expression.model.terms.DefinedConst;
import org.fortiss.af3.expression.model.terms.IExpressionTerm;
import org.fortiss.af3.expression.model.types.TDefinedType;
import org.fortiss.af3.project.model.typesystem.IType;
import org.fortiss.af3.project.model.typesystem.ITypeDefinition;
import org.fortiss.af3.project.model.typesystem.IVariableDefinition;
import org.fortiss.pragmatictransformation.service.CacheSupportedTransformationBase;
import org.fortiss.pragmatictransformation.service.IPragmaticTransformation;
/**
* First step of the ArraysToStructure transformation. The complete transformation is structured as
* 2 step sequential transformation:
* 1) First transformation is structured as a parallel transformation of 2 transformations spreading
* across Expression and Component plugin.
* 2) Converting array expressions to structure expressions.
*
* This class transforms ports, data state variables, and also creates the channels between the new
* ports. It is to be noted that after execution of this small step transformation the model could
* be dirty.
*
* TODO 8022: Do we really need to create @{link {@link IVariableDefinition}? Shouldn't we just
* change the type of the old variable definition?
*
*/
public class ArrayToStructVariableDefinition extends CacheSupportedTransformationBase {
/** {@inheritDoc} */
@Override
public Object transform(Object c, IPragmaticTransformation deferredTransformation) {
if(c instanceof Port) {
Port p = (Port)c;
if(!isArrayType(p.getVariableType())) {
return null;
}
ITypeDefinition td = ((TDefinedType)p.getVariableType