use of org.osate.aadl2.EventPort in project osate2 by osate.
the class ProcessTypeImpl method createOwnedEventPort.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EventPort createOwnedEventPort() {
EventPort newOwnedEventPort = (EventPort) create(Aadl2Package.eINSTANCE.getEventPort());
getOwnedEventPorts().add(newOwnedEventPort);
return newOwnedEventPort;
}
use of org.osate.aadl2.EventPort in project osate2 by osate.
the class VirtualBusTypeImpl method createOwnedEventPort.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EventPort createOwnedEventPort() {
EventPort newOwnedEventPort = (EventPort) create(Aadl2Package.eINSTANCE.getEventPort());
getOwnedEventPorts().add(newOwnedEventPort);
return newOwnedEventPort;
}
use of org.osate.aadl2.EventPort in project AGREE by loonwerks.
the class RenamingVisitor method getReferenceStr.
private String getReferenceStr(AgreeVar var) {
String prefix = getCategory(rootInstance, var);
if (prefix == null) {
return null;
}
if (var.id.endsWith(AgreeASTBuilder.clockIDSuffix)) {
return null;
}
String seperator = (prefix == "" ? "" : ".");
EObject reference = var.reference;
String suffix = "";
if (var.id.endsWith(AgreeASTBuilder.eventSuffix + AgreeInlineLatchedConnections.LATCHED_SUFFIX)) {
suffix = "._EVENT_._LATCHED_";
} else if (var.id.endsWith(AgreeASTBuilder.eventSuffix)) {
suffix = "._EVENT_";
} else if (var.id.endsWith(AgreeInlineLatchedConnections.LATCHED_SUFFIX)) {
suffix = "._LATCHED_";
}
if (reference instanceof GuaranteeStatement) {
String id = ((GuaranteeStatement) reference).getName();
if (id == null || id.isEmpty()) {
id = "";
} else {
id = "[" + id + "] ";
}
return id + ((GuaranteeStatement) reference).getStr();
} else if (reference instanceof AssumeStatement) {
String id = ((AssumeStatement) reference).getName();
if (id == null || id.isEmpty()) {
id = "";
} else {
id = "[" + id + "] ";
}
return prefix + " assume: " + id + ((AssumeStatement) reference).getStr();
} else if (reference instanceof LemmaStatement) {
String id = ((LemmaStatement) reference).getName();
if (id == null || id.isEmpty()) {
id = "";
} else {
id = "[" + id + "] ";
}
return prefix + " lemma: " + id + ((LemmaStatement) reference).getStr();
} else if (reference instanceof ReachableStatement) {
renaming.addInvertedProperty(var.id);
String id = ((ReachableStatement) reference).getName();
if (id == null || id.isEmpty()) {
id = "";
} else {
id = "[" + id + "] ";
}
return prefix + " reachable: " + id + ((ReachableStatement) reference).getStr();
} else if (reference instanceof AssertStatement) {
throw new AgreeException("We really didn't expect to see an assert statement here");
} else if (reference instanceof Arg) {
return prefix + seperator + ((Arg) reference).getName() + suffix;
} else if (reference instanceof EqStatement) {
return prefix + "eq " + String.join(", ", ((EqStatement) reference).getLhs().stream().map(lhs -> argToString(lhs)).collect(Collectors.toList()));
} else if (reference instanceof InputStatement) {
return prefix + "agree_input " + String.join(", ", ((InputStatement) reference).getLhs().stream().map(lhs -> argToString(lhs)).collect(Collectors.toList()));
} else if (reference instanceof DataPort) {
return prefix + seperator + ((DataPort) reference).getName() + suffix;
} else if (reference instanceof EventPort) {
return prefix + seperator + ((EventPort) reference).getName() + suffix;
} else if (reference instanceof EventDataPort) {
return prefix + seperator + ((EventDataPort) reference).getName() + suffix;
} else if (reference instanceof FeatureGroup) {
String featName = ((FeatureGroup) reference).getName();
String varName = var.toString();
featName = varName.substring(varName.indexOf(featName)).replace("__", ".");
return prefix + seperator + featName;
} else if (reference instanceof PropertyStatement) {
return prefix + seperator + ((PropertyStatement) reference).getName();
} else if (reference instanceof Property) {
return "AADL property " + ((Property) reference).getName();
} else if (reference instanceof GetPropertyExpr) {
return "Get_Property(" + ((GetPropertyExpr) reference).getContainingClassifier().getName() + ", " + ((Property) ((GetPropertyExpr) reference).getProp()).getName() + ")";
} else if (reference instanceof ComponentType || reference instanceof ComponentImplementation || reference instanceof SystemImplementation) {
if (var.id.equals(LustreAstBuilder.assumeHistSufix)) {
return "Subcomponent Assumptions";
}
return "Result";
} else if (reference instanceof AgreeStatement) {
return prefix + reference.toString();
}
throw new AgreeException("Unhandled reference type: '" + reference.getClass().getName() + "'");
}
Aggregations