From 04c7fad3d976d095120399557c30a9cb60d8e190 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 9 May 2024 13:15:11 +0000 Subject: [PATCH] build based on cccbc89 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index cc7b720..d49f500 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-07T12:40:49","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-09T13:15:08","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index ca91bab..6813436 100644 --- a/dev/index.html +++ b/dev/index.html @@ -20,4 +20,4 @@ "ab" "bc" "cd" - "de"

Backward Chaining

Rete currently provides limited support for backward chaining by using the BackwardFilterNode and BackwardExtremumNode node types.

There is not yet any facility to make it easier to integrate these nodes into the network. You will need to use the node constructors and connect to add them by hand.

Index

Glossary

Rete.AbstractMemoryNodeType

AbstractMemoryNode is the abstract supertype of all Rete memory nodes.

source
Rete.AbstractReteJoinNodeType

AbstractReteJoinNode is the abstract supertype of all Rete join nodes.

source
Rete.AbstractReteNodeType

AbstractReteNode is the abstract supertype of all Rete nodes.

source
Rete.BackwardChainingType

BackwardChaining is the abstract supertype for all backward chaining Rete nodes.

source
Rete.BackwardExtremumNodeType

BackwardExtremumNode(comparison, extractor, label)

When askced, provides one value: the fact with the most extreme value (based on comparison) of extractor applied to each input fact at the time askc was called.

source
Rete.BackwardFilterNodeType
 BackwardFilterNode(filter_function, label)

When askced, passes through from its inputs only those facts which satisfy predicate.

source
Rete.IsaMemoryNodeType

IsaMemoryNode is a type of memory node that only stores facts of the specified type. Facts of other types are ignored.

source
Rete.JoinNodeType

JoinNode implements a join operation between multiple streams of inputs. The first argiment of join_function is the JoinNode itself. The remaining arguments come from the input streams of the join node. join_function should call emit for each new fact it wants to assert.

source
Rete.ReteRootNodeType

ReteRootNode serves as the root node of a Rete network.

source
Rete.RuleType

Rule is an abstract supertype for all rules.

source
Rete.add_forward_triggerMethod
add_forward_trigger(n::JoinNode, from::AbstractReteNode)

adds from as a forward trigger of the JoinNode.

When a JoinNode receives a fact from one of its forward trigger inputs, it joins that input with all combinations of facts from other inputs and performs its join_function. Otherwise the JoinNode is not triggered.

source
Rete.askcFunction
askc(continuation, node)

Calls continuation on each fact available from node.

source
Rete.askcMethod
askc(continuation, root::ReteRootNode, t::Type)

calls continuation on every fact of the specified type (or its subtypes) that are stored in the network rooted at root.

Assumes all memory nodes are direct outputs of root.

source
Rete.collectingMethod
collecting(body)

runs body, passing it a continuation of one argument that collects the values it's called with. collecting returns those values.

source
Rete.connectMethod
connect(from, to)

makes to an output of from and from an input of to.

When to is a join node then a third parameter (a positive integer) identifies which parameter position from feed in to.

source
Rete.countingMethod
counting(body)

Runs body, passing it a continuation of one argument (which is ignored), that counts the number of times the continuation is called. One body is fnished, counting returns that count.

source
Rete.emitFunction
emit(node, fact)

Distribute's fact to each of node's outputs by calling receive on the output node and fact.

source
Rete.emitsMethod
emits(rule::Type)

Returns a Tuple of the types which rule is declared to emit.

source
Rete.ensure_IsaMemoryNodeMethod
ensure_IsaMemoryNode(root, typ::Type)::IsaTypeNode

Find the IsaMemoryNode for the specified type, or make one and add it to the network.

source
Rete.find_memory_for_typeMethod
find_memory_for_type(root, typ::Type)::UnionPNothing, IsaTypeNode}

If there's a memory node in the Rete represented by root that stores objects of the specified type then return it. Otherwise return nothing.

source
Rete.find_rootFunction
find_root(node)

Returs the root of the network of which node is a member.

source
Rete.inputsFunction
inputs(node)

Returns the inputs of node – those nodes which can send it facts.

source
Rete.installFunction
install(root::ReteRootNode, rule::Type)

Installs the rule or rule group into the Rete rooted at root.

source
Rete.is_forward_triggerMethod
is_forward_trigger(::JoinNode, from::AbstractReteNode)

returns true if from is a forward trigger input of the JoinNode.

source
Rete.kb_countsMethod
kb_counts(root::ReteRootNode)

Returns a Dict{Type, Int} of the number of facts of each type.

source
Rete.labelFunction
label(node)

Returns node's label.

source
Rete.outputsFunction
outputs(node)

Returns the outputs of node – those nodes to which it can send facts.

source
Rete.receiveFunction
receive(node, fact)

receive is how node is given a new fact.

An application calls receive on the root node to assert a new fact to the network.

source
Rete.walk_by_outputsMethod

walkbyoutputs(func, node::AbstractReteNode)

Walks the network rooted at `root', applying func to each node.

source
Rete.@ruleMacro
@rule Rulename(a::A_Type, b::B_Type, ...) begin ... end

Defines a rule named Rulename. A singleton type named Rulename will be defined to represent the rule. An install method is defined for that type which can be used to add the necessary nodes and connections to a Rete to implement the rule.

The default supertype of a rule struct is Rule. When it is desirable to group rules together, one can define an abstract type that is a type descendant of Rule and use that as a dotted prefix to RuleName. The RuleName in the @rule invocation is MyGroup.MyRule then the supertype of MyRule will be MyGroup, rather than Rule.

A rule can have arbitrarily many parameters. The parameter list can also include clauses with no variable name. Such clauses identify the types of facts that the rule might assert. Memory nodes for these types will be added to the Rete if not already present.

The first expression of the rule can be call-like expression of RULE_DECLARATION. Its "parameters" can be declarations of one of the forms

FORWARDTRIGGERS(argumentnames...)`

Only the inputs for the specified argument names will serve as forward triggers. For backward compatibility, if there is no RULE_DECLARATION expression then all inputs are forward triggers.

CUSTOM_INSTALL()`

No install method will be automatically generated. The developer must implement an install method for this rule.

source
+ "de"

Backward Chaining

Rete currently provides limited support for backward chaining by using the BackwardFilterNode and BackwardExtremumNode node types.

There is not yet any facility to make it easier to integrate these nodes into the network. You will need to use the node constructors and connect to add them by hand.

Index

Glossary

Rete.AbstractMemoryNodeType

AbstractMemoryNode is the abstract supertype of all Rete memory nodes.

source
Rete.AbstractReteJoinNodeType

AbstractReteJoinNode is the abstract supertype of all Rete join nodes.

source
Rete.AbstractReteNodeType

AbstractReteNode is the abstract supertype of all Rete nodes.

source
Rete.BackwardChainingType

BackwardChaining is the abstract supertype for all backward chaining Rete nodes.

source
Rete.BackwardExtremumNodeType

BackwardExtremumNode(comparison, extractor, label)

When askced, provides one value: the fact with the most extreme value (based on comparison) of extractor applied to each input fact at the time askc was called.

source
Rete.BackwardFilterNodeType
 BackwardFilterNode(filter_function, label)

When askced, passes through from its inputs only those facts which satisfy predicate.

source
Rete.IsaMemoryNodeType

IsaMemoryNode is a type of memory node that only stores facts of the specified type. Facts of other types are ignored.

source
Rete.JoinNodeType

JoinNode implements a join operation between multiple streams of inputs. The first argiment of join_function is the JoinNode itself. The remaining arguments come from the input streams of the join node. join_function should call emit for each new fact it wants to assert.

source
Rete.ReteRootNodeType

ReteRootNode serves as the root node of a Rete network.

source
Rete.RuleType

Rule is an abstract supertype for all rules.

source
Rete.add_forward_triggerMethod
add_forward_trigger(n::JoinNode, from::AbstractReteNode)

adds from as a forward trigger of the JoinNode.

When a JoinNode receives a fact from one of its forward trigger inputs, it joins that input with all combinations of facts from other inputs and performs its join_function. Otherwise the JoinNode is not triggered.

source
Rete.askcFunction
askc(continuation, node)

Calls continuation on each fact available from node.

source
Rete.askcMethod
askc(continuation, root::ReteRootNode, t::Type)

calls continuation on every fact of the specified type (or its subtypes) that are stored in the network rooted at root.

Assumes all memory nodes are direct outputs of root.

source
Rete.collectingMethod
collecting(body)

runs body, passing it a continuation of one argument that collects the values it's called with. collecting returns those values.

source
Rete.connectMethod
connect(from, to)

makes to an output of from and from an input of to.

When to is a join node then a third parameter (a positive integer) identifies which parameter position from feed in to.

source
Rete.countingMethod
counting(body)

Runs body, passing it a continuation of one argument (which is ignored), that counts the number of times the continuation is called. One body is fnished, counting returns that count.

source
Rete.emitFunction
emit(node, fact)

Distribute's fact to each of node's outputs by calling receive on the output node and fact.

source
Rete.emitsMethod
emits(rule::Type)

Returns a Tuple of the types which rule is declared to emit.

source
Rete.ensure_IsaMemoryNodeMethod
ensure_IsaMemoryNode(root, typ::Type)::IsaTypeNode

Find the IsaMemoryNode for the specified type, or make one and add it to the network.

source
Rete.find_memory_for_typeMethod
find_memory_for_type(root, typ::Type)::UnionPNothing, IsaTypeNode}

If there's a memory node in the Rete represented by root that stores objects of the specified type then return it. Otherwise return nothing.

source
Rete.find_rootFunction
find_root(node)

Returs the root of the network of which node is a member.

source
Rete.inputsFunction
inputs(node)

Returns the inputs of node – those nodes which can send it facts.

source
Rete.installFunction
install(root::ReteRootNode, rule::Type)

Installs the rule or rule group into the Rete rooted at root.

source
Rete.is_forward_triggerMethod
is_forward_trigger(::JoinNode, from::AbstractReteNode)

returns true if from is a forward trigger input of the JoinNode.

source
Rete.kb_countsMethod
kb_counts(root::ReteRootNode)

Returns a Dict{Type, Int} of the number of facts of each type.

source
Rete.labelFunction
label(node)

Returns node's label.

source
Rete.outputsFunction
outputs(node)

Returns the outputs of node – those nodes to which it can send facts.

source
Rete.receiveFunction
receive(node, fact)

receive is how node is given a new fact.

An application calls receive on the root node to assert a new fact to the network.

source
Rete.walk_by_outputsMethod

walkbyoutputs(func, node::AbstractReteNode)

Walks the network rooted at `root', applying func to each node.

source
Rete.@ruleMacro
@rule Rulename(a::A_Type, b::B_Type, ...) begin ... end

Defines a rule named Rulename. A singleton type named Rulename will be defined to represent the rule. An install method is defined for that type which can be used to add the necessary nodes and connections to a Rete to implement the rule.

The default supertype of a rule struct is Rule. When it is desirable to group rules together, one can define an abstract type that is a type descendant of Rule and use that as a dotted prefix to RuleName. The RuleName in the @rule invocation is MyGroup.MyRule then the supertype of MyRule will be MyGroup, rather than Rule.

A rule can have arbitrarily many parameters. The parameter list can also include clauses with no variable name. Such clauses identify the types of facts that the rule might assert. Memory nodes for these types will be added to the Rete if not already present.

The first expression of the rule can be call-like expression of RULE_DECLARATION. Its "parameters" can be declarations of one of the forms

FORWARDTRIGGERS(argumentnames...)`

Only the inputs for the specified argument names will serve as forward triggers. For backward compatibility, if there is no RULE_DECLARATION expression then all inputs are forward triggers.

CUSTOM_INSTALL()`

No install method will be automatically generated. The developer must implement an install method for this rule.

source