Commit 4480d060 authored by Paff's avatar Paff
Browse files

transformation and analysis in a workflow in order to work with the ast

parent ec65e538
...@@ -42,15 +42,15 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -42,15 +42,15 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
/** /**
* Factory method for {@link MontiSecArcAnalysis}.l * Factory method for {@link MontiSecArcAnalysis}.l
*/ */
public static MontiSecArcAnalysis newLanguage(ILanguage component, List<String> analysisParameter, boolean critical, String analysisConfPath) { public static MontiSecArcAnalysis newLanguage(ILanguage component, List<String> analysisParameter, String analysisConfPath) {
return new MontiSecArcAnalysis(component, analysisParameter, critical, analysisConfPath); return new MontiSecArcAnalysis(component, analysisParameter, analysisConfPath);
} }
/** /**
* Constructor for secarc.MontiSecArcAnalysis * Constructor for secarc.MontiSecArcAnalysis
*/ */
@Inject @Inject
public MontiSecArcAnalysis(final ILanguage component, List<String> analysisParameter, boolean critical, String analysisConfPath) { public MontiSecArcAnalysis(final ILanguage component, List<String> analysisParameter, String analysisConfPath) {
super(component); super(component);
// PARSING-SETUP // PARSING-SETUP
...@@ -86,7 +86,6 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -86,7 +86,6 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
MontiSecArcAnalysisVisitor analysisVisitor = new MontiSecArcAnalysisVisitor(); MontiSecArcAnalysisVisitor analysisVisitor = new MontiSecArcAnalysisVisitor();
analysisVisitor.setAdvanced(false); analysisVisitor.setAdvanced(false);
analysisVisitor.setAnalysisParameter(analysisParameter); analysisVisitor.setAnalysisParameter(analysisParameter);
analysisVisitor.setCiritical(critical);
analysisWorkflow.setClient(analysisVisitor); analysisWorkflow.setClient(analysisVisitor);
//Add Workflow for Analysis for beginners //Add Workflow for Analysis for beginners
...@@ -97,64 +96,31 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -97,64 +96,31 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
analysisWorkflow.setClient(analysisVisitor); analysisWorkflow.setClient(analysisVisitor);
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED, analysisWorkflow); addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED, analysisWorkflow);
this.addTrustlevelWhatIfWorkflow(analysisParameter, analysisConfPath, critical); this.addTrustlevelWhatIfWorkflow(analysisParameter, analysisConfPath);
this.addCriticalPortWhatIfWorkflow(analysisParameter, analysisConfPath, critical); this.addCriticalPortWhatIfWorkflow(analysisParameter, analysisConfPath);
} }
private void addCriticalPortWhatIfWorkflow(List<String> analysisParameter, String analysisConfPath, boolean critical) { private void addCriticalPortWhatIfWorkflow(List<String> analysisParameter, String analysisConfPath) {
AnalysisCriticalPortTransformationWorkflow<MontiSecArcRoot> criticalPortTransformationWorkflow = new AnalysisCriticalPortTransformationWorkflow<MontiSecArcRoot>( AnalysisCriticalPortTransformationWorkflow<MontiSecArcRoot> criticalPortTransformationWorkflow = new AnalysisCriticalPortTransformationWorkflow<MontiSecArcRoot>(
MontiSecArcRoot.class); MontiSecArcRoot.class);
addExecutionUnit("transformCriticalPort", criticalPortTransformationWorkflow.setAdvanced(false);
criticalPortTransformationWorkflow); criticalPortTransformationWorkflow.setAnalysisConfPath(analysisConfPath);
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_CRITICAL_PORT, criticalPortTransformationWorkflow);
//Workflow for Analysis criticalPortTransformationWorkflow.setAdvanced(true);
MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisTransformWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(LANGUAGE_ROOT); addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_CRITICAL_PORT, criticalPortTransformationWorkflow);
//AnalysisCreator
analysisTransformWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis(analysisConfPath));
//AnalysisConfiguratin
analysisTransformWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig());
//Visitor for Analysis
MontiSecArcAnalysisVisitor analysisTransfromVisitor = new MontiSecArcAnalysisVisitor();
analysisTransfromVisitor.setAdvanced(false);
analysisTransfromVisitor.setAnalysisParameter(analysisParameter);
analysisTransfromVisitor.setCiritical(critical);
analysisTransformWorkflow.setClient(analysisTransfromVisitor);
//Add Workflow for Analysis for beginners: what if
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_CRITICAL_PORT, analysisTransformWorkflow);
//Add Workflow for Analysis for advanced users
analysisTransfromVisitor.setAdvanced(true);
analysisTransformWorkflow.setClient(analysisTransfromVisitor);
//Add Workflow for Analysis for advanced users: what if
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF_CRITICAL_PORT, analysisTransformWorkflow);
} }
private void addTrustlevelWhatIfWorkflow(List<String> analysisParameter, String analysisConfPath, boolean critical) { private void addTrustlevelWhatIfWorkflow(List<String> analysisParameter, String analysisConfPath) {
AnalysisTrustlevelTransformationWorkflow<MontiSecArcRoot> trustlevelTransformationWorkflow = new AnalysisTrustlevelTransformationWorkflow<MontiSecArcRoot>(MontiSecArcRoot.class); AnalysisTrustlevelTransformationWorkflow<MontiSecArcRoot> trustlevelTransformationWorkflow = new AnalysisTrustlevelTransformationWorkflow<MontiSecArcRoot>(MontiSecArcRoot.class);
trustlevelTransformationWorkflow.setAnalysisParameter(analysisParameter); trustlevelTransformationWorkflow.setAnalysisParameter(analysisParameter);
addExecutionUnit("transformTrustlevel", trustlevelTransformationWorkflow); trustlevelTransformationWorkflow.setAdvanced(false);
trustlevelTransformationWorkflow.setAnalysisConfPath(analysisConfPath);
//Workflow for Analysis addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_TRUSTLEVEL, trustlevelTransformationWorkflow);
MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisTransformWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(LANGUAGE_ROOT);
//AnalysisCreator
analysisTransformWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis(analysisConfPath));
//AnalysisConfiguratin
analysisTransformWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig());
//Visitor for Analysis
MontiSecArcAnalysisVisitor analysisTransfromVisitor = new MontiSecArcAnalysisVisitor();
analysisTransfromVisitor.setAdvanced(false);
analysisTransfromVisitor.setAnalysisParameter(analysisParameter);
analysisTransfromVisitor.setCiritical(critical);
analysisTransformWorkflow.setClient(analysisTransfromVisitor);
//Add Workflow for Analysis for beginners: what if
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_TRUSTLEVEL, analysisTransformWorkflow);
//Add Workflow for Analysis for advanced users trustlevelTransformationWorkflow.setAdvanced(true);
analysisTransfromVisitor.setAdvanced(true); addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF_TRUSTLEVEL, trustlevelTransformationWorkflow);
analysisTransformWorkflow.setClient(analysisTransfromVisitor);
//Add Workflow for Analysis for advanced users: what if
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF_TRUSTLEVEL, analysisTransformWorkflow);
} }
/** /**
......
...@@ -33,30 +33,14 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -33,30 +33,14 @@ public class MontiSecArcAnalysisTool extends ETSTool {
public static void main(String[] arguments) { public static void main(String[] arguments) {
MCG.initMonticoreGlobals(); MCG.initMonticoreGlobals();
List<String> analysisParameter = getAnalysisParameter(arguments); List<String> analysisParameter = getAnalysisParameter(arguments);
boolean critical = isAnalysisCritical(arguments);
String analysisConfPath = getAnalysisConfPath(arguments); String analysisConfPath = getAnalysisConfPath(arguments);
MontiSecArcAnalysisTool tool = new MontiSecArcAnalysisTool(cleanArgumentList(arguments), analysisParameter, critical, analysisConfPath); MontiSecArcAnalysisTool tool = new MontiSecArcAnalysisTool(cleanArgumentList(arguments), analysisParameter, analysisConfPath);
tool.init(); tool.init();
tool.run(); tool.run();
} }
/**
* Checks if the analysis shall be used for critical ports
*
* @param arguments
* @return true if analysis parameter -crictical is used
*/
protected static boolean isAnalysisCritical(String[] arguments) {
for(String argument : arguments) {
if(argument.equals(MontiSecArcConstants.ANALYSIS_CIRITICAL_PORTS)) {
return true;
}
}
return false;
}
/** /**
* Path to config file * Path to config file
* *
...@@ -159,14 +143,14 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -159,14 +143,14 @@ public class MontiSecArcAnalysisTool extends ETSTool {
* *
* @param arguments * @param arguments
*/ */
public MontiSecArcAnalysisTool(String[] arguments, List<String> analysisParameter, boolean critical, String analysisConfPath) { public MontiSecArcAnalysisTool(String[] arguments, List<String> analysisParameter, String analysisConfPath) {
super(arguments); super(arguments);
Injector injector = Guice.createInjector(new MontiSecArcDefaultModule()); Injector injector = Guice.createInjector(new MontiSecArcDefaultModule());
InjectorProvider.setInjector(injector); InjectorProvider.setInjector(injector);
LanguageFamily languageFamily = new LanguageFamily(); LanguageFamily languageFamily = new LanguageFamily();
languageFamily.addLanguage(MontiSecArcAnalysis.newLanguage(injector.getInstance(MontiSecArcComponent.class), analysisParameter, critical, analysisConfPath)); languageFamily.addLanguage(MontiSecArcAnalysis.newLanguage(injector.getInstance(MontiSecArcComponent.class), analysisParameter, analysisConfPath));
setLanguages(languageFamily); setLanguages(languageFamily);
// set default CoCos // set default CoCos
......
...@@ -126,11 +126,6 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient { ...@@ -126,11 +126,6 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient {
*/ */
private List<String> analysisParameter; private List<String> analysisParameter;
/**
* Analysis only for critical ports
*/
private boolean critical = false;
private int factorSum = 0; private int factorSum = 0;
...@@ -154,10 +149,6 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient { ...@@ -154,10 +149,6 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient {
this.analysisParameter = analysisParameter; this.analysisParameter = analysisParameter;
} }
public void setCiritical(boolean critical) {
this.critical = critical;
}
public int getFactorSum() { public int getFactorSum() {
return factorSum; return factorSum;
} }
...@@ -236,7 +227,7 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient { ...@@ -236,7 +227,7 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient {
} }
} catch (AmbigousException e) { } catch (AmbigousException e) {
// not checked here // not checked here
e.printStackTrace(); MCG.getLogger().info(e.getMessage());
} }
} }
......
...@@ -7,12 +7,20 @@ import interfaces2.resolvers.Resolver; ...@@ -7,12 +7,20 @@ import interfaces2.resolvers.Resolver;
import java.util.Map; import java.util.Map;
import secarc._ast.ASTMCCompilationUnit;
import secarc._tool.MontiSecArcRoot; import secarc._tool.MontiSecArcRoot;
import secarc.ets.check.MontiSecArcAnalysisCreator;
import secarc.ets.check.MontiSecArcAnalysisVisitor;
import secarc.ets.check.MontiSecArcAnalysisWorkflow;
import mc.DSLWorkflow; import mc.DSLWorkflow;
import mc.ast.ASTNode; import mc.ast.ASTNode;
import mc.ast.InheritanceVisitor; import mc.ast.InheritanceVisitor;
public class AnalysisCriticalPortTransformationWorkflow<T extends MontiSecArcRoot> extends DSLWorkflow<T> { public class AnalysisCriticalPortTransformationWorkflow<T extends MontiSecArcRoot> extends DSLWorkflow<T> {
boolean advanced = false;
String analysisConfPath = "";
/** /**
* @param responsibleClass class of the dsl root * @param responsibleClass class of the dsl root
...@@ -47,20 +55,49 @@ public class AnalysisCriticalPortTransformationWorkflow<T extends MontiSecArcRoo ...@@ -47,20 +55,49 @@ public class AnalysisCriticalPortTransformationWorkflow<T extends MontiSecArcRoo
return; return;
} }
//Elements which are needed for analysis
PreAnalysisCriticalPortTransformationVisitor preVisitor = new PreAnalysisCriticalPortTransformationVisitor(dslroot); PreAnalysisCriticalPortTransformationVisitor preVisitor = new PreAnalysisCriticalPortTransformationVisitor(dslroot);
preVisitor.setResolver(resolver); preVisitor.setResolver(resolver);
preVisitor.setNodesToNameSpaces(nodesToNameSpaces); preVisitor.setNodesToNameSpaces(nodesToNameSpaces);
//Copy AST for this workflow
ASTMCCompilationUnit astCopy = dslroot.getAst().deepClone();
InheritanceVisitor.run(preVisitor, dslroot.getAst()); InheritanceVisitor.run(preVisitor, dslroot.getAst());
//Delete Elements which are not needed
AnalysisCriticalPortTransformationVisitor visitorTransform = new AnalysisCriticalPortTransformationVisitor(dslroot); AnalysisCriticalPortTransformationVisitor visitorTransform = new AnalysisCriticalPortTransformationVisitor(dslroot);
visitorTransform.setResolver(resolver); visitorTransform.setResolver(resolver);
visitorTransform.setNodesToNameSpaces(nodesToNameSpaces); visitorTransform.setNodesToNameSpaces(nodesToNameSpaces);
visitorTransform.setEntries(preVisitor.getEntries()); visitorTransform.setEntries(preVisitor.getEntries());
InheritanceVisitor.run(visitorTransform, dslroot.getAst()); InheritanceVisitor.run(visitorTransform, dslroot.getAst());
//Analysis for transformed Entries
//Workflow for Analysis
MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisTransformWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(MontiSecArcRoot.class);
//AnalysisCreator
analysisTransformWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis(analysisConfPath));
//AnalysisConfiguratin
analysisTransformWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig());
//Visitor for Analysis
MontiSecArcAnalysisVisitor analysisTransfromVisitor = new MontiSecArcAnalysisVisitor();
analysisTransfromVisitor.setAdvanced(advanced);
analysisTransformWorkflow.setClient(analysisTransfromVisitor);
analysisTransformWorkflow.run(dslroot);
//Set original AST
dslroot.setAst(astCopy);
} }
public void setAdvanced(boolean advanced) {
this.advanced = advanced;
}
public void setAnalysisConfPath(String analysisConfPath) {
this.analysisConfPath = analysisConfPath;
}
} }
...@@ -4,6 +4,7 @@ import interfaces2.namespaces.NameSpace; ...@@ -4,6 +4,7 @@ import interfaces2.namespaces.NameSpace;
import interfaces2.resolvers.AmbigousException; import interfaces2.resolvers.AmbigousException;
import interfaces2.resolvers.Resolver; import interfaces2.resolvers.Resolver;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -11,13 +12,11 @@ import com.google.common.base.Optional; ...@@ -11,13 +12,11 @@ import com.google.common.base.Optional;
import secarc._ast.ASTSecArcFilterComponent; import secarc._ast.ASTSecArcFilterComponent;
import secarc._ast.ASTSecArcTrustLevel;
import secarc._tool.MontiSecArcRoot; import secarc._tool.MontiSecArcRoot;
import secarc.ets.entries.SecComponentEntry; import secarc.ets.entries.SecComponentEntry;
import secarc.ets.entries.TrustlevelEntry; import secarc.ets.entries.TrustlevelEntry;
import mc.ast.ASTNode; import mc.ast.ASTNode;
import mc.ast.ConcreteVisitor; import mc.ast.ConcreteVisitor;
import mc.literals._ast.ASTIntLiteral;
import mc.umlp.arcd.ets.entries.ComponentEntry; import mc.umlp.arcd.ets.entries.ComponentEntry;
public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor { public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor {
...@@ -28,6 +27,10 @@ public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor { ...@@ -28,6 +27,10 @@ public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor {
protected Map<ASTNode, NameSpace> nodesToNameSpaces; protected Map<ASTNode, NameSpace> nodesToNameSpaces;
protected Map<String, TrustlevelEntry> actualTrustlevels = new HashMap<String, TrustlevelEntry>();
protected boolean reverse = false;
/** /**
* *
* @param dslroot dsl root to use * @param dslroot dsl root to use
...@@ -40,6 +43,18 @@ public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor { ...@@ -40,6 +43,18 @@ public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor {
this.analysisParameter = analysisParameter; this.analysisParameter = analysisParameter;
} }
public void setActualTrustlevel(Map<String, TrustlevelEntry> actualTrustlevels) {
this.actualTrustlevels = actualTrustlevels;
}
public Map<String, TrustlevelEntry> getActualTrustlevel() {
return this.actualTrustlevels;
}
public void isReverse(boolean reverse) {
this.reverse = reverse;
}
public void visit(ASTSecArcFilterComponent node) { public void visit(ASTSecArcFilterComponent node) {
ComponentEntry compEntry = null; ComponentEntry compEntry = null;
try { try {
...@@ -55,14 +70,24 @@ public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor { ...@@ -55,14 +70,24 @@ public class AnalysisTrustlevelTransformationVisitor extends ConcreteVisitor {
if(analysisParameter.contains(compEntry.getName())) { if(analysisParameter.contains(compEntry.getName())) {
Optional<TrustlevelEntry> trustlevel = ((SecComponentEntry) compEntry).getTrustlevel(); Optional<TrustlevelEntry> trustlevel = ((SecComponentEntry) compEntry).getTrustlevel();
TrustlevelEntry value = null; TrustlevelEntry value = null;
if(trustlevel.isPresent()) { if(reverse) {
value = trustlevel.get(); if(trustlevel.isPresent()) {
value = trustlevel.get();
value.setValue(actualTrustlevels.get(compEntry.getName()).getValue());
value.setRelative(actualTrustlevels.get(compEntry.getName()).isPositive());
} else {
((SecComponentEntry) compEntry).setTrustlevel(null);
}
} else { } else {
value = new TrustlevelEntry(); if(trustlevel.isPresent()) {
value = trustlevel.get();
actualTrustlevels.put(compEntry.getName(), new TrustlevelEntry(value.getValue(), value.isPositive()));
} else {
value = new TrustlevelEntry();
}
value.setValue(1);
value.setRelative(false);
} }
value.setValue(1);
value.setRelative(false);
((SecComponentEntry) compEntry).setTrustlevel(value);
} }
} }
......
...@@ -12,11 +12,19 @@ import mc.DSLWorkflow; ...@@ -12,11 +12,19 @@ import mc.DSLWorkflow;
import mc.ast.ASTNode; import mc.ast.ASTNode;
import mc.ast.InheritanceVisitor; import mc.ast.InheritanceVisitor;
import secarc._tool.MontiSecArcRoot; import secarc._tool.MontiSecArcRoot;
import secarc.ets.check.MontiSecArcAnalysisCreator;
import secarc.ets.check.MontiSecArcAnalysisVisitor;
import secarc.ets.check.MontiSecArcAnalysisWorkflow;
import secarc.ets.entries.TrustlevelEntry;
public class AnalysisTrustlevelTransformationWorkflow<T extends MontiSecArcRoot> extends DSLWorkflow<T> { public class AnalysisTrustlevelTransformationWorkflow<T extends MontiSecArcRoot> extends DSLWorkflow<T> {
private List<String> analysisParameter; private List<String> analysisParameter;
boolean advanced = false;
String analysisConfPath = "";
/** /**
* @param responsibleClass class of the dsl root * @param responsibleClass class of the dsl root
*/ */
...@@ -50,17 +58,48 @@ public class AnalysisTrustlevelTransformationWorkflow<T extends MontiSecArcRoot> ...@@ -50,17 +58,48 @@ public class AnalysisTrustlevelTransformationWorkflow<T extends MontiSecArcRoot>
return; return;
} }
//Transform entries
AnalysisTrustlevelTransformationVisitor visitor = new AnalysisTrustlevelTransformationVisitor(dslroot); AnalysisTrustlevelTransformationVisitor visitor = new AnalysisTrustlevelTransformationVisitor(dslroot);
visitor.setAnalysisParameter(analysisParameter); visitor.setAnalysisParameter(analysisParameter);
visitor.setResolver(resolver); visitor.setResolver(resolver);
visitor.setNodesToNameSpaces(nodesToNameSpaces); visitor.setNodesToNameSpaces(nodesToNameSpaces);
visitor.isReverse(false);
InheritanceVisitor.run(visitor, dslroot.getAst()); InheritanceVisitor.run(visitor, dslroot.getAst());
Map<String, TrustlevelEntry> actualTrustlevels = visitor.getActualTrustlevel();
//Analysis for transformed Entries
//Workflow for Analysis
MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisTransformWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(MontiSecArcRoot.class);
//AnalysisCreator
analysisTransformWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis(analysisConfPath));
//AnalysisConfiguratin
analysisTransformWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig());
//Visitor for Analysis
MontiSecArcAnalysisVisitor analysisTransfromVisitor = new MontiSecArcAnalysisVisitor();
analysisTransfromVisitor.setAdvanced(advanced);
analysisTransfromVisitor.setAnalysisParameter(analysisParameter);
analysisTransformWorkflow.setClient(analysisTransfromVisitor);
analysisTransformWorkflow.run(dslroot);
//Reverse
visitor.isReverse(true);
visitor.setActualTrustlevel(actualTrustlevels);
InheritanceVisitor.run(visitor, dslroot.getAst());
} }
public void setAnalysisParameter(List<String> analysisParameter) { public void setAnalysisParameter(List<String> analysisParameter) {
this.analysisParameter = analysisParameter; this.analysisParameter = analysisParameter;
} }
public void setAdvanced(boolean advanced) {
this.advanced = advanced;
}
public void setAnalysisConfPath(String analysisConfPath) {
this.analysisConfPath = analysisConfPath;
}
} }
...@@ -16,7 +16,7 @@ public class MontiSecArcAnalysisTestTool extends MontiSecArcAnalysisTool { ...@@ -16,7 +16,7 @@ public class MontiSecArcAnalysisTestTool extends MontiSecArcAnalysisTool {
* *
*/ */
public MontiSecArcAnalysisTestTool(String[] args) { public MontiSecArcAnalysisTestTool(String[] args) {
super(cleanArgumentList(args), getAnalysisParameter(args), isAnalysisCritical(args), getAnalysisConfPath(args)); super(cleanArgumentList(args), getAnalysisParameter(args), getAnalysisConfPath(args));
this.init(); this.init();
} }
......