Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
ed1e5cb9
Commit
ed1e5cb9
authored
Jul 01, 2020
by
Alexander Diewald
Browse files
Merge branch '4033' into 'master'
DSE-TCgen: Keep input models in the AF3 prj See merge request af3/af3!348
parents
148076db
b782bd40
Changes
2
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.exploration/src/org/fortiss/af3/exploration/testgenerator/util/.ratings
View file @
ed1e5cb9
AnnotationGenerationUtils.java 599f568c7e7da8555399ae7ee4eb922cb490effd GREEN
CompArchGeneratonUtil.java 0f1e3c048884fa4df6a35b6a110c46da58f59857 GREEN
DseUtils.java
de113a513cce32f8945c126b94e38f7d6f7feb86
GREEN
DseUtils.java
74ba8febd5a74cece21b5dd5ea7673dec7ddc122
GREEN
FileWriterUtil.java 4a95559f571d41fa44e6236fc055ab5baac7c384 GREEN
GraphGenerationUtilities.java e637fd6a38339c60a6a7ac5af116db304266d345 GREEN
GraphMetricUtils.java 99a398d4ff9b15b3eeb35748e32aa34a9b197f07 GREEN
...
...
org.fortiss.af3.exploration/src/org/fortiss/af3/exploration/testgenerator/util/DseUtils.java
View file @
ed1e5cb9
...
...
@@ -34,6 +34,7 @@ import static org.fortiss.af3.exploration.util.ModelSnapshotExtractUtils.createT
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
PatternFactoryUtils
.
createAllocationPatternExpression
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
PatternFactoryUtils
.
createUtilizationPatternExpression
;
import
static
org
.
fortiss
.
tooling
.
base
.
utils
.
AnnotationUtils
.
getAnnotationValue
;
import
static
org
.
fortiss
.
tooling
.
common
.
util
.
LambdaUtils
.
firstOfType
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
copy
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
pickFirstInstanceOf
;
...
...
@@ -66,6 +67,8 @@ import org.fortiss.af3.task.model.Task;
import
org.fortiss.af3.task.model.TaskArchitecture
;
import
org.fortiss.af3.task.model.annotation.FlashRequirement
;
import
org.fortiss.af3.timing.model.TimingSpecification
;
import
org.fortiss.tooling.kernel.model.IProjectRootElement
;
import
org.fortiss.tooling.kernel.utils.EcoreUtils
;
/**
* Utility class supporting the interaction with artifacts of the design space exploration.
...
...
@@ -105,16 +108,29 @@ public class DseUtils {
// The created DSE already owns an InitialInputDefinitionStep.
InitialInputDefinitionStep
inputDefStep
=
dse
.
getInitialStep
();
ModelSnapshot
caSnap
=
createComponentArchitectureSnapshot
(
Collection
<
IProjectRootElement
>
rootElements
=
new
ArrayList
<>();
rootElements
.
add
(
pickFirstInstanceOf
(
ComponentArchitecture
.
class
,
af3Project
.
getRootElements
()));
rootElements
.
add
(
pickFirstInstanceOf
(
PlatformArchitecture
.
class
,
af3Project
.
getRootElements
()));
rootElements
.
add
(
pickFirstInstanceOf
(
TaskArchitecture
.
class
,
af3Project
.
getRootElements
()));
rootElements
.
add
(
pickFirstInstanceOf
(
AllocationTableCollection
.
class
,
af3Project
.
getRootElements
()));
rootElements
.
add
(
pickFirstInstanceOf
(
TimingSpecification
.
class
,
af3Project
.
getRootElements
()));
Collection
<
IProjectRootElement
>
copiedRootElements
=
EcoreUtils
.
copy
(
rootElements
);
ModelSnapshot
caSnap
=
createComponentArchitectureSnapshot
(
firstOfType
(
copiedRootElements
,
ComponentArchitecture
.
class
).
get
());
ModelSnapshot
paSnap
=
createPlatformArchitectureSnapshot
(
pickFirstInstanceOf
(
PlatformArchitecture
.
class
,
af3Project
.
getRootElements
()
));
firstOfType
(
copiedRootElements
,
PlatformArchitecture
.
class
).
get
(
));
ModelSnapshot
taSnap
=
createTaskArchitectureSnapshot
(
pickFirstInstanceOf
(
TaskArchitecture
.
class
,
af3Project
.
getRootElements
()
));
firstOfType
(
copiedRootElements
,
TaskArchitecture
.
class
).
get
(
));
ModelSnapshot
allocSnap
=
createAllocationTableCollectionSnapshot
(
pickFirstInstanceOf
(
AllocationTableCollection
.
class
,
af3Project
.
getRootElements
()
));
firstOfType
(
copiedRootElements
,
AllocationTableCollection
.
class
).
get
(
));
ModelSnapshot
timeSnap
=
createTimingSpecificationSnapshot
(
pickFirstInstanceOf
(
TimingSpecification
.
class
,
af3Project
.
getRootElements
()
));
firstOfType
(
copiedRootElements
,
TimingSpecification
.
class
).
get
(
));
inputDefStep
.
addSnapshot
(
caSnap
);
inputDefStep
.
addSnapshot
(
paSnap
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment