Commit cb1182e2 authored by Paff's avatar Paff
Browse files

bug fixes skrict because of naming

parent 5d435450
......@@ -108,7 +108,7 @@
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>secarc.WrapperMontiSecArcAnalysisTool</mainClass>
<mainClass>secarc.MontiSecArcAnalysisToolWrapper</mainClass>
</manifest>
</archive>
</configuration>
......
......@@ -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;
......
......@@ -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());
......
......@@ -48,6 +48,6 @@ component CashDeskSystem {
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.*;
component Store {
trustlevel +1;
accesscontrol on;
autoconnect port;
access stockManager, storeManager, cashier;
connect saleInformation -> data.filterInfo;
trustlevel +1;
port
in String inIdentifier,
out ProductData outProductData;
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;
}
......
......@@ -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);
......
#!/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[*]}
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