souffle  2.0.2-371-g6315b36
Literal.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 Literal.h
12  *
13  * Defines the literal class
14  *
15  ***********************************************************************/
16 
17 #pragma once
18 
19 #include "ast/Node.h"
20 
21 namespace souffle::ast {
22 
23 /**
24  * @class Literal
25  * @brief Defines an abstract class for literals in a horn clause.
26  *
27  * Literals can be atoms, binary relations, and negated atoms
28  * in the body and head of a clause.
29  */
30 class Literal : public Node {
31 public:
32  using Node::Node;
33 
34  Literal* clone() const override = 0;
35 };
36 
37 } // namespace souffle::ast
Node.h
souffle::ast::Node::Node
Node(SrcLocation loc={})
Definition: Node.h:42
souffle::ast::Literal::clone
Literal * clone() const override=0
Create a clone (i.e.
souffle::ast
Definition: Aggregator.h:35