Crate clingo [] [src]

Modules

ast

Functions and data structures to work with program ASTs.

Structs

Assignment

Represents a (partial) assignment of a particular solver.

AstStatement

Representation of a program statement.

Atom

Unsigned integer type used for aspif atoms.

Backend

Handle to the backend to add directives in aspif format.

ClingoError

Error from the clingo library.

Configuration

Handle for to the solver configuration.

ConfigurationType

Bitset describing the entries of the configuration.

Control

Control object holding grounding and solving state.

Error

The Error type, which can contain any failure.

Id

Unsigned integer type used in various places.

Literal

Signed integer type used for aspif and solver literals.

Location

Represents a source code location marking its beginnig and end.

Model

Represents a model.

Part

Struct used to specify the program parts that have to be grounded.

ProgramBuilder

Object to build non-ground programs.

PropagateControl

This object can be used to add clauses and propagate literals while solving.

PropagateInit

Object to initialize a user-defined propagator before each solving step.

ShowType

Bitset describing symbols in models.

Signature

Represents a predicate signature.

SolveControl

Object to add clauses during search.

SolveHandle

Search handle to a solve call.

SolveMode

Bitset describing solve modes.

SolveResult

Bitset that describes the result of a solve call.

Statistics

Handle for to the solver statistics.

Symbol

Represents a symbol.

SymbolicAtom

A symbolic atom in a program.

SymbolicAtoms

Container that stores symbolic atoms in a program -- the relevant Herbrand base gringo uses to instantiate programs.

SymbolicAtomsIterator

An iterator over symbolic atoms.

SymbolicLiteral

Represents a symbolic literal.

TheoryAtoms

Container that stores theory atoms, elements, and terms of a program.

TheoryAtomsIterator

Iterator over theory atoms.

WeightedLiteral

A Literal with an associated weight.

WrapperError

Error in the rust wrapper, like null pointers or failed calls to C functions.

Enums

ClauseType

Enumeration of clause types determining the lifetime of a clause.

ErrorType

Enumeration of clingo error types for ClingoError.

ExternalType

Enumeration of different external statements.

HeuristicType

Enumeration of different heuristic modifiers.

ModelType

Enumeration for the different model types.

PropagatorCheckMode

Supported check modes for propagators.

SolveEventType

Enumeration of solve events.

StatisticsType

Enumeration for entries of the statistics.

SymbolType

Enumeration of available symbol types.

TheoryTermType

Enumeration of theory term types.

TruthValue

Represents three-valued truth values.

Warning

Enumeration of warning codes.

Traits

AstStatementHandler
ExternalFunctionHandler
GroundProgramObserver
Logger
Propagator

An instance of this trait has to be registered with a solver to implement a custom propagator.

SolveEventHandler

Functions

add_string

Internalize a string.

parse_program

Parse the given program and return an abstract syntax tree for each statement via a callback.

parse_program_with_logger

Parse the given program and return an abstract syntax tree for each statement via a callback.

parse_term

Parse a term in string form.

parse_term_with_logger

Parse a term in string form.

set_error

Set an error code and message in the active thread.

version

Obtain the clingo version.