Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
MontiSecArc
Commits
cb1182e2
Commit
cb1182e2
authored
Jan 20, 2015
by
Paff
Browse files
bug fixes skrict because of naming
parent
5d435450
Changes
7
Hide whitespace changes
Inline
Side-by-side
montiSecArcAnalysis/pom.xml
View file @
cb1182e2
...
...
@@ -108,7 +108,7 @@
<archive>
<manifest>
<addClasspath>
true
</addClasspath>
<mainClass>
secarc.
Wrapper
MontiSecArcAnalysisTool
</mainClass>
<mainClass>
secarc.MontiSecArcAnalysisTool
Wrapper
</mainClass>
</manifest>
</archive>
</configuration>
...
...
montiSecArcAnalysis/src/main/java/secarc/MontiSecArcAnalysisToolWrapper.java
View file @
cb1182e2
...
...
@@ -113,10 +113,17 @@ public class MontiSecArcAnalysisToolWrapper extends MontiSecArcAnalysisTool {
protected
static
MontiSecArcAnalysisToolWrapper
preCreateToolWithoutJava
(
String
[]
arguments
)
{
MontiSecArcAnalysisToolWrapper
tool
=
null
;
List
<
String
>
argsAsList
=
new
LinkedList
<
String
>();
boolean
next
=
false
;
for
(
String
mp
:
arguments
)
{
argsAsList
.
add
(
mp
);
if
(
arguments
.
equals
(
MontiSecArcConstants
.
PREPARE_PARAMETER
))
{
break
;
if
(!
next
){
argsAsList
.
add
(
mp
);
}
if
(
mp
.
equals
(
MontiSecArcConstants
.
PREPARE_PARAMETER
))
{
next
=
true
;
}
//Search for files
if
(
next
&&
mp
.
contains
(
"/"
))
{
argsAsList
.
add
(
mp
);
}
}
try
{
...
...
@@ -141,7 +148,7 @@ public class MontiSecArcAnalysisToolWrapper extends MontiSecArcAnalysisTool {
MontiSecArcAnalysisToolWrapper
tool
=
null
;
List
<
String
>
argsAsList
=
new
LinkedList
<
String
>();
for
(
int
i
=
0
;
i
<
arguments
.
length
;
i
++)
{
if
(
arguments
.
equals
(
MontiSecArcConstants
.
PREPARE_PARAMETER
))
{
if
(
arguments
[
i
]
.
equals
(
MontiSecArcConstants
.
PREPARE_PARAMETER
))
{
argsAsList
.
remove
(
i
-
1
);
argsAsList
.
remove
(
i
-
2
);
continue
;
...
...
montiSecArcAnalysis/src/test/java/secarc/MontiSecArcAnalysisRunningExampleTest.java
View file @
cb1182e2
...
...
@@ -20,7 +20,7 @@ public class MontiSecArcAnalysisRunningExampleTest extends TestWithSymtabAnalysi
*/
@Test
public
void
testSecRunningExample
()
throws
CircluarDependencyException
,
AmbigousException
{
MontiSecArcAnalysisTestTool
tool
=
createTestToolWithAdditionalParameters
(
new
String
[]
{
"src/test/resources/secarc/seccds
/
"
},
new
String
[]
{
"src/test/resources"
});
MontiSecArcAnalysisTestTool
tool
=
createTestToolWithAdditionalParameters
(
new
String
[]
{
"src/test/resources/secarc/seccds"
},
new
String
[]
{
"src/test/resources"
});
tool
.
init
();
assertTrue
(
tool
.
run
());
...
...
montiSecArcAnalysis/src/test/resources/secarc/seccds/CashDeskSystem.secarc
View file @
cb1182e2
...
...
@@ -48,6 +48,6 @@ component CashDeskSystem {
connect
cashDesk
->
store
;
connect
store
.
outP
roduct
Data
->
cashDesk
.
inProductData
;
connect
store
.
outPData
->
cashDesk
.
inProductData
;
}
\ No newline at end of file
montiSecArcAnalysis/src/test/resources/secarc/seccds/fe/Store.secarc
View file @
cb1182e2
...
...
@@ -5,34 +5,41 @@ import secarc.seccds.msg.*;
component
Store
{
trustlevel
+
1
;
accesscontrol
on
;
autoconnect
port
;
access
stockManager
,
storeManager
,
cashier
;
connect
saleInformation
->
data
.
filterInfo
;
trustlevel
+
1
;
port
in
String
inIdentifier
,
out
ProductData
outP
roduct
Data
;
out
ProductData
outPData
;
port
in
SaleInformation
;
component
StoreServer
{
connect
storeServer
.
productData
->
outPData
;
component
StoreServer
storeServer
{
autoconnect
port
;
configuration
confName
;
cpe
"cpeName"
;
port
in
String
inIdentifier
;
in
String
inIdentifier
,
in
SaleInformation
,
out
ProductData
;
component
(
filter
fString
)
FilterIdentifier
{
component
(
filter
fString
)
FilterIdentifier
filterIdentifier
{
port
in
String
inIdentifier
,
out
Identifier
;
}
component
DataProcessor
{
component
DataProcessor
dataProcessor
{
port
out
ProductData
,
...
...
@@ -40,6 +47,8 @@ component Store {
(
filter
fInformation
)
in
SaleInformation
filterInfo
;
}
connect
saleInformation
->
dataProcessor
.
filterInfo
;
}
...
...
montiSecArcFE/src/main/java/secarc/ets/graph/ArchitectureGraphBuilder.java
View file @
cb1182e2
...
...
@@ -353,7 +353,7 @@ public class ArchitectureGraphBuilder {
}
else
if
(
componentType
!=
null
&&
componentType
.
getSubComponent
(
sourceComponent
).
isPresent
())
{
subComponent
=
componentType
.
getSubComponent
(
sourceComponent
).
get
();
}
if
(
subComponent
!=
null
)
{
if
(
subComponent
!=
null
&&
((
SecComponentEntry
)
subComponent
.
getComponentType
()).
getPort
(
sourcePort
).
isPresent
()
)
{
PortEntry
port
=
((
SecComponentEntry
)
subComponent
.
getComponentType
()).
getPort
(
sourcePort
).
get
().
getBestKnownVersion
();
if
(
port
!=
null
)
{
sourcePortVertex
=
Vertex
.
lookup
(
port
,
this
.
graph
);
...
...
@@ -381,7 +381,7 @@ public class ArchitectureGraphBuilder {
}
else
if
(
componentType
!=
null
&&
componentType
.
getSubComponent
(
targetComponent
).
isPresent
())
{
subComponent
=
componentType
.
getSubComponent
(
targetComponent
).
get
();
}
if
(
subComponent
!=
null
)
{
if
(
subComponent
!=
null
&&
((
SecComponentEntry
)
subComponent
.
getComponentType
()).
getPort
(
targetPort
).
isPresent
()
)
{
PortEntry
port
=
((
SecComponentEntry
)
subComponent
.
getComponentType
()).
getPort
(
targetPort
).
get
().
getBestKnownVersion
();
if
(
port
!=
null
)
{
targetPortVertex
=
Vertex
.
lookup
(
port
,
this
.
graph
);
...
...
start
_m
onti
s
ec
a
rc.sh
→
start
M
onti
S
ec
A
rc.sh
View file @
cb1182e2
#!/bin/bash
standard_command
=
"java -jar
montiSecArcAnalysis-0.0.3-SNAPSHOT.jar
-mp
$
1
-conf
mc-test.cfg
-out
$
2
-symtabdir
$
3
-analysis ALL parse -analysis ALL init -analysis ALL createExported -synthesis ALL prepareCheck -synthesis arcd preCheckTransformation -synthesis ALL check"
standard_command
=
"java -jar
$1
-mp
$
2
-conf
$3
-out
$
4
-symtabdir
$
5
-analysis ALL parse -analysis ALL init -analysis ALL createExported -synthesis ALL prepareCheck -synthesis arcd preCheckTransformation -synthesis ALL check"
conf_command
=
""
if
[
"-analysisconfpath"
==
$6
]
then
conf_command
=
"
$6
$7
"
shift
shift
fi
shift
shift
shift
shift
shift
trustlevel_command
=
"-synthesis secarc secPreParameter -synthesis secarc secFilterTrustlevel"
analysis_command
=
"-synthesis secarc secAnalysisAdvanced"
analysis_command
=
"-synthesis secarc
$1
"
shift
while
[
"
$1
"
!=
''
]
do
...
...
@@ -20,9 +32,9 @@ while [ "$1" != '' ]
critical_command
=
"-synthesis secarc secFilterCriticalPort"
shift
else
trustlevel_command+
=(
"
$1
"
)
trustlevel_command+
=(
"
$1
"
)
shift
fi
done
$standard_command
${
trustlevel_command
[*]
}
$critical_command
$analysis_command
${
files
[*]
}
$standard_command
$conf_command
${
trustlevel_command
[*]
}
$critical_command
$analysis_command
${
files
[*]
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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