Clingo
Loading...
Searching...
No Matches
CppClingo::Ground::IsMatch Concept Reference

Concept for matchable expressions. More...

#include <matcher.hh>

Concept definition

template<class Match>
concept CppClingo::Ground::IsMatch = requires(Match const &m) {
{ m.vars() } -> std::same_as<VariableSet>;
m.match(std::declval<EvalContext const &>(), std::declval<typename Match::Key>());
m.eval(std::declval<EvalContext const &>());
m.signature(std::declval<VariableSet const &>(), std::declval<VariableSet const &>());
std::declval<std::ostream &>() << m;
}
Concept for matchable expressions.
Definition matcher.hh:48

Detailed Description

Concept for matchable expressions.

A match must support the following:

  • a vars function to get all variables in the expression,
  • a match function to match a ground expression and an assignment,
  • an eval function returning an optional ground expression given an assignment,
  • a signature function to obtain a signature grouping compatible expressions,
  • the match must be printable.