pulsatrix
Loading...
Searching...
No Matches
datalog_rule.hpp
Go to the documentation of this file.
1
7#pragma once
8
9#include <vector>
10
12
13namespace pulsatrix::datalog {
14
27class Rule {
28public:
34 Rule(Atom head, std::vector<Atom> body);
35
36 [[nodiscard]] const Atom& head() const { return head_; }
37 [[nodiscard]] const std::vector<Atom>& body() const { return body_; }
38
39private:
40 Atom head_;
41 std::vector<Atom> body_;
42};
43
44} // namespace pulsatrix::datalog
An atom is a predicate name applied to a tuple of Terms, e.g. edge(a, b) or ancestor(X,...
Definition datalog_atom.hpp:24
A rule: a head atom entailed whenever every body atom is simultaneously satisfiable under one consist...
Definition datalog_rule.hpp:27
Rule(Atom head, std::vector< Atom > body)
Constructs a rule.
const Atom & head() const
Definition datalog_rule.hpp:36
const std::vector< Atom > & body() const
Definition datalog_rule.hpp:37
A Datalog atom: a predicate name plus a tuple of terms, no function symbols. Phase 3 Mission 0 of cam...
Definition datalog_atom.hpp:14