Documentation
¶
Index ¶
- Constants
- Variables
- func Eval(exp ast.Expr, env Env) (result []reflect.Value, err error)
- func EvalBinaryExpr(exp *ast.BinaryExpr, env map[string]interface{}) (result []reflect.Value, err error)
- func EvalCall(exp *ast.CallExpr, env Env) (result []reflect.Value, err error)
- func EvalFromString(s string, env Env) (result []reflect.Value, err error)
- func EvalIdent(exp *ast.Ident, env Env) (result []reflect.Value, err error)
- func RemoveWME(w *WME)
- type AlphaMemory
- type BetaMemory
- func (node BetaMemory) GetChildren() *list.List
- func (node BetaMemory) GetExecuteParam(s string) interface{}
- func (node BetaMemory) GetItems() *list.List
- func (node BetaMemory) GetNodeType() string
- func (node BetaMemory) GetParent() IReteNode
- func (node *BetaMemory) LeftActivation(t *Token, w *WME, b Env)
- func (node BetaMemory) PopToken() *Token
- func (node BetaMemory) RightActivation(w *WME)
- type ConstantTestNode
- type Env
- type Filter
- type FilterNode
- type Has
- type IReteNode
- type JoinNode
- type LHS
- type NccNode
- type NccPartnerNode
- func (node NccPartnerNode) GetChildren() *list.List
- func (node NccPartnerNode) GetItems() *list.List
- func (node NccPartnerNode) GetNodeType() string
- func (node NccPartnerNode) GetParent() IReteNode
- func (node NccPartnerNode) LeftActivation(t *Token, w *WME, b Env)
- func (node NccPartnerNode) RightActivation(w *WME)
- type NegativeJoinResult
- type NegativeNode
- func (node *NegativeNode) GetChildren() *list.List
- func (node NegativeNode) GetItems() *list.List
- func (node NegativeNode) GetNodeType() string
- func (node NegativeNode) GetParent() IReteNode
- func (node *NegativeNode) LeftActivation(t *Token, w *WME, b Env)
- func (node *NegativeNode) RightActivation(w *WME)
- type Network
- func (n *Network) AddObject(key string, obj interface{})
- func (n *Network) AddProduction(lhs LHS, rhs RHS) *BetaMemory
- func (n *Network) AddProductionFromXML(s string) (result []*BetaMemory, err error)
- func (n *Network) AddWME(w *WME)
- func (n *Network) ExecuteRules(env Env) (err error)
- func (n Network) GetObject(key string) interface{}
- func (n Network) GetObjects() Env
- func (n *Network) Halt()
- type Production
- type RHS
- type TestAtJoinNode
- type Token
- type WME
Constants ¶
View Source
const ( CLASS_NAME = iota IDENTIFIER ATTRIBUTE VALUE NO_TEST )
View Source
const ( BETA_MEMORY_NODE = "beta_memory" JOIN_NODE = "join_node" NEGATIVE_NODE = "negative_node" NCC_NODE = "ncc_node" NCC_PARTNER_NODE = "ncc_parter_node" FILTER_NODE = "filter_node" )
Variables ¶
View Source
var FIELDS = []int{CLASS_NAME, IDENTIFIER, ATTRIBUTE, VALUE}
Functions ¶
func EvalBinaryExpr ¶
Types ¶
type AlphaMemory ¶
type AlphaMemory struct {
// contains filtered or unexported fields
}
type BetaMemory ¶
type BetaMemory struct { RHS *RHS // contains filtered or unexported fields }
func (BetaMemory) GetChildren ¶
func (node BetaMemory) GetChildren() *list.List
func (BetaMemory) GetExecuteParam ¶
func (node BetaMemory) GetExecuteParam(s string) interface{}
func (BetaMemory) GetItems ¶
func (node BetaMemory) GetItems() *list.List
func (BetaMemory) GetNodeType ¶
func (node BetaMemory) GetNodeType() string
func (BetaMemory) GetParent ¶
func (node BetaMemory) GetParent() IReteNode
func (*BetaMemory) LeftActivation ¶
func (node *BetaMemory) LeftActivation(t *Token, w *WME, b Env)
func (BetaMemory) PopToken ¶
func (node BetaMemory) PopToken() *Token
func (BetaMemory) RightActivation ¶
func (node BetaMemory) RightActivation(w *WME)
type ConstantTestNode ¶
type ConstantTestNode struct {
// contains filtered or unexported fields
}
type FilterNode ¶
type FilterNode struct {
// contains filtered or unexported fields
}
func (FilterNode) GetChildren ¶
func (node FilterNode) GetChildren() *list.List
func (FilterNode) GetItems ¶
func (node FilterNode) GetItems() *list.List
func (FilterNode) GetNodeType ¶
func (node FilterNode) GetNodeType() string
func (FilterNode) GetParent ¶
func (node FilterNode) GetParent() IReteNode
func (*FilterNode) LeftActivation ¶
func (node *FilterNode) LeftActivation(t *Token, w *WME, b Env)
func (*FilterNode) RightActivation ¶
func (node *FilterNode) RightActivation(w *WME)
type JoinNode ¶
type JoinNode struct {
// contains filtered or unexported fields
}
func (JoinNode) GetChildren ¶
func (JoinNode) GetNodeType ¶
func (*JoinNode) RightActivation ¶
type LHS ¶
type LHS struct {
// contains filtered or unexported fields
}
func JSONParseLHS ¶
func NewNccRule ¶
func NewNccRule(items ...interface{}) LHS
func XMLParseLHS ¶
type NccNode ¶
type NccNode struct {
// contains filtered or unexported fields
}
func (NccNode) GetChildren ¶
func (NccNode) GetNodeType ¶
func (NccNode) RightActivation ¶
type NccPartnerNode ¶
type NccPartnerNode struct {
// contains filtered or unexported fields
}
func (NccPartnerNode) GetChildren ¶
func (node NccPartnerNode) GetChildren() *list.List
func (NccPartnerNode) GetItems ¶
func (node NccPartnerNode) GetItems() *list.List
func (NccPartnerNode) GetNodeType ¶
func (node NccPartnerNode) GetNodeType() string
func (NccPartnerNode) GetParent ¶
func (node NccPartnerNode) GetParent() IReteNode
func (NccPartnerNode) LeftActivation ¶
func (node NccPartnerNode) LeftActivation(t *Token, w *WME, b Env)
func (NccPartnerNode) RightActivation ¶
func (node NccPartnerNode) RightActivation(w *WME)
type NegativeJoinResult ¶
type NegativeJoinResult struct {
// contains filtered or unexported fields
}
type NegativeNode ¶
type NegativeNode struct {
// contains filtered or unexported fields
}
func (*NegativeNode) GetChildren ¶
func (node *NegativeNode) GetChildren() *list.List
func (NegativeNode) GetItems ¶
func (node NegativeNode) GetItems() *list.List
func (NegativeNode) GetNodeType ¶
func (node NegativeNode) GetNodeType() string
func (NegativeNode) GetParent ¶
func (node NegativeNode) GetParent() IReteNode
func (*NegativeNode) LeftActivation ¶
func (node *NegativeNode) LeftActivation(t *Token, w *WME, b Env)
func (*NegativeNode) RightActivation ¶
func (node *NegativeNode) RightActivation(w *WME)
type Network ¶
type Network struct { PNodes []*BetaMemory LogBuf *bytes.Buffer // contains filtered or unexported fields }
func NewNetwork ¶
func NewNetwork() *Network
func (*Network) AddProduction ¶
func (n *Network) AddProduction(lhs LHS, rhs RHS) *BetaMemory
func (*Network) AddProductionFromXML ¶
func (n *Network) AddProductionFromXML(s string) (result []*BetaMemory, err error)
func (*Network) ExecuteRules ¶
func (Network) GetObjects ¶
type Production ¶
type Production struct {
// contains filtered or unexported fields
}
func FromJSON ¶
func FromJSON(s string) (r []Production, err error)
func FromXML ¶
func FromXML(s string) (result []Production, err error)
type RHS ¶
type RHS struct { Extra map[string]interface{} // contains filtered or unexported fields }
type TestAtJoinNode ¶
type TestAtJoinNode struct {
// contains filtered or unexported fields
}
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) AllBinding ¶
func (*Token) GetBinding ¶
func (*Token) GetRHSParam ¶
Click to show internal directories.
Click to hide internal directories.