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
2b19fa55
Commit
2b19fa55
authored
Nov 28, 2017
by
Alexander Diewald
Browse files
Exploration: Rate util package + Activator.
refs 3200
parent
ba5b680b
Changes
23
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.exploration.smt/trunk/src/org/fortiss/af3/exploration/smt/modeltransformation/.ratings
View file @
2b19fa55
.ratings 5746f5ff77ad203dba81a960a9afeb62e8b20794 RED
DSLtoSMT.java fa3ea9e12b97d1359e89d6c793018a247f5be1a6 RED
ScheduleRun.java
874db532f8f993d7c8ea6a963697a6059c25b3b0
RED
ScheduleRun.java
dc655a85c0620eacbcd7bb1bd9ed296c12fdf1ce
RED
SolverRun.java a82b92918eabf0d230ed8ec54eb1f020942cb849 RED
org.fortiss.af3.exploration.smt/trunk/src/org/fortiss/af3/exploration/smt/modeltransformation/ScheduleRun.java
View file @
2b19fa55
...
...
@@ -16,17 +16,17 @@
package
org.fortiss.af3.exploration.smt.modeltransformation
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createAnd
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createArithmeticLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createElementPropertyLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createEquals
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createForAll
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createImplies
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createLessEqual
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createNotEqual
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createPlus
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createSet
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createAnd
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createArithmeticLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createElementPropertyLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createEquals
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createForAll
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createImplies
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createLessEqual
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createNotEqual
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createPlus
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createSet
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
...
...
@@ -63,7 +63,7 @@ import org.fortiss.af3.exploration.smt.model.SMTConstraint;
import
org.fortiss.af3.exploration.smt.model.StartTimeDummy
;
import
org.fortiss.af3.exploration.smt.util.Z3ModelElementFactory
;
import
org.fortiss.af3.exploration.util.DSEProjectModelElementFactory
;
import
org.fortiss.af3.exploration.util.DSLModelElementFactory
;
import
org.fortiss.af3.exploration.util.DS
M
LModelElementFactory
;
import
org.fortiss.af3.platform.model.TransmissionUnit
;
import
org.fortiss.af3.schedule.model.PeriodicTimeTrigger
;
import
org.fortiss.af3.schedule.model.ResourceAllocation
;
...
...
@@ -187,7 +187,7 @@ public class ScheduleRun extends SolverRun {
ModelElementPropertyLiteral
startSet1
=
createElementPropertyLiteral
(
set1
,
StartTimeDummy
.
class
);
ArithmeticLiteral
literal
=
createArithmeticLiteral
(
BigDecimal
.
ZERO
);
GreaterEqual
gEquals
=
DSLModelElementFactory
.
createGreaterEqual
(
startSet1
,
literal
);
GreaterEqual
gEquals
=
DS
M
LModelElementFactory
.
createGreaterEqual
(
startSet1
,
literal
);
ForAll
forAll1
=
createForAll
();
forAll1
.
setSet
(
set1
);
...
...
@@ -240,7 +240,7 @@ public class ScheduleRun extends SolverRun {
LessEqual
cond1
=
createLessEqual
(
endSet1
,
startSet22
);
LessEqual
cond2
=
createLessEqual
(
endSet2
,
startSet11
);
Or
or
=
DSLModelElementFactory
.
createOr
(
cond1
,
cond2
);
Or
or
=
DS
M
LModelElementFactory
.
createOr
(
cond1
,
cond2
);
ModelElementLiteral
element1
=
createModelElementLiteral
(
set1
);
ModelElementLiteral
element2
=
createModelElementLiteral
(
set2
);
...
...
@@ -268,13 +268,13 @@ public class ScheduleRun extends SolverRun {
// durations
for
(
Schedule
a
:
schedule
.
getScheduleList
())
{
for
(
ResourceAllocation
rs
:
a
.
getResourceAllocationList
())
{
Set
oneElementSet
=
DSLModelElementFactory
.
createSet
(
rs
.
getName
()
+
"_set"
);
Set
oneElementSet
=
DS
M
LModelElementFactory
.
createSet
(
rs
.
getName
()
+
"_set"
);
oneElementSet
.
getEntries
().
add
(
rs
);
ModelElementPropertyLiteral
duration
=
createElementPropertyLiteral
(
oneElementSet
,
DurationDummy
.
class
);
ArithmeticLiteral
literal
=
createArithmeticLiteral
(
rs
.
getDuration
());
Equal
equals
=
createEquals
(
literal
,
duration
);
ForAll
forAll
=
DSLModelElementFactory
.
createForAll
();
ForAll
forAll
=
DS
M
LModelElementFactory
.
createForAll
();
forAll
.
setSet
(
oneElementSet
);
forAll
.
setExpression
(
equals
);
...
...
@@ -312,15 +312,15 @@ public class ScheduleRun extends SolverRun {
}
ForAll
forAll1
=
createForAll
();
Set
set1
=
DSLModelElementFactory
.
createSet
(
"sourceTask"
);
Set
set1
=
DS
M
LModelElementFactory
.
createSet
(
"sourceTask"
);
set1
.
getEntries
().
add
(
resourceAllocationSource
);
forAll1
.
setSet
(
set1
);
ForAll
forAll2
=
createForAll
();
Set
set2
=
DSLModelElementFactory
.
createSet
(
"destinationTask"
);
Set
set2
=
DS
M
LModelElementFactory
.
createSet
(
"destinationTask"
);
set2
.
getEntries
().
add
(
resourceAllocationTarget
);
forAll2
.
setSet
(
set2
);
ForAll
forAll3
=
createForAll
();
Set
set3
=
DSLModelElementFactory
.
createSet
(
"mSignal"
);
Set
set3
=
DS
M
LModelElementFactory
.
createSet
(
"mSignal"
);
set3
.
getEntries
().
add
(
signal
);
forAll3
.
setSet
(
set3
);
...
...
org.fortiss.af3.exploration.smt/trunk/src/org/fortiss/af3/exploration/smt/modeltransformation/rework/.ratings
View file @
2b19fa55
.ratings 3f4ac436f601b1e03541e9acfa3cd5613d29835b RED
BasicDeploymentConstraint.java e
239574d2656b952d8036ecc19803663535ad359
RED
BasicDeploymentConstraint.java e
c1b6690abd47c5a6ee9c2e1c9e62828e2f15ff5
RED
ConstraintToNONQuantifiedSMT.java c25cd81671ebea484377cd58e094a5d8e4b0e812 RED
ConstraintToQuantifiedSMT.java 181a0190b1586982af5ce8a02a927f6512ee3b30 RED
DeploymentRun2.java 6687b5a978f3de55c64cc10d8873c77ff242d6f4 RED
...
...
org.fortiss.af3.exploration.smt/trunk/src/org/fortiss/af3/exploration/smt/modeltransformation/rework/BasicDeploymentConstraint.java
View file @
2b19fa55
...
...
@@ -16,14 +16,14 @@
package
org.fortiss.af3.exploration.smt.modeltransformation.rework
;
import
static
org
.
fortiss
.
af3
.
exploration
.
smt
.
util
.
Z3ModelElementFactory
.
createSMTConstraint
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createAllocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createAnd
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createEquals
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createExists
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createForAll
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createImplies
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createSet
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createAllocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createAnd
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createEquals
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createExists
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createForAll
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createImplies
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createSet
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
getFirstParentWithType
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
UniqueIDUtils
.
prepareUniqueID
;
...
...
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/constraint/.ratings
View file @
2b19fa55
.ratings 4b1a6e371117795585d7782c2e1ac1dcc99bd55f RED
AllocationPatternCompositeBackend.java
4bb81008e461bc29ff81d05a09474d4a665c32bd
RED
AllocationPatternCompositeBackend.java
ea365b01a184162eedf13589211a158ba2d5a2ab
RED
AllocationPatternCompositeGUI.java 393e5f76dcb201f6070e2b015b614e95173c4dfa RED
ConstraintPatternHeader.java c810b00c5ea6c2aa9dcfed27beefbec3a62f0e39 RED
ConstraintViewBackend.java d06cfc60a8d2d572f331dd6a46db1ffddbb4e507 RED
DeploymentPatternCompositeBackend.java d5cbbe1208990a3b5c5523db71c36d47e8bb11dd RED
DeploymentPatternCompositeGUI.java 7c8a28830abffbbad1744eb664a37b9d4d0c8993 RED
FunctionCouplingCompositeBackend.java
271e3e61d33f713adba8cc026886c3db09a5c7cc
RED
FunctionCouplingCompositeBackend.java
847e3329bd99fbc4e6836732278cc127c2ea10a2
RED
FunctionCouplingCompositeGUI.java bb6c79a636470802c197edf71b37fb0208cdd21a RED
MemoryPatternBackend.java e5b5336233167d41b96e4ceb873ecccaa66d27cf RED
SafetyPatternBackend.java
5573483ed7f9b0f1e2c8e8cdf0918f70d4729b22
RED
SafetyPatternBackend.java
ed140c2660b582d32f24c72d3c86ef3a6ce58eea
RED
SafetyPatternCompositeGUI.java 73dc53fc057e405da46664d67778a2982423771b RED
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/constraint/AllocationPatternCompositeBackend.java
View file @
2b19fa55
...
...
@@ -16,12 +16,12 @@
package
org.fortiss.af3.exploration.ui.perspective.constraint
;
import
static
org
.
fortiss
.
af3
.
exploration
.
smt
.
util
.
Z3ModelElementFactory
.
createSMTConstraint
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createAllocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createDislocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createExists
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createForAll
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createSet
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createAllocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createDislocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createExists
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createForAll
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createSet
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
service
.
IPersistencyService
.
getInstance
;
import
java.util.ArrayList
;
...
...
@@ -47,7 +47,7 @@ import org.fortiss.af3.exploration.projectmodel.DSE;
import
org.fortiss.af3.exploration.smt.model.SMTConstraint
;
import
org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager
;
import
org.fortiss.af3.exploration.ui.util.ComponentContentProvider
;
import
org.fortiss.af3.exploration.util.DSLModelElementFactory
;
import
org.fortiss.af3.exploration.util.DS
M
LModelElementFactory
;
import
org.fortiss.af3.platform.model.ExecutionUnit
;
import
org.fortiss.af3.platform.model.PlatformArchitecture
;
import
org.fortiss.af3.task.model.Task
;
...
...
@@ -176,7 +176,7 @@ public class AllocationPatternCompositeBackend extends AllocationPatternComposit
ModelElementLiteral
elementExpression
=
createModelElementLiteral
(
leftSet
);
locationConstraint
.
setLeft
(
elementExpression
);
}
else
if
(
event
.
getSource
().
equals
(
rightTreeViewer
))
{
rightSet
=
DSLModelElementFactory
.
createSet
(
entries
);
rightSet
=
DS
M
LModelElementFactory
.
createSet
(
entries
);
rightSet
.
setName
(
"Hardware"
);
rightSet
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getECUSuperSet
());
ModelElementLiteral
elementExpression
=
createModelElementLiteral
(
rightSet
);
...
...
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/constraint/FunctionCouplingCompositeBackend.java
View file @
2b19fa55
...
...
@@ -16,7 +16,7 @@
package
org.fortiss.af3.exploration.ui.perspective.constraint
;
import
static
org
.
fortiss
.
af3
.
exploration
.
smt
.
util
.
Z3ModelElementFactory
.
createSMTConstraint
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
service
.
IPersistencyService
.
getInstance
;
import
java.util.ArrayList
;
...
...
@@ -46,7 +46,7 @@ import org.fortiss.af3.exploration.projectmodel.DSE;
import
org.fortiss.af3.exploration.smt.model.SMTConstraint
;
import
org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager
;
import
org.fortiss.af3.exploration.ui.util.DSLPatternArchitectureContentProvider
;
import
org.fortiss.af3.exploration.util.DSLModelElementFactory
;
import
org.fortiss.af3.exploration.util.DS
M
LModelElementFactory
;
import
org.fortiss.af3.platform.model.ExecutionUnit
;
import
org.fortiss.af3.platform.model.PlatformArchitecture
;
import
org.fortiss.af3.task.model.Task
;
...
...
@@ -153,7 +153,7 @@ public class FunctionCouplingCompositeBackend extends FunctionCouplingCompositeG
DSE
dse
=
IDSEPerspectiveManager
.
INSTANCE
.
getCurrentlySelectedDSE
();
ForAll
swSetForall
=
BooleanpFactory
.
eINSTANCE
.
createForAll
();
Exists
hwSetExists
=
BooleanpFactory
.
eINSTANCE
.
createExists
();
Allocation
locationConstraint
=
DSLModelElementFactory
.
createAllocation
(
null
,
null
);
Allocation
locationConstraint
=
DS
M
LModelElementFactory
.
createAllocation
(
null
,
null
);
Set
swcs
=
ExpressionFactory
.
eINSTANCE
.
createSet
();
swcs
.
setName
(
"Tasks"
);
...
...
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/constraint/SafetyPatternBackend.java
View file @
2b19fa55
...
...
@@ -17,8 +17,8 @@ package org.fortiss.af3.exploration.ui.perspective.constraint;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
ComponentArchitectureUtils
.
isAtomicComponent
;
import
static
org
.
fortiss
.
af3
.
component
.
utils
.
ComponentUtils
.
getAllSubComponentsRecursively
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createAllocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLModelElementFactory
.
createModelElementLiteral
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createAllocation
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LModelElementFactory
.
createModelElementLiteral
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/objective/.ratings
View file @
2b19fa55
.ratings fe96ec0447a757d312e31a65ac20bc069e13f368 RED
BusBandwidthOptimzationBackend.java
7b4b7c7c285d738d10bf174a86915f59119643e1
RED
BusBandwidthOptimzationBackend.java
40d914669aab4d013e1746c0c7b524104f669632
RED
BusBandwidthOptimzationPatternCompositeGUI.java dd603a8b1c23dda3b50c3679b43238195585717e RED
BusEliminationBackend.java
00e83316a8428512287c32dc5605916663c3a071
RED
BusEliminationBackend.java
13199a4b5ea359b9f1912ff17ce05b544c4cadfa
RED
BusEliminationOptimzationPatternCompositeGUI.java 9b90f54e691650cc64e000ea45dfedf676f0ebc2 RED
HardwareOptimizationPatternCompositeBackend.java d043cb4cb7ae46da3f8604ff80bd850fca807d55 RED
HardwareOptimizationPatternCompositeGUI.java f847f666e3ae77f9785c40667cebea1706f2dec2 RED
...
...
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/objective/BusBandwidthOptimzationBackend.java
View file @
2b19fa55
...
...
@@ -47,7 +47,7 @@ import org.fortiss.af3.exploration.smt.model.SMTObjective;
import
org.fortiss.af3.exploration.smt.util.RouteUtils
;
import
org.fortiss.af3.exploration.smt.util.Z3ModelElementFactory
;
import
org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager
;
import
org.fortiss.af3.exploration.util.DSLModelElementFactory
;
import
org.fortiss.af3.exploration.util.DS
M
LModelElementFactory
;
import
org.fortiss.af3.platform.model.PlatformArchitecture
;
import
org.fortiss.af3.platform.model.TransmissionUnit
;
import
org.fortiss.af3.task.model.Signal
;
...
...
@@ -139,25 +139,25 @@ public class BusBandwidthOptimzationBackend extends BusBandwidthOptimzationPatte
/** Create a {@link Minimize} objective for the given bus. */
private
Minimize
createBusWeightObjective
(
IModelElement
bus
,
EList
<
VirtualLink
>
virtualLinks
)
{
DSE
dse
=
IDSEPerspectiveManager
.
INSTANCE
.
getCurrentlySelectedDSE
();
Set
setRoute
=
DSLModelElementFactory
.
createSet
(
virtualLinks
);
Set
setRoute
=
DS
M
LModelElementFactory
.
createSet
(
virtualLinks
);
setRoute
.
setName
(
"Route"
);
setRoute
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getRouteSuperSet
());
ForAll
forAll
=
DSLModelElementFactory
.
createForAll
();
Set
busSet
=
DSLModelElementFactory
.
createSet
(
bus
);
ForAll
forAll
=
DS
M
LModelElementFactory
.
createForAll
();
Set
busSet
=
DS
M
LModelElementFactory
.
createSet
(
bus
);
busSet
.
setName
(
"Bus_to_minimize"
);
busSet
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getBusSuperSet
());
ModelElementLiteral
arg0
=
DSLModelElementFactory
.
createModelElementLiteral
(
setRoute
);
ModelElementLiteral
arg1
=
DSLModelElementFactory
.
createModelElementLiteral
(
busSet
);
Uses
createUses
=
DSLModelElementFactory
.
createUses
(
arg0
,
arg1
);
ModelElementLiteral
arg0
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
setRoute
);
ModelElementLiteral
arg1
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
busSet
);
Uses
createUses
=
DS
M
LModelElementFactory
.
createUses
(
arg0
,
arg1
);
forAll
.
setExpression
(
createUses
);
forAll
.
setSet
(
busSet
);
ModelElementLiteral
route
=
DSLModelElementFactory
.
createModelElementLiteral
(
setRoute
);
Weight
routeWeight
=
DSLModelElementFactory
.
createWeight
(
route
);
ModelElementLiteral
route
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
setRoute
);
Weight
routeWeight
=
DS
M
LModelElementFactory
.
createWeight
(
route
);
Sum
sum
=
DSLModelElementFactory
.
createSum
(
setRoute
,
forAll
,
routeWeight
);
Sum
sum
=
DS
M
LModelElementFactory
.
createSum
(
setRoute
,
forAll
,
routeWeight
);
Minimize
createMinimize
=
FunctionFactory
.
eINSTANCE
.
createMinimize
();
createMinimize
.
setArgs
(
sum
);
...
...
@@ -173,29 +173,29 @@ public class BusBandwidthOptimzationBackend extends BusBandwidthOptimzationPatte
EList
<
VirtualLink
>
routes
)
{
DSE
dse
=
IDSEPerspectiveManager
.
INSTANCE
.
getCurrentlySelectedDSE
();
ArrayList
<
SMTConstraint
>
results
=
new
ArrayList
<>();
ForAll
forAllRoute
=
DSLModelElementFactory
.
createForAll
();
Set
setRoute
=
DSLModelElementFactory
.
createSet
(
routes
);
ForAll
forAllRoute
=
DS
M
LModelElementFactory
.
createForAll
();
Set
setRoute
=
DS
M
LModelElementFactory
.
createSet
(
routes
);
setRoute
.
setName
(
"Route"
);
setRoute
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getRouteSuperSet
());
forAllRoute
.
setSet
(
setRoute
);
ModelElementLiteral
route
=
DSLModelElementFactory
.
createModelElementLiteral
(
setRoute
);
Weight
routeWeight
=
DSLModelElementFactory
.
createWeight
(
route
);
ModelElementLiteral
route
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
setRoute
);
Weight
routeWeight
=
DS
M
LModelElementFactory
.
createWeight
(
route
);
Set
setSignals
=
DSLModelElementFactory
.
createSet
(
signals
);
Set
setSignals
=
DS
M
LModelElementFactory
.
createSet
(
signals
);
setSignals
.
setName
(
"Signals"
);
setSignals
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getSignalSuperSet
());
ModelElementLiteral
signal
=
DSLModelElementFactory
.
createModelElementLiteral
(
setSignals
);
ModelElementLiteral
route2
=
DSLModelElementFactory
.
createModelElementLiteral
(
setRoute
);
Allocation
sToR
=
DSLModelElementFactory
.
createAllocation
(
signal
,
route2
);
ModelElementLiteral
signal
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
setSignals
);
ModelElementLiteral
route2
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
setRoute
);
Allocation
sToR
=
DS
M
LModelElementFactory
.
createAllocation
(
signal
,
route2
);
ModelElementPropertyLiteral
bandwidth
=
DSLModelElementFactory
.
createElementPropertyLiteral
(
setSignals
,
DS
M
LModelElementFactory
.
createElementPropertyLiteral
(
setSignals
,
TransmissionUnitBandwidth
.
class
);
Sum
sum
=
DSLModelElementFactory
.
createSum
(
setSignals
,
sToR
,
bandwidth
);
Sum
sum
=
DS
M
LModelElementFactory
.
createSum
(
setSignals
,
sToR
,
bandwidth
);
Equal
equals
=
DSLModelElementFactory
.
createEquals
(
routeWeight
,
sum
);
Equal
equals
=
DS
M
LModelElementFactory
.
createEquals
(
routeWeight
,
sum
);
forAllRoute
.
setExpression
(
equals
);
SMTConstraint
smtConstraint
=
...
...
@@ -221,29 +221,29 @@ public class BusBandwidthOptimzationBackend extends BusBandwidthOptimzationPatte
for
(
IHierarchicElement
bus
:
buses
)
{
for
(
IModelElement
m
:
routes
)
{
VirtualLink
vl
=
(
VirtualLink
)
m
;
ForAll
forAll1
=
DSLModelElementFactory
.
createForAll
();
Set
set
=
DSLModelElementFactory
.
createSet
(
vl
);
ForAll
forAll1
=
DS
M
LModelElementFactory
.
createForAll
();
Set
set
=
DS
M
LModelElementFactory
.
createSet
(
vl
);
set
.
setName
(
"Route"
);
set
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getRouteSuperSet
());
forAll1
.
setSet
(
set
);
ForAll
forAll2
=
DSLModelElementFactory
.
createForAll
();
Set
set2
=
DSLModelElementFactory
.
createSet
(
bus
);
ForAll
forAll2
=
DS
M
LModelElementFactory
.
createForAll
();
Set
set2
=
DS
M
LModelElementFactory
.
createSet
(
bus
);
set2
.
setName
(
"Bus"
);
set2
.
setSuperSetReference
(
dse
.
getDseSuperSet
().
getBusSuperSet
());
forAll2
.
setSet
(
set2
);
forAll1
.
setExpression
(
forAll2
);
ModelElementLiteral
arg0
=
DSLModelElementFactory
.
createModelElementLiteral
(
set
);
ModelElementLiteral
arg1
=
DSLModelElementFactory
.
createModelElementLiteral
(
set2
);
Uses
createUses
=
DSLModelElementFactory
.
createUses
(
arg0
,
arg1
);
ModelElementLiteral
arg0
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
set
);
ModelElementLiteral
arg1
=
DS
M
LModelElementFactory
.
createModelElementLiteral
(
set2
);
Uses
createUses
=
DS
M
LModelElementFactory
.
createUses
(
arg0
,
arg1
);
BooleanLiteral
literal
;
if
(
RouteUtils
.
busUsesVirtualLink
((
TransmissionUnit
)
bus
,
vl
))
{
literal
=
DSLModelElementFactory
.
createBooleanLiteral
(
true
);
literal
=
DS
M
LModelElementFactory
.
createBooleanLiteral
(
true
);
}
else
{
literal
=
DSLModelElementFactory
.
createBooleanLiteral
(
false
);
literal
=
DS
M
LModelElementFactory
.
createBooleanLiteral
(
false
);
}
Equal
createEquals
=
DSLModelElementFactory
.
createEquals
(
createUses
,
literal
);
Equal
createEquals
=
DS
M
LModelElementFactory
.
createEquals
(
createUses
,
literal
);
forAll2
.
setExpression
(
createEquals
);
SMTConstraint
smtConstraint
=
Z3ModelElementFactory
.
createSMTConstraint
(
"VirtualLinkUsesBus"
,
forAll1
,
...
...
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/objective/BusEliminationBackend.java
View file @
2b19fa55
...
...
@@ -30,7 +30,7 @@ import org.fortiss.af3.exploration.smt.model.SMTObjective;
import
org.fortiss.af3.exploration.smt.modeltransformation.rework.LanguageTransformation
;
import
org.fortiss.af3.exploration.smt.util.Z3ModelElementFactory
;
import
org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager
;
import
org.fortiss.af3.exploration.util.DSLModelElementFactory
;
import
org.fortiss.af3.exploration.util.DS
M
LModelElementFactory
;
import
org.fortiss.af3.platform.model.PlatformArchitecture
;
import
org.fortiss.af3.platform.model.TransmissionUnit
;
import
org.fortiss.tooling.base.model.element.IHierarchicElement
;
...
...
@@ -78,11 +78,11 @@ public class BusEliminationBackend extends BusEliminationOptimzationPatternCompo
// containing the bus to be eliminated. In the pre-processing phase of the
// transformation into SMT all routes get deleted which contain this specific bus.
ForAll
forAllRoute
=
DSLModelElementFactory
.
createForAll
();
Set
setRoute
=
DSLModelElementFactory
.
createSet
(
transmissionUnit
);
ForAll
forAllRoute
=
DS
M
LModelElementFactory
.
createForAll
();
Set
setRoute
=
DS
M
LModelElementFactory
.
createSet
(
transmissionUnit
);
setRoute
.
setName
(
"Bus_to_eliminate"
);
forAllRoute
.
setSet
(
setRoute
);
forAllRoute
.
setExpression
(
DSLModelElementFactory
.
createBooleanLiteral
(
true
));
forAllRoute
.
setExpression
(
DS
M
LModelElementFactory
.
createBooleanLiteral
(
true
));
objective
.
setExpression
(
forAllRoute
);
ITopLevelElement
modelContext
=
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/.ratings
View file @
2b19fa55
ExplorationActivator.java
1a6c4b14e79478cb2975f395c622a840090d13c4 RED
ExplorationActivator.java
e2dae1cdf014c8ae994579bb887e1271114fad60 YELLOW
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/ExplorationActivator.java
View file @
2b19fa55
...
...
@@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext;
*/
public
class
ExplorationActivator
extends
Plugin
{
/** The plug-in ID. */
public
static
final
String
PLUGIN_ID
=
ExplorationActivator
.
class
.
getPackage
().
getName
();
//$NON-NLS-1$
public
static
final
String
PLUGIN_ID
=
ExplorationActivator
.
class
.
getPackage
().
getName
();
/** The shared instance. */
private
static
ExplorationActivator
plugin
;
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/model/arithmetic/impl/ArithmeticStaticImpl.java
View file @
2b19fa55
...
...
@@ -15,8 +15,8 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.exploration.model.arithmetic.impl
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
toStringNull
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
toStringNull
;
import
org.fortiss.af3.exploration.dsl_v2.model.arithmetic.ArithmeticLiteral
;
import
org.fortiss.af3.exploration.dsl_v2.model.arithmetic.Div
;
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/model/booleanp/allocation/impl/AllocationStaticImpl.java
View file @
2b19fa55
...
...
@@ -15,8 +15,8 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.exploration.model.booleanp.allocation.impl
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
toStringNull
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
toStringNull
;
import
org.fortiss.af3.exploration.dsl_v2.model.booleanp.allocation.Allocation
;
import
org.fortiss.af3.exploration.dsl_v2.model.booleanp.allocation.Dislocation
;
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/model/booleanp/comparison/impl/ComparisonStaticImpl.java
View file @
2b19fa55
...
...
@@ -15,7 +15,7 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.exploration.model.booleanp.comparison.impl
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
toStringNull
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
toStringNull
;
import
org.fortiss.af3.exploration.dsl_v2.model.booleanp.comparison.Equal
;
import
org.fortiss.af3.exploration.dsl_v2.model.booleanp.comparison.Greater
;
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/model/booleanp/impl/BooleanpStaticImpl.java
View file @
2b19fa55
...
...
@@ -15,8 +15,8 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.exploration.model.booleanp.impl
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
toStringNull
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
toStringNull
;
import
org.fortiss.af3.exploration.dsl_v2.model.booleanp.And
;
import
org.fortiss.af3.exploration.dsl_v2.model.booleanp.BooleanLiteral
;
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/model/expression/impl/ExpressionStaticImpl.java
View file @
2b19fa55
...
...
@@ -15,8 +15,8 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.exploration.model.expression.impl
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DSLUtils
.
toStringNull
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
firstLetterLowercase
;
import
static
org
.
fortiss
.
af3
.
exploration
.
util
.
DS
M
LUtils
.
toStringNull
;
import
org.fortiss.af3.exploration.dsl_v2.model.expression.ModelElementLiteral
;
import
org.fortiss.af3.exploration.dsl_v2.model.expression.Set
;
...
...
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/util/.ratings
View file @
2b19fa55
.ratings fc3ae7b0d6d7870cd3b668ab445c38642a81ad6a RED
DSEModelElementFactory.java a6d66b7bf0bd0725cc686ad4958e6cda9714615c RED
DSEProjectModelElementFactory.java
2c36ca72367a3106d2f6f918dd6e2190aedcbef7
RED
DSEProjectModelElementFactory.java
49e2ca3de50497e8525caabff2440ec90315b508
RED
DSEUtils.java ffd1570f2a5629684c5292eb58df11918f3a31a2 RED
DSLModelElementFactory.java d
84050d30bf7cf881c47699a244cfe43c9b24a75
RED
DSLUtils.java
fff9ef53363ea6a9bcdce697914a845503a75a89 RED
DesignSpaceExplorationModelElementFactory.java
3
9a
2a2cc08efc8c59c264fdaf6a18a2b8feaf79
7 RED
ExplorationUtils.java f816d09ad47f534e3fe06b3a25bc2c4d29307453
RED
DS
M
LModelElementFactory.java d
28f1c71099bf995fe1db6b94c57ed3c2fa2be51
RED
DS
M
LUtils.java
7bf9604b175565be9ec7d99f127ad77f32cd1f1a YELLOW
DesignSpaceExplorationModelElementFactory.java 9a
c2ca7f75e0ad9bc5405a25ffba24e695fbe77
7 RED
ExplorationUtils.java f816d09ad47f534e3fe06b3a25bc2c4d29307453
YELLOW
org.fortiss.af3.exploration/trunk/src/org/fortiss/af3/exploration/util/DSEProjectModelElementFactory.java
View file @
2b19fa55
...
...
@@ -89,19 +89,19 @@ public class DSEProjectModelElementFactory {
DSEPlatformArtifact
platformArtifact
)
{
DSESuperSets
dseSuperSets
=
DseArtifactsFactory
.
eINSTANCE
.
createDSESuperSets
();
SuperSet
tasks
=
DSLModelElementFactory
.
createSuperSet
(
"Tasks"
);
SuperSet
tasks
=
DS
M
LModelElementFactory
.
createSuperSet
(
"Tasks"
);
tasks
.
getEntries
().
addAll
(
architecture
.
getTasks
());
dseSuperSets
.
setTaskSuperSet
(
tasks
);
SuperSet
signals
=
DSLModelElementFactory
.
createSuperSet
(
"Signals"
);
SuperSet
signals
=
DS
M
LModelElementFactory
.
createSuperSet
(
"Signals"
);
signals
.
getEntries
().
addAll
(
architecture
.
getSignals
());
dseSuperSets
.
setSignalSuperSet
(
signals
);
SuperSet
routes
=
DSLModelElementFactory
.
createSuperSet
(
"Routes"
);
SuperSet
routes
=
DS
M
LModelElementFactory
.
createSuperSet
(
"Routes"
);
routes
.
getEntries
().
addAll
(
platformArtifact
.
getVirtualLinks
());
dseSuperSets
.
setRouteSuperSet
(
routes
);
SuperSet
ecus
=
DSLModelElementFactory
.
createSuperSet
(
"ECUs"
);
SuperSet
ecus
=
DS
M
LModelElementFactory
.
createSuperSet
(
"ECUs"
);
// TODO: Using LambdaUtils produces more compact code.
List
<
IModelElement
>
ecuList
=
platformArtifact
.
getPlatform
().
getContainedElements
().
stream
()
...
...
@@ -109,7 +109,7 @@ public class DSEProjectModelElementFactory {
ecus
.
getEntries
().
addAll
(
ecuList
);
dseSuperSets
.
setECUSuperSet
(
ecus
);
SuperSet
buses
=
DSLModelElementFactory
.
createSuperSet
(
"Buses"
);
SuperSet
buses
=
DS
M
LModelElementFactory
.
createSuperSet
(
"Buses"
);
// TODO: Using LambdaUtils produces more compact code.
List
<
IModelElement
>
busList
=
platformArtifact
.
getPlatform
().
getContainedElements
().
stream
()
...
...
Prev
1
2
Next
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