Commit cb1182e2 authored by Paff's avatar Paff
Browse files

bug fixes skrict because of naming

parent 5d435450
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<archive> <archive>
<manifest> <manifest>
<addClasspath>true</addClasspath> <addClasspath>true</addClasspath>
<mainClass>secarc.WrapperMontiSecArcAnalysisTool</mainClass> <mainClass>secarc.MontiSecArcAnalysisToolWrapper</mainClass>
</manifest> </manifest>
</archive> </archive>
</configuration> </configuration>
......
...@@ -113,10 +113,17 @@ public class MontiSecArcAnalysisToolWrapper extends MontiSecArcAnalysisTool { ...@@ -113,10 +113,17 @@ public class MontiSecArcAnalysisToolWrapper extends MontiSecArcAnalysisTool {
protected static MontiSecArcAnalysisToolWrapper preCreateToolWithoutJava(String[] arguments) { protected static MontiSecArcAnalysisToolWrapper preCreateToolWithoutJava(String[] arguments) {
MontiSecArcAnalysisToolWrapper tool = null; MontiSecArcAnalysisToolWrapper tool = null;
List<String> argsAsList = new LinkedList<String>(); List<String> argsAsList = new LinkedList<String>();
boolean next = false;
for (String mp : arguments) { for (String mp : arguments) {
if(!next){
argsAsList.add(mp);
}
if(mp.equals(MontiSecArcConstants.PREPARE_PARAMETER)) {
next = true;
}
//Search for files
if(next && mp.contains("/")) {
argsAsList.add(mp); argsAsList.add(mp);
if(arguments.equals(MontiSecArcConstants.PREPARE_PARAMETER)) {
break;
} }
} }
try { try {
...@@ -141,7 +148,7 @@ public class MontiSecArcAnalysisToolWrapper extends MontiSecArcAnalysisTool { ...@@ -141,7 +148,7 @@ public class MontiSecArcAnalysisToolWrapper extends MontiSecArcAnalysisTool {
MontiSecArcAnalysisToolWrapper tool = null; MontiSecArcAnalysisToolWrapper tool = null;
List<String> argsAsList = new LinkedList<String>(); List<String> argsAsList = new LinkedList<String>();
for (int i = 0; i < arguments.length; i++) { 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-1);
argsAsList.remove(i-2); argsAsList.remove(i-2);
continue; continue;
......
...@@ -20,7 +20,7 @@ public class MontiSecArcAnalysisRunningExampleTest extends TestWithSymtabAnalysi ...@@ -20,7 +20,7 @@ public class MontiSecArcAnalysisRunningExampleTest extends TestWithSymtabAnalysi
*/ */
@Test @Test
public void testSecRunningExample() throws CircluarDependencyException, AmbigousException { 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(); tool.init();
assertTrue(tool.run()); assertTrue(tool.run());
......
...@@ -48,6 +48,6 @@ component CashDeskSystem { ...@@ -48,6 +48,6 @@ component CashDeskSystem {
connect cashDesk -> store; connect cashDesk -> store;
connect store.outProductData -> cashDesk.inProductData; connect store.outPData -> cashDesk.inProductData;
} }
\ No newline at end of file
...@@ -5,34 +5,41 @@ import secarc.seccds.msg.*; ...@@ -5,34 +5,41 @@ import secarc.seccds.msg.*;
component Store { component Store {
trustlevel +1; accesscontrol on;
autoconnect port;
access stockManager, storeManager, cashier; access stockManager, storeManager, cashier;
connect saleInformation -> data.filterInfo; trustlevel +1;
port port
in String inIdentifier, in String inIdentifier,
out ProductData outProductData; out ProductData outPData;
port port
in SaleInformation; in SaleInformation;
component StoreServer { connect storeServer.productData -> outPData;
component StoreServer storeServer {
autoconnect port;
configuration confName; configuration confName;
cpe "cpeName"; cpe "cpeName";
port port
in String inIdentifier; in String inIdentifier,
in SaleInformation,
out ProductData;
component (filter fString) FilterIdentifier { component (filter fString) FilterIdentifier filterIdentifier {
port port
in String inIdentifier, in String inIdentifier,
out Identifier; out Identifier;
} }
component DataProcessor { component DataProcessor dataProcessor {
port port
out ProductData, out ProductData,
...@@ -41,6 +48,8 @@ component Store { ...@@ -41,6 +48,8 @@ component Store {
} }
connect saleInformation -> dataProcessor.filterInfo;
} }
} }
\ No newline at end of file
...@@ -353,7 +353,7 @@ public class ArchitectureGraphBuilder { ...@@ -353,7 +353,7 @@ public class ArchitectureGraphBuilder {
} else if(componentType!= null && componentType.getSubComponent(sourceComponent).isPresent()) { } else if(componentType!= null && componentType.getSubComponent(sourceComponent).isPresent()) {
subComponent = componentType.getSubComponent(sourceComponent).get(); 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(); PortEntry port = ((SecComponentEntry) subComponent.getComponentType()).getPort(sourcePort).get().getBestKnownVersion();
if(port != null) { if(port != null) {
sourcePortVertex = Vertex.lookup(port, this.graph); sourcePortVertex = Vertex.lookup(port, this.graph);
...@@ -381,7 +381,7 @@ public class ArchitectureGraphBuilder { ...@@ -381,7 +381,7 @@ public class ArchitectureGraphBuilder {
} else if(componentType != null && componentType.getSubComponent(targetComponent).isPresent()) { } else if(componentType != null && componentType.getSubComponent(targetComponent).isPresent()) {
subComponent = componentType.getSubComponent(targetComponent).get(); 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(); PortEntry port = ((SecComponentEntry) subComponent.getComponentType()).getPort(targetPort).get().getBestKnownVersion();
if(port != null) { if(port != null) {
targetPortVertex = Vertex.lookup(port, this.graph); targetPortVertex = Vertex.lookup(port, this.graph);
......
#!/bin/bash #!/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 shift
shift shift
trustlevel_command="-synthesis secarc secPreParameter -synthesis secarc secFilterTrustlevel" trustlevel_command="-synthesis secarc secPreParameter -synthesis secarc secFilterTrustlevel"
analysis_command="-synthesis secarc secAnalysisAdvanced" analysis_command="-synthesis secarc $1"
shift
while [ "$1" != '' ] while [ "$1" != '' ]
do do
...@@ -20,9 +32,9 @@ while [ "$1" != '' ] ...@@ -20,9 +32,9 @@ while [ "$1" != '' ]
critical_command="-synthesis secarc secFilterCriticalPort" critical_command="-synthesis secarc secFilterCriticalPort"
shift shift
else else
trustlevel_command+=("$1") trustlevel_command+=( "$1" )
shift shift
fi fi
done done
$standard_command ${trustlevel_command[*]} $critical_command $analysis_command ${files[*]} $standard_command $conf_command ${trustlevel_command[*]} $critical_command $analysis_command ${files[*]}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment