Clingo
Loading...
Searching...
No Matches
CppClingo::Input::Program Class Reference

A program consisting of parts. More...

#include <program.hh>

Public Member Functions

 Program (RewriteOptions opts)
 Initialize a program with a rewrite level.
 
void join (Logger &log, SymbolStore &store, UnprocessedProgram const &prg)
 Join with the given unprocessed program.
 
template<class F >
void visit_stms (SymbolStore &store, F fun) const
 Visit all the statements in the program.
 
auto meta_stms () -> StmVec const &
 Get the meta statements in the program.
 
auto analyze (SymbolStore &store, ProgramParamVec const &params, DependencyBuilder &bld) const -> bool
 Prepare the statements in a program for grounding.
 
void mark (SymbolCollector &gc) const
 Mark symbols occurring in the program.
 
void check (Logger &log)
 Check program and emit diagnostics.
 
auto theory_directives () const -> TheorySigVec
 Get a sorted vector of all signatures of theory directives in the program.
 
auto const_map () const -> ConstMap const &
 Get the constants in the program.
 
void mark_sig (Input::Sig const &sig)
 Mark the given signature as provided.
 
auto default_parts () -> std::optional< StmParts > &
 Get the default parts.
 

Detailed Description

A program consisting of parts.

Constructor & Destructor Documentation

◆ Program()

CppClingo::Input::Program::Program ( RewriteOptions  opts)
inline

Initialize a program with a rewrite level.

(The highest rewrite level has to be used for grounding.)

Member Function Documentation

◆ join()

void CppClingo::Input::Program::join ( Logger log,
SymbolStore store,
UnprocessedProgram const &  prg 
)

Join with the given unprocessed program.

If fresh const statements are added, they will be merged with the previous ones. However, they are only applied once to newly added statements.

◆ visit_stms()

template<class F >
void CppClingo::Input::Program::visit_stms ( SymbolStore store,
fun 
) const
inline

Visit all the statements in the program.

See the notes regarding const statements above.


The documentation for this class was generated from the following file: