souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
45 class ExecutionPlan :
public Node {
48 void setOrderFor(
int version, Own<ExecutionOrder> plan) {
49 plans[version] = std::move(plan);
53 std::map<int, const ExecutionOrder*>
getOrders()
const {
54 std::map<int, const ExecutionOrder*> result;
55 for (
auto& plan :
plans) {
56 result.insert(std::make_pair(plan.first, plan.second.get()));
64 for (
auto& plan :
plans) {
71 for (
auto& plan :
plans) {
72 plan.second =
map(std::move(plan.second));
77 std::vector<const Node*> childNodes;
78 for (
auto& plan :
plans) {
79 childNodes.push_back(plan.second.get());
85 void print(std::ostream& out)
const override {
89 [](std::ostream& os,
const auto& arg) { os << arg.first <<
":" << *arg.second; });
93 bool equal(
const Node& node)
const override {
100 std::map<int, Own<ExecutionOrder>>
plans;
void setOrderFor(int version, Own< ExecutionOrder > plan)
Set execution order for a given rule version.
bool equal(const Node &node) const override
Abstract equality check for two AST nodes.
std::map< int, Own< ExecutionOrder > > plans
Mapping versions of clauses to execution orders.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
An abstract class for manipulating AST Nodes by substitution.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
void print(std::ostream &out) const override
Output to a given output stream.
detail::joined_sequence< Iter, Printer > join(const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
Creates an object to be forwarded to some output stream for printing sequences of elements interspers...
bool equal_targets(const Container &a, const Container &b, const Comparator &comp)
A function testing whether two containers are equal with the given Comparator.
ExecutionPlan * clone() const override
Create a clone (i.e.
std::vector< const Node * > getChildNodes() const override
Obtain a list of all embedded AST child nodes.
Abstract class for syntactic elements in an input program.
std::map< int, const ExecutionOrder * > getOrders() const
Get orders.
const SrcLocation & getSrcLoc() const
Return source location of the Node.