3#include <clingo/control/context.hh>
4#include <clingo/control/parse.hh>
6#include <clingo/input/program.hh>
8#include <clingo/core/output.hh>
10namespace CppClingo::Control {
26 void join(Input::UnprocessedProgram const &prg);
30 auto
parse(std::span<std::string_view const> const &files, Ground::ScriptExec *code =
nullptr,
37 [[nodiscard]] auto
ground(ProgramParamVec const ¶ms, Ground::ScriptCallback *context =
nullptr) ->
bool;
44 void show(Input::SharedSig const &sig);
49 [[nodiscard]] auto
get_parts() -> std::optional<Input::StmParts> const &;
51 void set_parts(std::optional<Input::StmParts> parts);
53 [[nodiscard]] auto
base() -> Ground::Bases &;
55 [[nodiscard]] auto
base() const -> Ground::Bases const &;
65 std::unique_ptr<Impl> impl_;
A grounder for logic programs.
Definition grounder.hh:18
Grounder(Logger &log, SymbolStore &store, Input::RewriteOptions opts, OutputStm &out)
Create a grounder object.
void join(Input::UnprocessedProgram const &prg)
Join with the given program.
void output_unprocessed_program(std::ostream &out)
Output the current unprocessed program.
~Grounder() noexcept
Destroy grounder.
auto store() const -> SymbolStore &
Get the contained symbol store.
auto base() -> Ground::Bases &
Get the associated base.
void show(Input::SharedSig const &sig)
Show the given signature.
void mark_sig(Input::Sig const &sig)
Mark the given signature as defined.
void add_const(String name, Symbol value)
Define a constant.
void output_program(std::ostream &out)
Output the current program.
auto log() const -> Logger &
Get the contained symbol store.
auto const_map() -> Input::ConstMap const &
Get the const map.
auto get_parts() -> std::optional< Input::StmParts > const &
Get the program parts to ground.
void set_parts(std::optional< Input::StmParts > parts)
Set the program parts to ground.
Simple logger to report message to stderr or via a callback.
Definition logger.hh:63
Interface to output statements.
Definition output.hh:90
Abstract class connecting grounder and solver.
Definition backend.hh:54
Reference to a string stored in a symbol store.
Definition symbol.hh:18
A store for symbols.
Definition symbol.hh:454
Variant-like class to store symbols stored in a symbol store.
Definition symbol.hh:225
Abstract class connecting grounder and theory data.
Definition backend.hh:213
BuiltinIncludes
Bitset of enabled builtin includes.
Definition parse.hh:23
@ parse
Stop processing after parsing.
@ ground
Stop processing after grounding.