C# Класс Prolog.KnowledgeBase

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

Открытые свойства

Свойство Тип Описание
ELRoot ELNode
GameObject UnityEngine.GameObject
Parent KnowledgeBase

Private Properties

Свойство Тип Описание
CallPrimitive IEnumerable
CheckForPredicateInfo PredicateInfo
CheckForPredicateInfoInThisKB PredicateInfo
CheckForPredicateInfoInThisKB PredicateInfo
Commafy Structure
Compile void
Consult void
DeclareExternal void
DeclareHigherOrderArguments void
DeclarePublic void
DeclareRandomizable void
DeclareShadow void
DeclareTraced void
DeclareUntraced void
DefaultExtension string
Disassemble void
EntryForStoring PredicateInfo
EntryListForStoring List
FindClauses IEnumerable
Forget void
GetPredicateInfo PredicateInfo
IsSourceFile bool
KnowledgeBase System
KnowledgeBase System
KnowledgeBase System
LoadCSVRow void
Prove IEnumerable
ProveFromDB IEnumerable
Reconsult void
Reconsult void
Reconsult void
ReconsultString void
ReloadModifiedSourceFiles void
Retract IEnumerable
Retract IEnumerable
SourceFor string
SourceFromPredicateInfo void
TermExpansion object

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

Метод Описание
Assert ( Structure structure, bool atEnd, bool checkSingletons ) : void

Add a term (fact or rule) to the KB.

Assert ( object term, bool atEnd, bool checkSingletons ) : void

Add a term (fact or rule) to the KB.

AssertA ( Structure structure ) : void

Add a term (fact or rule) to the KB.

AssertA ( object term ) : void

Add a term (fact or rule) to the KB.

AssertZ ( Structure structure ) : void

Add a term (fact or rule) to the KB.

AssertZ ( object term ) : void

Add a term (fact or rule) to the KB.

Clear ( ) : void

Erases the complete contents of the KB

Consult ( Stream stream ) : void

Load assertions into the KB

Consult ( string path ) : void

Load assertions into the KB

ConsultString ( string text ) : void

Load assertions into the KB

IsTrue ( object goal, object thisValue = null ) : bool

True if the specified goal is provable within this KnowledgeBase.

Prove ( Structure t ) : IEnumerable

Attempts to prove the specified goal. WARNING: THIS WILL LEAK A PROLOG CONTEXT UNLESS ENUMERATED TO COMPLETION.

RetractAll ( Structure head ) : void

Remove all terms matching head

RetractAll ( object term ) : void

Remove a term from the KB.

SolveFor ( LogicVariable result, object goal, object thisValue, bool throwOnFailure = true ) : object

True if the specified goal is provable within this KnowledgeBase.

ToString ( ) : string
Undefined ( Prolog.PredicateIndicator p ) : bool

True if the specified functor/arity is undefined.

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

Метод Описание
CallPrimitive ( Symbol functor, Prolog.PrologPrimitives handler, object args, PrologContext context ) : IEnumerable
CheckForPredicateInfo ( Prolog.PredicateIndicator p ) : PredicateInfo
CheckForPredicateInfoInThisKB ( Prolog.PredicateIndicator p ) : PredicateInfo
CheckForPredicateInfoInThisKB ( Symbol functor, int arity ) : PredicateInfo
Commafy ( Structure structures ) : Structure
Compile ( Prolog.PredicateIndicator p ) : void
Consult ( TextReader inStream ) : void
DeclareExternal ( Prolog.PredicateIndicator p ) : void
DeclareHigherOrderArguments ( Prolog.PredicateIndicator p, int arguments ) : void
DeclarePublic ( Prolog.PredicateIndicator p ) : void
DeclareRandomizable ( Prolog.PredicateIndicator p ) : void
DeclareShadow ( Prolog.PredicateIndicator p ) : void
DeclareTraced ( Prolog.PredicateIndicator p ) : void
DeclareUntraced ( Prolog.PredicateIndicator p ) : void
DefaultExtension ( string path, string extension ) : string
Disassemble ( Prolog.PredicateIndicator p ) : void
EntryForStoring ( Prolog.PredicateIndicator p ) : PredicateInfo
EntryListForStoring ( Prolog.PredicateIndicator p ) : List
FindClauses ( Structure head, object body ) : IEnumerable
Forget ( Prolog.PredicateIndicator p ) : void
GetPredicateInfo ( KnowledgeBase kb, Prolog.PredicateIndicator p ) : PredicateInfo
IsSourceFile ( string file ) : bool
KnowledgeBase ( ) : System
KnowledgeBase ( string kbName, GameObject gameObject ) : System
KnowledgeBase ( string kbName, GameObject gameObject, KnowledgeBase parent ) : System
LoadCSVRow ( int rowNumber, Structure row ) : void
Prove ( Symbol functor, object args, PrologContext context, ushort parentFrame ) : IEnumerable

Attempts to prove the specified goal.

ProveFromDB ( Symbol functor, object args, PrologContext context ) : IEnumerable
Reconsult ( Stream stream ) : void
Reconsult ( TextReader inStream ) : void
Reconsult ( string path ) : void
ReconsultString ( string text ) : void
ReloadModifiedSourceFiles ( ) : void
Retract ( Structure head, object body ) : IEnumerable
Retract ( object term ) : IEnumerable
SourceFor ( Prolog.PredicateIndicator p ) : string
SourceFromPredicateInfo ( Prolog.PredicateIndicator p, PredicateInfo predicateInfo, ISOPrologWriter writer ) : void
TermExpansion ( object unexpanded ) : object

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

Assert() публичный Метод

Add a term (fact or rule) to the KB.
public Assert ( Structure structure, bool atEnd, bool checkSingletons ) : void
structure Structure
atEnd bool
checkSingletons bool
Результат void

Assert() публичный Метод

Add a term (fact or rule) to the KB.
public Assert ( object term, bool atEnd, bool checkSingletons ) : void
term object
atEnd bool
checkSingletons bool
Результат void

AssertA() публичный Метод

Add a term (fact or rule) to the KB.
public AssertA ( Structure structure ) : void
structure Structure
Результат void

AssertA() публичный Метод

Add a term (fact or rule) to the KB.
public AssertA ( object term ) : void
term object
Результат void

AssertZ() публичный Метод

Add a term (fact or rule) to the KB.
public AssertZ ( Structure structure ) : void
structure Structure
Результат void

AssertZ() публичный Метод

Add a term (fact or rule) to the KB.
public AssertZ ( object term ) : void
term object
Результат void

Clear() публичный Метод

Erases the complete contents of the KB
public Clear ( ) : void
Результат void

Consult() публичный Метод

Load assertions into the KB
public Consult ( Stream stream ) : void
stream Stream
Результат void

Consult() публичный Метод

Load assertions into the KB
public Consult ( string path ) : void
path string
Результат void

ConsultString() публичный Метод

Load assertions into the KB
public ConsultString ( string text ) : void
text string
Результат void

IsTrue() публичный Метод

True if the specified goal is provable within this KnowledgeBase.
public IsTrue ( object goal, object thisValue = null ) : bool
goal object Goal to attempt to prove
thisValue object The value to give ot the $this indexical while running the goal
Результат bool

Prove() публичный Метод

Attempts to prove the specified goal. WARNING: THIS WILL LEAK A PROLOG CONTEXT UNLESS ENUMERATED TO COMPLETION.
public Prove ( Structure t ) : IEnumerable
t Structure
Результат IEnumerable

RetractAll() публичный Метод

Remove all terms matching head
public RetractAll ( Structure head ) : void
head Structure
Результат void

RetractAll() публичный Метод

Remove a term from the KB.
public RetractAll ( object term ) : void
term object
Результат void

SolveFor() публичный Метод

True if the specified goal is provable within this KnowledgeBase.
public SolveFor ( LogicVariable result, object goal, object thisValue, bool throwOnFailure = true ) : object
result LogicVariable Value of variable to return
goal object Goal to attempt to prove
thisValue object Value to give ot the indexical $this during execution
throwOnFailure bool If true, SolveFor will throw a GoalException if the goal fails
Результат object

ToString() публичный Метод

public ToString ( ) : string
Результат string

Undefined() публичный Метод

True if the specified functor/arity is undefined.
public Undefined ( Prolog.PredicateIndicator p ) : bool
p Prolog.PredicateIndicator
Результат bool

Описание свойств

ELRoot публичное свойство

public ELNode ELRoot
Результат ELNode

GameObject публичное свойство

public GameObject,UnityEngine GameObject
Результат UnityEngine.GameObject

Parent публичное свойство

public KnowledgeBase,Prolog Parent
Результат KnowledgeBase