souffle
2.0.2-371-g6315b36
ram
RelationStatement.h
Go to the documentation of this file.
1
/*
2
* Souffle - A Datalog Compiler
3
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved
4
* Licensed under the Universal Permissive License v 1.0 as shown at:
5
* - https://opensource.org/licenses/UPL
6
* - <souffle root>/licenses/SOUFFLE-UPL.txt
7
*/
8
9
/************************************************************************
10
*
11
* @file RelationStatement.h
12
*
13
***********************************************************************/
14
15
#pragma once
16
17
#include "
ram/Node.h
"
18
#include "
ram/Relation.h
"
19
#include "
ram/Statement.h
"
20
#include "
ram/utility/NodeMapper.h
"
21
#include "
souffle/utility/ContainerUtil.h
"
22
#include <cassert>
23
#include <memory>
24
#include <utility>
25
#include <vector>
26
27
namespace
souffle::ram
{
28
29
/**
30
* @class RelationStatement
31
* @brief RAM Statements with a single relation
32
*/
33
class
RelationStatement :
public
Statement {
34
public
:
35
RelationStatement
(std::string
rel
) :
relation
(
std
::move(
rel
)) {}
36
37
/** @brief Get RAM relation */
38
const
std::string&
getRelation
()
const
{
39
return
relation
;
40
}
41
42
protected
:
43
bool
equal
(
const
Node
& node)
const override
{
44
const
auto
& other =
static_cast<
const
RelationStatement
&
>
(node);
45
return
relation
== other.relation;
46
}
47
48
protected
:
49
/** Relation */
50
std::string
relation
;
51
};
52
53
}
// namespace souffle::ram
souffle::ram::RelationStatement::equal
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Definition:
RelationStatement.h:47
souffle::ram::RelationStatement::RelationStatement
RelationStatement(std::string rel)
Definition:
RelationStatement.h:39
souffle::ram::RelationStatement::relation
std::string relation
Relation.
Definition:
RelationStatement.h:54
souffle::ram::RelationStatement::getRelation
const std::string & getRelation() const
Get RAM relation.
Definition:
RelationStatement.h:42
souffle::ram
Definition:
AstToRamTranslator.h:54
souffle::ram::Node
Node is a superclass for all RAM IR classes.
Definition:
Node.h:42
NodeMapper.h
ContainerUtil.h
Relation.h
Node.h
std
Definition:
Brie.h:3053
Statement.h
souffle::ram::RelationStatement
RAM Statements with a single relation.
Definition:
RelationStatement.h:37
rel
void rel(size_t limit, bool showLimit=true)
Definition:
Tui.h:1086
Generated by
1.8.17