|
Clingo
|
A grounder for logic programs. More...
#include <grounder.hh>
Public Member Functions | |
| Grounder (Logger &log, SymbolStore &store, Input::RewriteOptions opts, OutputStm &out) | |
| Create a grounder object. | |
| ~Grounder () noexcept | |
| Destroy grounder. | |
| void | join (Input::UnprocessedProgram const &prg) |
| Join with the given program. | |
| auto | parse (std::string_view str, Ground::ScriptExec *code=nullptr) -> BuiltinIncludes |
| Parse a program from the given string. | |
| auto | parse (std::span< std::string_view const > const &files, Ground::ScriptExec *code=nullptr, ProgramBackend *prg=nullptr, TheoryBackend *thy=nullptr) -> BuiltinIncludes |
| Parse the given files. | |
| void | add_const (String name, Symbol value) |
| Define a constant. | |
| auto | const_map () -> Input::ConstMap const & |
| Get the const map. | |
| auto | ground (ProgramParamVec const ¶ms, Ground::ScriptCallback *context=nullptr) -> bool |
| Ground the program. | |
| void | print_summary (bool final) |
| Print per step summaries. | |
| void | accept (Ground::ProfileNode::Visitor const &visit) const |
| Accept a visitor for the profile nodes. | |
| void | output_unprocessed_program (std::ostream &out) |
| Output the current unprocessed program. | |
| void | output_program (std::ostream &out) |
| Output the current program. | |
| void | show (Input::SharedSig const &sig) |
| Show the given signature. | |
| void | mark_sig (Input::Sig const &sig) |
| Mark the given signature as defined. | |
| 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. | |
| auto | base () -> Ground::Bases & |
| Get the associated base. | |
| auto | base () const -> Ground::Bases const & |
| Get the associated base. | |
| auto | store () const -> SymbolStore & |
| Get the contained symbol store. | |
| auto | log () const -> Logger & |
| Get the contained logger. | |
A grounder for logic programs.
Takes care of parsing, grounding, and output.