C# Class Prolog.PredicateInfo

Mostrar archivo Open project: ianhorswill/UnityProlog Class Usage Examples

Public Methods

Method 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

Method 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 method

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.
return void

Compile() public method

Byte compiles all the rules in this predicate.
public Compile ( ) : void
return void

Disassemble() public method

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

FindClauses() public method

public FindClauses ( Structure head, object body ) : IEnumerable
head Structure
body object
return IEnumerable

PredicateInfo() public method

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

Retract() public method

public Retract ( Structure head, object body ) : IEnumerable
head Structure
body object
return IEnumerable

RetractAll() public method

public RetractAll ( Structure head ) : void
head Structure
return void

ToString() public method

public ToString ( ) : string
return string