37 for (
const Relation* compRel :
computed()) {
38 os << compRel->getQualifiedName() <<
", ";
41 for (
const Relation* compRel :
expired()) {
42 os << compRel->getQualifiedName() <<
", ";
48 os <<
"not recursive";
55 precedenceGraph = translationUnit.getAnalysis<PrecedenceGraphAnalysis>();
57 size_t numSCCs = translationUnit.getAnalysis<SCCGraphAnalysis>()->getNumberOfSCCs();
58 std::vector<std::set<const Relation*>> relationExpirySchedule =
62 for (
size_t i = 0;
i < numSCCs;
i++) {
64 const std::set<const Relation*> computedRelations =
73 std::vector<std::set<const Relation*>> relationExpirySchedule;
79 std::vector<std::set<const Relation*>> alive(numSCCs);
81 relationExpirySchedule.resize(numSCCs);
86 for (
size_t orderedSCC = 1; orderedSCC < numSCCs; orderedSCC++) {
88 alive[orderedSCC].insert(alive[orderedSCC - 1].begin(), alive[orderedSCC - 1].end());
92 for (
const Relation* r : sccGraph->getInternalRelations(scc)) {
94 alive[orderedSCC].insert(predecessor);
100 std::set_difference(alive[orderedSCC].begin(), alive[orderedSCC].end(), alive[orderedSCC - 1].begin(),
101 alive[orderedSCC - 1].end(),
102 std::inserter(relationExpirySchedule[numSCCs - orderedSCC],
103 relationExpirySchedule[numSCCs - orderedSCC].end()));
106 return relationExpirySchedule;
110 os <<
"begin schedule\n";
114 for (
const Relation* compRel : step.computed()) {
115 os << compRel->getQualifiedName() <<
", ";
118 for (
const Relation* compRel : step.expired()) {
119 os << compRel->getQualifiedName() <<
", ";
122 if (step.recursive()) {
125 os <<
"not recursive";
129 os <<
"end schedule\n";