Show / Hide Table of Contents

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
Implements
System.IEquatable<Symbol>
System.IComparable<Symbol>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: ClingoSharp
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
public Symbol(int value)
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
Type Description
Symbol
| 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

The sign of a function.

Declaration
public bool IsPositive { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Name

The name of a function.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Number

The value of a number.

Declaration
public int Number { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

String

The value of a string.

Declaration
public string String { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Supremum

Represents a symbol of type Supremum

Declaration
public static Symbol Supremum { get; }
Property Value
Type Description
Symbol
| Improve this Doc View Source

Type

The type of the symbol.

Declaration
public SymbolType Type { get; }
Property Value
Type Description
SymbolType

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
Type Description
IClingoModule

The asociated module

| Improve this Doc View Source

GetSymbolModule()

Gets the symbol module in clingo

Declaration
public static ISymbolModule GetSymbolModule()
Returns
Type Description
ISymbolModule

The symbol module

| 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
Type Name Description
Symbol a
Symbol b
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GreaterThan(Symbol, Symbol)

Declaration
public static bool operator>(Symbol a, Symbol b)
Parameters
Type Name Description
Symbol a
Symbol b
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GreaterThanOrEqual(Symbol, Symbol)

Declaration
public static bool operator >=(Symbol a, Symbol b)
Parameters
Type Name Description
Symbol a
Symbol b
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
Type Description
Symbol
| Improve this Doc View Source

Implicit(Symbol to Symbol)

Declaration
public static implicit operator Symbol(Symbol symbol)
Parameters
Type Name Description
Symbol symbol
Returns
Type Description
Symbol
| 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
Type Description
Symbol
| 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
Type Description
Symbol
| Improve this Doc View Source

Inequality(Symbol, Symbol)

Declaration
public static bool operator !=(Symbol a, Symbol b)
Parameters
Type Name Description
Symbol a
Symbol b
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LessThan(Symbol, Symbol)

Declaration
public static bool operator <(Symbol a, Symbol b)
Parameters
Type Name Description
Symbol a
Symbol b
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LessThanOrEqual(Symbol, Symbol)

Declaration
public static bool operator <=(Symbol a, Symbol b)
Parameters
Type Name Description
Symbol a
Symbol b
Returns
Type Description
System.Boolean

Implements

System.IEquatable<T>
System.IComparable<T>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX