Class Symbol
Represents a gringo symbol.
This includes numbers, strings, functions (including constants with len(arguments) == 0
and tuples with len(name) == 0
), #inf
and #sup
.
Inheritance
System.Object
Symbol
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: ClingoSharp.dll
Syntax
public sealed class Symbol : IEquatable<Symbol>, IComparable<Symbol>
Constructors
|
Improve this Doc
View Source
Symbol(Symbol)
Declaration
public Symbol(Symbol clingoSymbol)
Parameters
Type |
Name |
Description |
Symbol |
clingoSymbol |
|
|
Improve this Doc
View Source
Symbol(List<Symbol>)
A shortcut for Symbol("", arguments)
.
Declaration
public Symbol(List<Symbol> arguments)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<Symbol> |
arguments |
The arguments in form of a list of symbols.
|
|
Improve this Doc
View Source
Symbol(Int32)
Construct a numeric symbol given a number.
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
value |
The given number
|
|
Improve this Doc
View Source
Symbol(String)
Construct a string symbol given a string.
Declaration
public Symbol(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
The given string
|
|
Improve this Doc
View Source
Symbol(String, List<Symbol>, Boolean)
Construct a function symbol.
Declaration
public Symbol(string name, List<Symbol> arguments = null, bool positive = true)
Parameters
Type |
Name |
Description |
System.String |
name |
The name of the function (empty for tuples)
|
System.Collections.Generic.List<Symbol> |
arguments |
The arguments in form of a list of symbols
|
System.Boolean |
positive |
The sign of the function (tuples must not have signs)
|
Properties
|
Improve this Doc
View Source
Arguments
The arguments of a function.
Declaration
public List<Symbol> Arguments { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<Symbol> |
|
|
Improve this Doc
View Source
Infimum
Represents a symbol of type Infimum
Declaration
public static Symbol Infimum { get; }
Property Value
|
Improve this Doc
View Source
IsNegative
The inverted sign of a function.
Declaration
public bool IsNegative { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsPositive
Declaration
public bool IsPositive { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Number
Declaration
public int Number { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
String
Declaration
public string String { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Supremum
Declaration
public static Symbol Supremum { get; }
Property Value
|
Improve this Doc
View Source
Type
Declaration
public SymbolType Type { get; }
Property Value
Methods
|
Improve this Doc
View Source
CompareTo(Symbol)
Declaration
public int CompareTo(Symbol other)
Parameters
Type |
Name |
Description |
Symbol |
other |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Equals(Symbol)
Declaration
public bool Equals(Symbol other)
Parameters
Type |
Name |
Description |
Symbol |
other |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
GetModule()
Gets the asociated API module in clingo
Declaration
public static IClingoModule GetModule()
Returns
|
Improve this Doc
View Source
GetSymbolModule()
Gets the symbol module in clingo
Declaration
public static ISymbolModule GetSymbolModule()
Returns
|
Improve this Doc
View Source
Match(String, Int32)
Check if this is a function symbol with the given signature.
Declaration
public bool Match(string name, int arity)
Parameters
Type |
Name |
Description |
System.String |
name |
The name of the function
|
System.Int32 |
arity |
The arity of the function
|
Returns
Type |
Description |
System.Boolean |
Whether the function matches
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Operators
|
Improve this Doc
View Source
Equality(Symbol, Symbol)
Declaration
public static bool operator ==(Symbol a, Symbol b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GreaterThan(Symbol, Symbol)
Declaration
public static bool operator>(Symbol a, Symbol b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GreaterThanOrEqual(Symbol, Symbol)
Declaration
public static bool operator >=(Symbol a, Symbol b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Implicit(Symbol to Symbol)
Declaration
public static implicit operator Symbol(Symbol clingoSymbol)
Parameters
Type |
Name |
Description |
Symbol |
clingoSymbol |
|
Returns
|
Improve this Doc
View Source
Implicit(Symbol to Symbol)
Declaration
public static implicit operator Symbol(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
Implicit(Int32 to Symbol)
Construct a numeric symbol given a number.
Declaration
public static implicit operator Symbol(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
The given number
|
Returns
|
Improve this Doc
View Source
Implicit(String to Symbol)
Construct a string symbol given a string.
Declaration
public static implicit operator Symbol(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
The given string
|
Returns
|
Improve this Doc
View Source
Inequality(Symbol, Symbol)
Declaration
public static bool operator !=(Symbol a, Symbol b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LessThan(Symbol, Symbol)
Declaration
public static bool operator <(Symbol a, Symbol b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LessThanOrEqual(Symbol, Symbol)
Declaration
public static bool operator <=(Symbol a, Symbol b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>
System.IComparable<T>