All Manuals > KnowledgeWorks and Prolog User Guide > 7 Reference Guide

infer Function

Summary

Runs the forward chaining inferencing engine.

Package

kw

Signature

infer &key contexts => cycle-count

Arguments
contexts
A list of context names, default to (default-context).
Values
cycle-count
An integer.
Description

The function infer runs the forward chaining inference engine in the current inferencing state, with contexts as the initial agenda. The first rules to fire will be from the first context listed in contexts until control is passed on.

The value returned as cycle-count is the total number of cycles executed (given in current-cycle).

Examples
(infer :contexts '(my-context another-context))
See also

current-cycle


KnowledgeWorks and Prolog User Guide (Unix version) - 01 Dec 2021 19:35:49