C# Класс Prolog.Term

Наследование: IComparable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddBinding void
AlphaConvertArglist object[]
CanonicalizeWithExplicitBindingList object
CompareKeys int
CopyInstantiation object
IsQuoteNeeded bool
MakeFailEnumerator IEnumerable
MakeSucceedEnumerator IEnumerable
PredicateIndicatorExpression Structure
PredicateIndicatorExpression Structure
Structurify Structure
ToEnumerator IEnumerable
TypeNumber int
Unifiable bool
Unifiable bool
Unify IEnumerable
Unify bool
UnifyAndReturnCutState IEnumerable
UnifyArrays IEnumerable
UnifyArrays bool
UnifyArrays0 IEnumerable
UnifyArrays1 IEnumerable
UnifyArrays10 IEnumerable
UnifyArrays2 IEnumerable
UnifyArrays3 IEnumerable
UnifyArrays4 IEnumerable
UnifyArrays5 IEnumerable
UnifyArrays6 IEnumerable
UnifyArrays7 IEnumerable
UnifyArrays8 IEnumerable
UnifyArrays9 IEnumerable
UnifyArraysFast IEnumerable
UnifyWithAtomicConstant IEnumerable
UnifyWithAtomicConstant bool
UnifyWithStructure IEnumerable
UnifyWithStructure bool
UnifyWithTerm IEnumerable
UnifyWithTerm bool
Write void
WriteAndPossiblyParenthesize void

Открытые методы

Метод Описание
Compare ( object term1, object term2 ) : int

Compares to prolog terms for purposes of sorting

CopyInstantiation ( object term ) : object

Recopy the term to replace bound variables with their values and alpha convert any unbound variables. This has the effect of removing interference between this term and the copy should one or the other have its bindings changed (either through unification or backtracking).

Deref ( object value ) : object

Returns value, unless it is a LogicVariable, in which case it returns the variable's value.

FindUninstantiatedVariable ( object term ) : LogicVariable

Returns first uninstantiated variable found in term.

Identical ( object a, object b ) : bool

True if the two objects are syntactically identical.

IsGround ( object term ) : bool

True if term contains no unbound variables

KeySort ( List terms, bool deleteDuplicates ) : void

Sorts arbitrary list of Prolog terms

KeySortPrologList ( object list, bool deleteDuplicates ) : object
Sort ( List terms, bool deleteDuplicates ) : void

Sorts arbitrary list of Prolog terms

SortPrologList ( object list, bool deleteDuplicates ) : object
ToStringInPrologFormat ( object value ) : string

Converts an arbitrary object to a string in Prolog format.

Приватные методы

Метод Описание
AddBinding ( LogicVariable lv, object value, List &vars, List &values ) : void
AlphaConvertArglist ( object argList, List oldVars, LogicVariable newVars, PrologContext context, bool evalIndexicals ) : object[]

Substitutes occurances of newVars for all occurances of oldVars in argList. Returns new array, if substitutions were made, the original array if not. Original array is not modified

CanonicalizeWithExplicitBindingList ( object value, List vars, List values ) : object

Perform substitutions from var/values, and dereference any variables

CompareKeys ( object o1, object o2 ) : int
CopyInstantiation ( object term, LogicVariable>.Dictionary subs ) : object
IsQuoteNeeded ( Symbol s ) : bool
MakeFailEnumerator ( ) : IEnumerable

An iterator that always fails.

MakeSucceedEnumerator ( ) : IEnumerable
PredicateIndicatorExpression ( Structure term ) : Structure
PredicateIndicatorExpression ( Symbol functor, int arity ) : Structure
Structurify ( object term, string errorMessage ) : Structure
ToEnumerator ( bool succeed ) : IEnumerable
TypeNumber ( object term ) : int
Unifiable ( object v1, object v2 ) : bool
Unifiable ( object v1, object v2, List &vars, List &values ) : bool

Determine if V1 and V2 can be unified, without actually unifying them. If they are unifiable, determine the substitions that would be necessary to unify them.

Unify ( object v1, object v2 ) : IEnumerable
Unify ( object v1, object v2, PrologContext context ) : bool
UnifyAndReturnCutState ( object v1, object v2 ) : IEnumerable
UnifyArrays ( object a1, object a2 ) : IEnumerable

Unifies two arrays of variable length

UnifyArrays ( object a1, object a2, PrologContext context ) : bool

Unifies arrays using trailing

UnifyArrays0 ( object a1, object a2 ) : IEnumerable
UnifyArrays1 ( object a1, object a2 ) : IEnumerable
UnifyArrays10 ( object a1, object a2 ) : IEnumerable
UnifyArrays2 ( object a1, object a2 ) : IEnumerable
UnifyArrays3 ( object a1, object a2 ) : IEnumerable
UnifyArrays4 ( object a1, object a2 ) : IEnumerable
UnifyArrays5 ( object a1, object a2 ) : IEnumerable
UnifyArrays6 ( object a1, object a2 ) : IEnumerable
UnifyArrays7 ( object a1, object a2 ) : IEnumerable
UnifyArrays8 ( object a1, object a2 ) : IEnumerable
UnifyArrays9 ( object a1, object a2 ) : IEnumerable
UnifyArraysFast ( object a1, object a2, PrologContext context ) : IEnumerable
UnifyWithAtomicConstant ( object value ) : IEnumerable
UnifyWithAtomicConstant ( object value, PrologContext context ) : bool
UnifyWithStructure ( Structure value ) : IEnumerable
UnifyWithStructure ( Structure value, PrologContext context ) : bool
UnifyWithTerm ( Term term ) : IEnumerable
UnifyWithTerm ( Term term, PrologContext context ) : bool
Write ( StringBuilder s, object term ) : void
WriteAndPossiblyParenthesize ( StringBuilder s, object o ) : void

Описание методов

Compare() публичный статический Метод

Compares to prolog terms for purposes of sorting
public static Compare ( object term1, object term2 ) : int
term1 object
term2 object
Результат int

CopyInstantiation() публичный статический Метод

Recopy the term to replace bound variables with their values and alpha convert any unbound variables. This has the effect of removing interference between this term and the copy should one or the other have its bindings changed (either through unification or backtracking).
public static CopyInstantiation ( object term ) : object
term object
Результат object

Deref() публичный статический Метод

Returns value, unless it is a LogicVariable, in which case it returns the variable's value.
public static Deref ( object value ) : object
value object
Результат object

FindUninstantiatedVariable() публичный статический Метод

Returns first uninstantiated variable found in term.
public static FindUninstantiatedVariable ( object term ) : LogicVariable
term object
Результат LogicVariable

Identical() публичный статический Метод

True if the two objects are syntactically identical.
public static Identical ( object a, object b ) : bool
a object
b object
Результат bool

IsGround() публичный статический Метод

True if term contains no unbound variables
public static IsGround ( object term ) : bool
term object
Результат bool

KeySort() публичный статический Метод

Sorts arbitrary list of Prolog terms
public static KeySort ( List terms, bool deleteDuplicates ) : void
terms List
deleteDuplicates bool
Результат void

KeySortPrologList() публичный статический Метод

public static KeySortPrologList ( object list, bool deleteDuplicates ) : object
list object
deleteDuplicates bool
Результат object

Sort() публичный статический Метод

Sorts arbitrary list of Prolog terms
public static Sort ( List terms, bool deleteDuplicates ) : void
terms List
deleteDuplicates bool
Результат void

SortPrologList() публичный статический Метод

public static SortPrologList ( object list, bool deleteDuplicates ) : object
list object
deleteDuplicates bool
Результат object

ToStringInPrologFormat() публичный статический Метод

Converts an arbitrary object to a string in Prolog format.
public static ToStringInPrologFormat ( object value ) : string
value object
Результат string