Show / Hide Table of Contents

Interface ISymbolicAtomsModule

Inspection of atoms occurring in ground logic programs

Namespace: ClingoSharp.CoreServices.Interfaces.Modules
Assembly: ClingoSharp.CoreServices.dll
Syntax
public interface ISymbolicAtomsModule : IClingoModule

Methods

| Improve this Doc View Source

Find(SymbolicAtoms, Symbol, out SymbolicAtomIterator)

Find a symbolic atom given its symbolic representation.

Declaration
bool Find(SymbolicAtoms atoms, Symbol symbol, out SymbolicAtomIterator iterator)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

Symbol symbol

the symbol to lookup

SymbolicAtomIterator iterator

iterator pointing to the symbolic atom or to the end of the sequence if no corresponding atom is found

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetBeginIterator(SymbolicAtoms, Signature, out SymbolicAtomIterator)

Get a forward iterator to the beginning of the sequence of all symbolic atoms optionally restricted to a given signature.

Declaration
bool GetBeginIterator(SymbolicAtoms atoms, Signature signature, out SymbolicAtomIterator iterator)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

Signature signature

optional signature

SymbolicAtomIterator iterator

the resulting iterator

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetEndIterator(SymbolicAtoms, out SymbolicAtomIterator)

Iterator pointing to the end of the sequence of symbolic atoms.

Declaration
bool GetEndIterator(SymbolicAtoms atoms, out SymbolicAtomIterator iterator)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

the resulting iterator

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetLiteral(SymbolicAtoms, SymbolicAtomIterator, out Literal)

Returns the (numeric) aspif literal corresponding to the given symbolic atom.

Such a literal can be mapped to a solver literal (see the Theory Propagation module) or be used in rules in aspif format (see the Program Building module).

Declaration
bool GetLiteral(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out Literal literal)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

iterator to the atom

Literal literal

the associated literal

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetNext(SymbolicAtoms, SymbolicAtomIterator, out SymbolicAtomIterator)

Get an iterator to the next element in the sequence of symbolic atoms.

Declaration
bool GetNext(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out SymbolicAtomIterator next)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

the current iterator

SymbolicAtomIterator next

the succeeding iterator

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetSignatures(SymbolicAtoms, out Signature[])

Get the predicate signatures occurring in a logic program.

Declaration
bool GetSignatures(SymbolicAtoms atoms, out Signature[] signatures)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

Signature[] signatures

the resulting signatures

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetSize(SymbolicAtoms, out UIntPtr)

Get the number of different atoms occurring in a logic program.

Declaration
bool GetSize(SymbolicAtoms atoms, out UIntPtr size)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

System.UIntPtr size

the number of atoms

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetSymbol(SymbolicAtoms, SymbolicAtomIterator, out Symbol)

Check whether an atom is external.

An atom is external if it has been defined using an external directive and has not been released or defined by a rule.

Declaration
bool GetSymbol(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out Symbol symbol)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

iterator to the atom

Symbol symbol

whether the atom is a external

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

IsExternal(SymbolicAtoms, SymbolicAtomIterator, out Boolean)

Get the symbolic representation of an atom.

Declaration
bool IsExternal(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool external)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

iterator to the atom

System.Boolean external

the resulting symbol

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

IsFact(SymbolicAtoms, SymbolicAtomIterator, out Boolean)

Check whether an atom is a fact.

Declaration
bool IsFact(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool fact)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

iterator to the atom

System.Boolean fact

whether the atom is a fact

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

Remarks

This does not determine if an atom is a cautious consequence. The grounding or solving component's simplifications can only detect this in some cases.

| Improve this Doc View Source

IsValid(SymbolicAtoms, SymbolicAtomIterator, out Boolean)

Check whether the given iterator points to some element with the sequence of symbolic atoms or to the end of the sequence.

Declaration
bool IsValid(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool valid)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iterator

the iterator

System.Boolean valid

whether the iterator points to some element within the sequence

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

IteratorIsEqualTo(SymbolicAtoms, SymbolicAtomIterator, SymbolicAtomIterator, out Boolean)

Check if two iterators point to the same element (or end of the sequence).

Declaration
bool IteratorIsEqualTo(SymbolicAtoms atoms, SymbolicAtomIterator iteratorA, SymbolicAtomIterator iteratorB, out bool equal)
Parameters
Type Name Description
SymbolicAtoms atoms

the target

SymbolicAtomIterator iteratorA

the first iterator

SymbolicAtomIterator iteratorB

the second iterator

System.Boolean equal

whether the two iterators are equal

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

  • Improve this Doc
  • View Source
Back to top Generated by DocFX