Skip to content

Commit

Permalink
Format and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaowenHu96 committed Dec 6, 2020
1 parent 2ad83fa commit cded5c9
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 6,334 deletions.
10 changes: 5 additions & 5 deletions src/ast/FunctionalConstraint.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Souffle - A Datalog Compiler
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved
* Copyright (c) 2020 The Souffle Developers. All rights reserved
* Licensed under the Universal Permissive License v 1.0 as shown at:
* - https://opensource.org/licenses/UPL
* - <souffle root>/licenses/SOUFFLE-UPL.txt
Expand Down Expand Up @@ -105,18 +105,18 @@ class FunctionalConstraint : public Constraint {
return true;
}

bool equivalentConstraint (const FunctionalConstraint& other) const {
bool equivalentConstraint(const FunctionalConstraint& other) const {
if (this->getArity() != other.getArity()) {
return false;
}
std::set<std::string> keyNames;
for (const auto& key : keys){
for (const auto& key : keys) {
keyNames.insert(key->getName());
}
for (const auto& key : other.keys){
for (const auto& key : other.keys) {
if (keyNames.find(key->getName()) == keyNames.end()) {
return false;
}
}
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ast/Relation.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include "RelationTag.h"
#include "ast/Attribute.h"
#include "ast/FunctionalConstraint.h"
#include "ast/Node.h"
#include "ast/QualifiedName.h"
#include "ast/FunctionalConstraint.h"
#include "ast/utility/NodeMapper.h"
#include "parser/SrcLocation.h"
#include "souffle/utility/ContainerUtil.h"
Expand Down
3 changes: 2 additions & 1 deletion src/ast2ram/ClauseTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class ClauseTranslator {
// value index to keep track of references in the loop nest
Own<ValueIndex> valueIndex = mk<ValueIndex>();

virtual Own<ram::Operation> createProjection(const ast::Clause& clause, const ast::Clause& originalClause) const;
virtual Own<ram::Operation> createProjection(
const ast::Clause& clause, const ast::Clause& originalClause) const;
virtual Own<ram::Condition> createCondition(const ast::Clause& originalClause) const;

private:
Expand Down
2 changes: 1 addition & 1 deletion src/ast2ram/ProvenanceClauseTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Own<ram::Condition> ProvenanceClauseTranslator::createCondition(
}

Own<ram::Operation> ProvenanceClauseTranslator::createProjection(
const ast::Clause& clause, const ast::Clause& /* originalClause */) const{
const ast::Clause& clause, const ast::Clause& /* originalClause */) const {
VecOwn<ram::Expression> values;

// get all values in the body
Expand Down
3 changes: 2 additions & 1 deletion src/ast2ram/ProvenanceClauseTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class ProvenanceClauseTranslator : public ClauseTranslator {
: ClauseTranslator(context, symbolTable) {}

protected:
Own<ram::Operation> createProjection(const ast::Clause& clause, const ast::Clause& originalClause) const override;
Own<ram::Operation> createProjection(
const ast::Clause& clause, const ast::Clause& originalClause) const override;
Own<ram::Condition> createCondition(const ast::Clause& originalClause) const override;
};
} // namespace souffle::ast2ram
6 changes: 3 additions & 3 deletions src/interpreter/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,10 +1052,10 @@ RamDomain Engine::execute(const Node* node, Context& ctxt) {
return result;
ESAC(Filter)

#define GUARDED_PROJECT(Structure, Arity, ...) \
CASE(GuardedProject, Structure, Arity) \
#define GUARDED_PROJECT(Structure, Arity, ...) \
CASE(GuardedProject, Structure, Arity) \
auto& rel = *static_cast<RelType*>(node->getRelation()); \
return evalGuardedProject(rel, shadow, ctxt); \
return evalGuardedProject(rel, shadow, ctxt); \
ESAC(GuardedProject)

FOR_EACH(GUARDED_PROJECT)
Expand Down
15 changes: 0 additions & 15 deletions tests/evaluation/choice_bipartite_matching/BipartiteMatchingCH.dl

This file was deleted.

106 changes: 0 additions & 106 deletions tests/evaluation/choice_bipartite_matching/BipartiteMatchingSO.dl

This file was deleted.

Loading

0 comments on commit cded5c9

Please sign in to comment.