Skip to content

Commit

Permalink
Removed lingering functionality from translator header.
Browse files Browse the repository at this point in the history
  • Loading branch information
azreika committed Nov 13, 2020
1 parent b582c1f commit 0005fc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions src/ast2ram/AstToRamTranslator.cpp
Expand Up @@ -729,6 +729,12 @@ void AstToRamTranslator::createRamRelation(size_t scc) {
}
}

const ram::Relation* AstToRamTranslator::lookupRelation(const std::string& name) const {
auto it = ramRelations.find(name);
assert(it != ramRelations.end() && "relation not found");
return (*it).second.get();
}

/** translates the given datalog program into an equivalent RAM program */
void AstToRamTranslator::translateProgram(const ast::TranslationUnit& translationUnit) {
// keep track of relevant analyses
Expand Down
7 changes: 1 addition & 6 deletions src/ast2ram/AstToRamTranslator.h
Expand Up @@ -18,7 +18,6 @@

#include "souffle/RamTypes.h"
#include "souffle/utility/ContainerUtil.h"
#include <cassert>
#include <map>
#include <set>
#include <string>
Expand Down Expand Up @@ -101,11 +100,7 @@ class AstToRamTranslator {
/** create a RAM element access node */
static Own<ram::TupleElement> makeRamTupleElement(const Location& loc);

const ram::Relation* lookupRelation(const std::string& name) const {
auto it = ramRelations.find(name);
assert(it != ramRelations.end() && "relation not found");
return (*it).second.get();
}
const ram::Relation* lookupRelation(const std::string& name) const;

protected:
/** AST program */
Expand Down

0 comments on commit 0005fc1

Please sign in to comment.