use of com.rockwellcollins.atc.agree.analysis.realtime.AgreePeriodicPattern in project AGREE by loonwerks.
the class AgreeASTBuilder method gatherStatementIds.
private Set<String> gatherStatementIds(AgreeStatement statement) {
IdGatherer visitor = new IdGatherer();
Set<String> ids = new HashSet<>();
if (statement instanceof AgreeCauseEffectPattern) {
AgreeCauseEffectPattern pattern = (AgreeCauseEffectPattern) statement;
ids.addAll(pattern.cause.accept(visitor));
ids.addAll(pattern.effect.accept(visitor));
} else if (statement instanceof AgreePeriodicPattern) {
AgreePeriodicPattern pattern = (AgreePeriodicPattern) statement;
ids.addAll(pattern.event.accept(visitor));
} else if (statement instanceof AgreeSporadicPattern) {
AgreeSporadicPattern pattern = (AgreeSporadicPattern) statement;
ids.addAll(pattern.event.accept(visitor));
} else {
ids.addAll(statement.expr.accept(visitor));
}
return ids;
}
Aggregations