Show / Hide Table of Contents

Interface ISymbolModule

Working with (evaluated) ground terms and related functions.

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

Methods

| Improve this Doc View Source

CreateFunction(String, Symbol[], Boolean, out Symbol)

Construct a symbol representing a function or tuple.

Declaration
bool CreateFunction(string name, Symbol[] arguments, bool positive, out Symbol symbol)
Parameters
Type Name Description
System.String name

the name of the function

Symbol[] arguments

the arguments of the function

System.Boolean positive

whether the symbol has a classical negation sign

Symbol symbol

the resulting symbol

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

CreateId(String, Boolean, out Symbol)

Construct a symbol representing an id.

Declaration
bool CreateId(string name, bool positive, out Symbol symbol)
Parameters
Type Name Description
System.String name

the name

System.Boolean positive

whether the symbol has a classical negation sign

Symbol symbol

the resulting symbol

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

Remarks

This is just a shortcut for CreateFunction(String, Symbol[], Boolean, out Symbol) with empty arguments.

| Improve this Doc View Source

CreateInfimum(out Symbol)

Construct a symbol representing #inf.

Declaration
void CreateInfimum(out Symbol symbol)
Parameters
Type Name Description
Symbol symbol

the resulting symbol

| Improve this Doc View Source

CreateNumber(Int32, out Symbol)

Construct a symbol representing a number.

Declaration
void CreateNumber(int number, out Symbol symbol)
Parameters
Type Name Description
System.Int32 number

the number

Symbol symbol

the resulting symbol

| Improve this Doc View Source

CreateSignature(String, UInt32, Boolean, out Signature)

Create a new signature.

Declaration
bool CreateSignature(string name, uint arity, bool positive, out Signature signature)
Parameters
Type Name Description
System.String name

name of the signature

System.UInt32 arity

arity of the signature

System.Boolean positive

false if the signature has a classical negation sign

Signature signature

the resulting signature

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

CreateString(String, out Symbol)

Construct a symbol representing a string.

Declaration
bool CreateString(string value, out Symbol symbol)
Parameters
Type Name Description
System.String value

the string

Symbol symbol

the resulting symbol

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

CreateSupremum(out Symbol)

Construct a symbol representing #sup.

Declaration
void CreateSupremum(out Symbol symbol)
Parameters
Type Name Description
Symbol symbol

the resulting symbol

| Improve this Doc View Source

GetArguments(Symbol, out Symbol[])

Get the arguments of a symbol.

Declaration
bool GetArguments(Symbol symbol, out Symbol[] arguments)
Parameters
Type Name Description
Symbol symbol

the target symbol

Symbol[] arguments

the resulting arguments

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetArity(Signature)

Get the arity of a signature.

Declaration
uint GetArity(Signature signature)
Parameters
Type Name Description
Signature signature

the target signature

Returns
Type Description
System.UInt32

the arity of the signature

| Improve this Doc View Source

GetHash(Signature)

Calculate a hash code of a signature.

Declaration
UIntPtr GetHash(Signature signature)
Parameters
Type Name Description
Signature signature

the target signature

Returns
Type Description
System.UIntPtr

the hash code of the signature

| Improve this Doc View Source

GetHash(Symbol)

Calculate a hash code of a symbol.

Declaration
UIntPtr GetHash(Symbol symbol)
Parameters
Type Name Description
Symbol symbol

the target symbol

Returns
Type Description
System.UIntPtr

the hash code of the symbol

| Improve this Doc View Source

GetName(Signature)

Get the name of a signature.

Declaration
string GetName(Signature signature)
Parameters
Type Name Description
Signature signature

the target signature

Returns
Type Description
System.String

the name of the signature

| Improve this Doc View Source

GetName(Symbol, out String)

Get the name of a symbol.

Declaration
bool GetName(Symbol symbol, out string name)
Parameters
Type Name Description
Symbol symbol

the target symbol

System.String name

the resulting name

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetNumber(Symbol, out Int32)

Get the number of a symbol.

Declaration
bool GetNumber(Symbol symbol, out int number)
Parameters
Type Name Description
Symbol symbol

the target symbol

System.Int32 number

the resulting number

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetString(Symbol, out String)

Get the string of a symbol.

Declaration
bool GetString(Symbol symbol, out string value)
Parameters
Type Name Description
Symbol symbol

the target symbol

System.String value

the resulting string

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

GetType(Symbol)

Get the type of a symbol.

Declaration
SymbolType GetType(Symbol symbol)
Parameters
Type Name Description
Symbol symbol

the target symbol

Returns
Type Description
SymbolType

the type of the symbol

| Improve this Doc View Source

IsEqualTo(Signature, Signature)

Check if two signatures are equal.

Declaration
bool IsEqualTo(Signature signatureA, Signature signatureB)
Parameters
Type Name Description
Signature signatureA

first signature

Signature signatureB

second signature

Returns
Type Description
System.Boolean

whether a == b

| Improve this Doc View Source

IsEqualTo(Symbol, Symbol)

Check if two symbols are equal.

Declaration
bool IsEqualTo(Symbol symbolA, Symbol symbolB)
Parameters
Type Name Description
Symbol symbolA

first symbol

Symbol symbolB

second symbol

Returns
Type Description
System.Boolean

whether a == b

| Improve this Doc View Source

IsLessThan(Signature, Signature)

Declaration
bool IsLessThan(Signature signatureA, Signature signatureB)
Parameters
Type Name Description
Signature signatureA
Signature signatureB
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsLessThan(Symbol, Symbol)

Declaration
bool IsLessThan(Symbol symbolA, Symbol symbolB)
Parameters
Type Name Description
Symbol symbolA
Symbol symbolB
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsNegative(Signature)

Whether the signature is negative (is classically negated).

Declaration
bool IsNegative(Signature signature)
Parameters
Type Name Description
Signature signature

the target signature

Returns
Type Description
System.Boolean

whether the signature has a sign

| Improve this Doc View Source

IsNegative(Symbol, out Boolean)

Check if a function is negative (has a sign).

Declaration
bool IsNegative(Symbol symbol, out bool negative)
Parameters
Type Name Description
Symbol symbol

the target symbol

System.Boolean negative

the result

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

IsPositive(Signature)

Whether the signature is positive (is not classically negated).

Declaration
bool IsPositive(Signature signature)
Parameters
Type Name Description
Signature signature

the target signature

Returns
Type Description
System.Boolean

whether the signature has no sign

| Improve this Doc View Source

IsPositive(Symbol, out Boolean)

Check if a function is positive (does not have a sign).

Declaration
bool IsPositive(Symbol symbol, out bool positive)
Parameters
Type Name Description
Symbol symbol

the target symbol

System.Boolean positive

the result

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

| Improve this Doc View Source

ToString(Symbol, out String)

Get the string representation of a symbol.

Declaration
bool ToString(Symbol symbol, out string value)
Parameters
Type Name Description
Symbol symbol

the target symbol

System.String value

the resulting string

Returns
Type Description
System.Boolean

true if the function is success, false otherwise

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