C# Class Prolog.PredicateInfo

Afficher le fichier Open project: ianhorswill/UnityProlog Class Usage Examples

Méthodes publiques

Méthode Description
Assert ( KnowledgeBaseRule assertion, bool atEnd ) : void

Adds a KnowledgeBaseRule to the predicate. NOT THREADSAFE!

Compile ( ) : void

Byte compiles all the rules in this predicate.

Disassemble ( ) : void

Prints to the console the disassembled bytecode for all rules in this predicate.

FindClauses ( Structure head, object body ) : IEnumerable
PredicateInfo ( Symbol functorName, int arity, KnowledgeBase kb ) : System

Creates a blank DB entry for the specified functor

Retract ( Structure head, object body ) : IEnumerable
RetractAll ( Structure head ) : void
ToString ( ) : string

Private Methods

Méthode Description
GetEntriesListForUpdate ( ) : List
Prove ( object args, PrologContext context ) : IEnumerable
StackCall ( PrologContext context ) : IEnumerable
TestClausesInOrder ( object args, PrologContext context, ushort myFrame ) : IEnumerable

Tests clauses in the order they appear in the database.

TestCompiledClauses ( PrologContext context ) : IEnumerable
TestShuffledClauses ( object args, PrologContext context, ushort myFrame ) : IEnumerable

Tests clauses in a randomized order (but still exhaustively). Uses Shuffler to generate a random permutation.

Method Details

Assert() public méthode

Adds a KnowledgeBaseRule to the predicate. NOT THREADSAFE!
public Assert ( KnowledgeBaseRule assertion, bool atEnd ) : void
assertion KnowledgeBaseRule The rule to add
atEnd bool If true, adds to be beginning, else the end.
Résultat void

Compile() public méthode

Byte compiles all the rules in this predicate.
public Compile ( ) : void
Résultat void

Disassemble() public méthode

Prints to the console the disassembled bytecode for all rules in this predicate.
public Disassemble ( ) : void
Résultat void

FindClauses() public méthode

public FindClauses ( Structure head, object body ) : IEnumerable
head Structure
body object
Résultat IEnumerable

PredicateInfo() public méthode

Creates a blank DB entry for the specified functor
public PredicateInfo ( Symbol functorName, int arity, KnowledgeBase kb ) : System
functorName Symbol
arity int
kb KnowledgeBase
Résultat System

Retract() public méthode

public Retract ( Structure head, object body ) : IEnumerable
head Structure
body object
Résultat IEnumerable

RetractAll() public méthode

public RetractAll ( Structure head ) : void
head Structure
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string