Skip to content

Commit

Permalink
Cleaned up some more includes in ast2ram.
Browse files Browse the repository at this point in the history
  • Loading branch information
azreika committed Sep 23, 2020
1 parent 540f656 commit 164f342
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/ast2ram/AstToRamTranslator.cpp
Expand Up @@ -117,8 +117,8 @@
#include "souffle/BinaryConstraintOps.h"
#include "souffle/SymbolTable.h"
#include "souffle/TypeAttribute.h"
#include "souffle/utility/ContainerUtil.h"
#include "souffle/utility/FunctionalUtil.h"
#include "souffle/utility/MiscUtil.h"
#include <algorithm>
#include <cassert>
#include <chrono>
Expand Down
5 changes: 1 addition & 4 deletions src/ast2ram/AstToRamTranslator.h
Expand Up @@ -16,11 +16,8 @@

#pragma once

#include "souffle/RamTypes.h"
#include "souffle/utility/ContainerUtil.h"
#include "souffle/utility/FunctionalUtil.h"
#include "souffle/utility/MiscUtil.h"
#include "souffle/utility/StreamUtil.h"
#include "souffle/utility/StringUtil.h"
#include <cassert>
#include <cstddef>
#include <map>
Expand Down
1 change: 1 addition & 0 deletions src/ast2ram/ClauseTranslator.cpp
Expand Up @@ -41,6 +41,7 @@
#include "ram/TupleElement.h"
#include "ram/UnpackRecord.h"
#include "ram/Utils.h"
#include "souffle/utility/StringUtil.h"
#include <map>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/ast2ram/Location.h
Expand Up @@ -15,6 +15,7 @@
#pragma once

#include "ast2ram/AstToRamTranslator.h"
#include "souffle/utility/MiscUtil.h"

namespace souffle::ast2ram {

Expand Down
11 changes: 9 additions & 2 deletions src/ast2ram/ValueIndex.cpp
Expand Up @@ -20,6 +20,8 @@
#include "ast2ram/AstToRamTranslator.h"
#include "ast2ram/Location.h"
#include "ram/Relation.h"
#include "souffle/utility/FunctionalUtil.h"
#include "souffle/utility/StreamUtil.h"
#include <cassert>
#include <set>

Expand All @@ -33,7 +35,7 @@ void AstToRamTranslator::ValueIndex::addVarReference(

void AstToRamTranslator::ValueIndex::addVarReference(
const ast::Variable& var, int ident, int pos, Own<ram::RelationReference> rel) {
addVarReference(var, AstToRamTranslator::Location({ident, pos, std::move(rel)}));
addVarReference(var, Location({ident, pos, std::move(rel)}));
}

bool AstToRamTranslator::ValueIndex::isDefined(const ast::Variable& var) const {
Expand Down Expand Up @@ -71,7 +73,7 @@ void AstToRamTranslator::ValueIndex::setRecordDefinition(

void AstToRamTranslator::ValueIndex::setRecordDefinition(
const ast::RecordInit& init, int ident, int pos, Own<ram::RelationReference> rel) {
setRecordDefinition(init, AstToRamTranslator::Location({ident, pos, std::move(rel)}));
setRecordDefinition(init, Location({ident, pos, std::move(rel)}));
}

const AstToRamTranslator::Location& AstToRamTranslator::ValueIndex::getDefinitionPoint(
Expand Down Expand Up @@ -107,4 +109,9 @@ bool AstToRamTranslator::ValueIndex::isSomethingDefinedOn(int level) const {
return false;
}

void AstToRamTranslator::ValueIndex::print(std::ostream& out) const {
out << "Variables:\n\t";
out << join(var_references, "\n\t");
}

} // namespace souffle::ast2ram
10 changes: 1 addition & 9 deletions src/ast2ram/ValueIndex.h
Expand Up @@ -90,15 +90,7 @@ class AstToRamTranslator::ValueIndex {

bool isSomethingDefinedOn(int level) const;

void print(std::ostream& out) const {
out << "Variables:\n\t";
out << join(var_references, "\n\t");
}

friend std::ostream& operator<<(std::ostream& out, const ValueIndex& index) __attribute__((unused)) {
index.print(out);
return out;
}
void print(std::ostream& out) const;

private:
/** The index of variable accesses */
Expand Down

0 comments on commit 164f342

Please sign in to comment.