Clingo
Loading...
Searching...
No Matches
CppClingo::Ground::StateCondLitElem Struct Reference

Capture (the state of) an element of a conditional literal. More...

#include <condlit.hh>

Public Member Functions

 StateCondLitElem (size_t premise, bool premise_is_fact, bool has_conclusion)
 Initialize the element.
 
void set_conclusion (size_t conclusion, bool fact)
 Mark a previously unknown conclusion either as derived or fact.
 
auto is_fact () const -> bool
 Check if the element is true, i.e., its conclusion is true.
 
auto is_blocked () const -> bool
 Check if the element is blocked.
 
auto is_false () const
 Check if an element is false.
 
auto has_offset () const -> bool
 Check if the index of the element has already been set.
 
void set_offset (size_t offset)
 Set the index of the element.
 
auto offset () const -> size_t
 The index of the element in the vector of derived elements.
 
auto premise () const -> size_t
 Get the premise of the element.
 
auto conclusion () const -> std::optional< size_t >
 Get the conclusion index of the literal if there is one.
 

Detailed Description

Capture (the state of) an element of a conditional literal.

Member Function Documentation

◆ is_blocked()

auto CppClingo::Ground::StateCondLitElem::is_blocked ( ) const -> bool
inline

Check if the element is blocked.

An element is blocked if its premise is true and its conclusion is false or has not yet been derived.

◆ is_false()

auto CppClingo::Ground::StateCondLitElem::is_false ( ) const
inline

Check if an element is false.

An element is false if its premise is true and its conclusion false.

◆ offset()

auto CppClingo::Ground::StateCondLitElem::offset ( ) const -> size_t
inline

The index of the element in the vector of derived elements.

The index is set once an element is propagated and added to the set of derived elements


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