use of verdict.vdm.vdm_model.CIAPort in project VERDICT by ge-high-assurance.
the class Vdm2Csv method updateCompDepTable.
private void updateCompDepTable(Table compDepTable, String qualNameComp, String packageName, String compTypeName, CyberExpr inputCyberExpr, CIAPort outputCIAPort) {
if (inputCyberExpr.getKind() == null) {
// expression is not an AND, OR, NOT expression
compDepTable.addValue(qualNameComp);
compDepTable.addValue(replaceColonsWithUnderscore(qualNameComp));
compDepTable.addValue(packageName);
compDepTable.addValue(compTypeName);
CIAPort inpCIAPort = inputCyberExpr.getPort();
compDepTable.addValue(inpCIAPort.getName());
compDepTable.addValue(formatToSmall(inpCIAPort.getCia().name()));
compDepTable.addValue(outputCIAPort.getName());
compDepTable.addValue(formatToSmall(outputCIAPort.getCia().name()));
compDepTable.capRow();
} else if (inputCyberExpr.getKind().toString().equalsIgnoreCase("Or")) {
List<CyberExpr> subInpCyberList = inputCyberExpr.getOr().getExpr();
for (CyberExpr subInpCyberExpr : subInpCyberList) {
updateCompDepTable(compDepTable, qualNameComp, packageName, compTypeName, subInpCyberExpr, outputCIAPort);
}
} else if (inputCyberExpr.getKind().toString().equalsIgnoreCase("And")) {
updateCompDepTableWithAndCyberExpr(compDepTable, qualNameComp, packageName, compTypeName, inputCyberExpr, outputCIAPort);
} else {
throw new RuntimeException("Expression used as Cyber Relation input is not supported.");
}
}