rete

package
v0.0.0-...-754a2cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReteCallback

func NewReteCallback(rs *ReteSession, vertex int, s, p, o *rdf.Node) rdf.NotificationCallback

func NewReteCallbackForFilter

func NewReteCallbackForFilter(rs *ReteSession, vertex int, p *rdf.Node) rdf.NotificationCallback

Types

type AbsOp

type AbsOp struct {
}

ABS unary operator

func (*AbsOp) Eval

func (op *AbsOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*AbsOp) InitializeOperator

func (op *AbsOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*AbsOp) RegisterCallback

func (op *AbsOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type AddOp

type AddOp struct {
}

Add operator

func (*AddOp) Eval

func (op *AddOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*AddOp) InitializeOperator

func (op *AddOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*AddOp) RegisterCallback

func (op *AddOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type AgeAsOfOp

type AgeAsOfOp struct {
}

AGE_AS_OF operator Calculate the age (in years), typical use: (dob age_as_of serviceDate) where dob and serviceDate are date or datetime literals

func (*AgeAsOfOp) Eval

func (op *AgeAsOfOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*AgeAsOfOp) InitializeOperator

func (op *AgeAsOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*AgeAsOfOp) RegisterCallback

func (op *AgeAsOfOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type AgeMonthsAsOfOp

type AgeMonthsAsOfOp struct {
}

AGE_IN_MONTHS_AS_OF operator Calculate the age (in months), typical use: (dob age_as_of serviceDate) where dob and serviceDate are date or datetime literals

func (*AgeMonthsAsOfOp) Eval

func (op *AgeMonthsAsOfOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*AgeMonthsAsOfOp) InitializeOperator

func (op *AgeMonthsAsOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*AgeMonthsAsOfOp) RegisterCallback

func (op *AgeMonthsAsOfOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type AlphaFunctor

type AlphaFunctor interface {
	InitializeExpression(reteSession *ReteSession) error
	StaticValue() *rdf.Node
	Eval(*ReteSession, *BetaRow) *rdf.Node
	BetaRowIndex() int
}

AlphaFunctor is the common interface shared by the Fu, Fv, and Fw functors parametrizing the AlphaNodes. The methods of the interface are:

  • StaticValue (aka to_const) is used to determine the AlphaNode::register callback function
  • Eval (aka to_AllOrRIndex) to evaluate functor
  • for antecedent term (to invoke find on the rdf_session), returns nil (case variable) or *rdf.Node (case binded var or cst)
  • for consequent and filter terms, returns *rdf.Node (case binded var or cst)
  • BetaRowIndex (aka to_AVQ) Manage beta_row indexes in beta_relation according to the functors template arguments

type AlphaNode

type AlphaNode struct {
	Fu              AlphaFunctor
	Fv              AlphaFunctor
	Fw              AlphaFunctor
	NdVertex        *NodeVertex
	IsHeadNode      bool
	IsAntecedent    bool
	IsConsequent    bool
	NormalizedLabel string
}

AphaNode is a connector to the rdf graph for a antecedents and consequents term.

func NewAlphaNode

func NewAlphaNode(fu, fv, fw AlphaFunctor, vertex *NodeVertex, isAntecedent bool, label string) *AlphaNode

func NewRootAlphaNode

func NewRootAlphaNode(vertex *NodeVertex) *AlphaNode

func (*AlphaNode) AddIndex4BetaRow

func (an *AlphaNode) AddIndex4BetaRow(parentBetaRelation *BetaRelation, row *BetaRow)

func (*AlphaNode) ComputeConsequentTriple

func (an *AlphaNode) ComputeConsequentTriple(rs *ReteSession, row *BetaRow) *rdf.Triple

Return consequent `triple` for BetaRow Applicable to consequent terms only, will panic if called on an antecedent term

func (*AlphaNode) EraseIndex4BetaRow

func (an *AlphaNode) EraseIndex4BetaRow(parentBetaRelation *BetaRelation, row *BetaRow)

func (*AlphaNode) FindMatchingRows

func (an *AlphaNode) FindMatchingRows(parentBetaRelation *BetaRelation, s, p, o *rdf.Node) map[*BetaRow]bool

Called to query rows from parent beta node matching (s, p, o), case merging with new triples from inferred graph Applicable to antecedent terms only, will panic otherwise

func (*AlphaNode) FindMatchingTriples

func (an *AlphaNode) FindMatchingTriples(rs *ReteSession, parentRow *BetaRow) *rdf.RdfSessionIterator

*

  • @brief Get all triples from rdf session matching `parent_row` *
  • Invoking the functors to_AllOrRIndex methods, case:
  • - F_cst: return the rdf resource of the functor (constant value)
  • - F_binded: return the binded rdf resource from parent_row @ index of the functor.
  • - F_var: return 'any' (StarMatch) to indicate a unbinded variable *
  • Applicable to antecedent terms only, call during initial graph visit only
  • Will throw if called on a consequent term
  • @param rdf_session
  • @param parent_row
  • @return AlphaNode::Iterator = rdf::RDFSession::Iterator
  • from c++ implementation

func (*AlphaNode) InitializeIndexes

func (an *AlphaNode) InitializeIndexes(parentBetaRelation *BetaRelation)

func (*AlphaNode) RegisterCallback

func (an *AlphaNode) RegisterCallback(rs *ReteSession)

type AndOp

type AndOp struct {
}

AND operator

func (*AndOp) Eval

func (op *AndOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*AndOp) InitializeOperator

func (op *AndOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*AndOp) RegisterCallback

func (op *AndOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ApplyFormatOp

type ApplyFormatOp struct {
}

APPLY_FORMAT operator

func (*ApplyFormatOp) Eval

func (op *ApplyFormatOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*ApplyFormatOp) InitializeOperator

func (op *ApplyFormatOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*ApplyFormatOp) RegisterCallback

func (op *ApplyFormatOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ApplyRegexOp

type ApplyRegexOp struct {
}

APPLY_REGEX operator

func (*ApplyRegexOp) Eval

func (op *ApplyRegexOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*ApplyRegexOp) InitializeOperator

func (op *ApplyRegexOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*ApplyRegexOp) RegisterCallback

func (op *ApplyRegexOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type BetaRelation

type BetaRelation struct {
	NdVertex    *NodeVertex
	IsActivated bool
	AllRows     *BetaRowSet
	// contains filtered or unexported fields
}

func NewBetaRelation

func NewBetaRelation(nv *NodeVertex) *BetaRelation

Create and initialize a BetaRelation

func (*BetaRelation) AddIndex1

func (br *BetaRelation) AddIndex1(key int, u *rdf.Node, row *BetaRow)

func (*BetaRelation) AddIndex2

func (br *BetaRelation) AddIndex2(key int, u, v *rdf.Node, row *BetaRow)

func (*BetaRelation) AddIndex3

func (br *BetaRelation) AddIndex3(key int, u, v, w *rdf.Node, row *BetaRow)

func (*BetaRelation) AddQuery1

func (br *BetaRelation) AddQuery1() int

func (*BetaRelation) AddQuery2

func (br *BetaRelation) AddQuery2() int

func (*BetaRelation) AddQuery3

func (br *BetaRelation) AddQuery3() int

func (*BetaRelation) ClearPendingRows

func (br *BetaRelation) ClearPendingRows()

func (*BetaRelation) EraseIndex1

func (br *BetaRelation) EraseIndex1(key int, u *rdf.Node, row *BetaRow)

func (*BetaRelation) EraseIndex2

func (br *BetaRelation) EraseIndex2(key int, u, v *rdf.Node, row *BetaRow)

func (*BetaRelation) EraseIndex3

func (br *BetaRelation) EraseIndex3(key int, u, v, w *rdf.Node, row *BetaRow)

func (*BetaRelation) FindMatchingRows1

func (br *BetaRelation) FindMatchingRows1(key int, u *rdf.Node) map[*BetaRow]bool

func (*BetaRelation) FindMatchingRows2

func (br *BetaRelation) FindMatchingRows2(key int, u, v *rdf.Node) map[*BetaRow]bool

func (*BetaRelation) FindMatchingRows3

func (br *BetaRelation) FindMatchingRows3(key int, u, v, w *rdf.Node) map[*BetaRow]bool

func (*BetaRelation) HasPendingRows

func (br *BetaRelation) HasPendingRows() bool

func (*BetaRelation) InsertBetaRow

func (br *BetaRelation) InsertBetaRow(rs *ReteSession, row *BetaRow)

func (*BetaRelation) RemoveBetaRow

func (br *BetaRelation) RemoveBetaRow(rs *ReteSession, row *BetaRow)

func (*BetaRelation) RemoveIndexesForBetaRow

func (br *BetaRelation) RemoveIndexesForBetaRow(row *BetaRow)

remove the indexes associated with the beta row

type BetaRow

type BetaRow struct {
	NdVertex *NodeVertex
	Status   BetaRowStatus
	Data     []*rdf.Node
	// contains filtered or unexported fields
}

func NewBetaRow

func NewBetaRow(vertex *NodeVertex, size int) *BetaRow

func (*BetaRow) Eq

func (lhs *BetaRow) Eq(rhs *BetaRow) bool

func (*BetaRow) Get

func (row *BetaRow) Get(i int) *rdf.Node

func (*BetaRow) Hash

func (row *BetaRow) Hash() uint64

func (*BetaRow) Initialize

func (row *BetaRow) Initialize(initializer *BetaRowInitializer, parentRow *BetaRow, t3 *rdf.Triple) error

func (*BetaRow) IsDeleted

func (row *BetaRow) IsDeleted() bool

func (*BetaRow) IsInserted

func (row *BetaRow) IsInserted() bool

func (*BetaRow) IsProcessed

func (row *BetaRow) IsProcessed() bool

type BetaRowIndex1

type BetaRowIndex1 = map[*rdf.Node]map[*BetaRow]bool

type BetaRowIndex2

type BetaRowIndex2 = map[[2]*rdf.Node]map[*BetaRow]bool

type BetaRowIndex3

type BetaRowIndex3 = map[[3]*rdf.Node]map[*BetaRow]bool

type BetaRowInitializer

type BetaRowInitializer struct {
	InitData []int
	Labels   []string
}

func NewBetaRowInitializer

func NewBetaRowInitializer(data []int, labels []string) *BetaRowInitializer

func (*BetaRowInitializer) RowSize

func (b *BetaRowInitializer) RowSize() int

type BetaRowIterator

type BetaRowIterator interface {
	IsEnd() bool
	GetRow() *BetaRow
	Next() *BetaRow
	Reset()
}

BetaRowIterator methods:

IsEnd() return true when the end of the iterator is reached
GetRow() return the row for the current iterator position
Next() advance the iterator to the next position, return the next *BetaRow or nil
Reset() resets the iterator at the beginning so it can iterate again

func NewBetaRowSetIterator

func NewBetaRowSetIterator(set *BetaRowSet) BetaRowIterator

func NewBetaRowSliceIterator

func NewBetaRowSliceIterator(slice []*BetaRow) BetaRowIterator

type BetaRowPriorityQueue

type BetaRowPriorityQueue []*BetaRow

Priority queue that implements the heap.Interface

func (*BetaRowPriorityQueue) Len

func (pq *BetaRowPriorityQueue) Len() int

implementing the heap.Interface

func (*BetaRowPriorityQueue) Less

func (pq *BetaRowPriorityQueue) Less(i, j int) bool

func (*BetaRowPriorityQueue) Pop

func (pq *BetaRowPriorityQueue) Pop() any

func (*BetaRowPriorityQueue) Push

func (pq *BetaRowPriorityQueue) Push(x any)

func (*BetaRowPriorityQueue) Swap

func (pq *BetaRowPriorityQueue) Swap(i, j int)

type BetaRowSet

type BetaRowSet struct {
	// contains filtered or unexported fields
}

func NewBetaRowSet

func NewBetaRowSet() *BetaRowSet

func (*BetaRowSet) Erase

func (s *BetaRowSet) Erase(row *BetaRow) *BetaRow

Erase the row from the set, return the row that was in the set, if any otherwise nil

func (*BetaRowSet) Get

func (s *BetaRowSet) Get(row *BetaRow) *BetaRow

Get the row from the set, return the row that is in the set, if any otherwise nil

func (*BetaRowSet) Put

func (s *BetaRowSet) Put(row *BetaRow) (bool, *BetaRow)

func (*BetaRowSet) Size

func (s *BetaRowSet) Size() int

type BetaRowSetIterator

type BetaRowSetIterator struct {
	// contains filtered or unexported fields
}

BetaRowIterator over the whole set of beta rows

func (*BetaRowSetIterator) GetRow

func (itor *BetaRowSetIterator) GetRow() *BetaRow

func (*BetaRowSetIterator) IsEnd

func (itor *BetaRowSetIterator) IsEnd() bool

func (*BetaRowSetIterator) Next

func (itor *BetaRowSetIterator) Next() *BetaRow

func (*BetaRowSetIterator) Reset

func (itor *BetaRowSetIterator) Reset()

type BetaRowSliceIterator

type BetaRowSliceIterator struct {
	// contains filtered or unexported fields
}

BetaRow iterator over the slice of pending rows

func (*BetaRowSliceIterator) GetRow

func (itor *BetaRowSliceIterator) GetRow() *BetaRow

func (*BetaRowSliceIterator) IsEnd

func (itor *BetaRowSliceIterator) IsEnd() bool

func (*BetaRowSliceIterator) Next

func (itor *BetaRowSliceIterator) Next() *BetaRow

func (*BetaRowSliceIterator) Reset

func (itor *BetaRowSliceIterator) Reset()

type BetaRowStatus

type BetaRowStatus = int

type BetaVarNode

type BetaVarNode struct {
	Type           string `json:"type"`
	Id             string `json:"id"`
	IsBinded       bool   `json:"is_binded"`
	VarPos         int    `json:"var_pos"`
	Vertex         int    `json:"vertex"`
	SourceFileName string `json:"source_file_name"`
}

type BinaryOperator

type BinaryOperator interface {
	InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error
	RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error
	Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node
}

func NewAddOp

func NewAddOp() BinaryOperator

func NewAgeAsOfOp

func NewAgeAsOfOp() BinaryOperator

func NewAgeMonthsAsOfOp

func NewAgeMonthsAsOfOp() BinaryOperator

func NewAndOp

func NewAndOp() BinaryOperator

func NewApplyFormatOp

func NewApplyFormatOp() BinaryOperator

func NewApplyRegexOp

func NewApplyRegexOp() BinaryOperator

func NewCharAtOp

func NewCharAtOp() BinaryOperator

func NewContainsOp

func NewContainsOp() BinaryOperator

func NewDivOp

func NewDivOp() BinaryOperator

func NewEndsWithOp

func NewEndsWithOp() BinaryOperator

func NewEqOp

func NewEqOp() BinaryOperator

func NewExistOp

func NewExistOp(isExistNot bool) BinaryOperator

func NewGeOp

func NewGeOp() BinaryOperator

func NewGtOp

func NewGtOp() BinaryOperator

func NewLeOp

func NewLeOp() BinaryOperator

func NewLookupOp

func NewLookupOp() BinaryOperator

func NewLtOp

func NewLtOp() BinaryOperator

func NewMinMaxOp

func NewMinMaxOp(isMin, retObj bool) BinaryOperator

func NewMultOp

func NewMultOp() BinaryOperator

func NewMultiLookupOp

func NewMultiLookupOp() BinaryOperator

func NewNeOp

func NewNeOp() BinaryOperator

func NewOrOp

func NewOrOp() BinaryOperator

func NewRangeOp

func NewRangeOp() BinaryOperator

This operator is used as: (start_value range count) It returns an iterator, i.e. it returns the subject (a blank node) of a set of triples:

(subject, jets:range_value, value1)
(subject, jets:range_value, value2)
              . . .
(subject, jets:range_value, valueN)

Where value1..N is: for(i=0; i<count; i++) start_value + i; The values can be either int or double depending on the type of start_value.

func NewReplaceCharOp

func NewReplaceCharOp() BinaryOperator

func NewSizeOfOp

func NewSizeOfOp() BinaryOperator

func NewSortedHeadOp

func NewSortedHeadOp() BinaryOperator

func NewStartWithOp

func NewStartWithOp() BinaryOperator

func NewSubOp

func NewSubOp() BinaryOperator

func NewSubstringOfOp

func NewSubstringOfOp() BinaryOperator

func NewSumValuesOp

func NewSumValuesOp() BinaryOperator

type CharAtOp

type CharAtOp struct {
}

CHAR_AT operator

func (*CharAtOp) Eval

func (op *CharAtOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*CharAtOp) InitializeOperator

func (op *CharAtOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*CharAtOp) RegisterCallback

func (op *CharAtOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ClassNode

type ClassNode struct {
	Type           string             `json:"type"`
	Name           string             `json:"name"`
	BaseClasses    []string           `json:"base_classes"`
	DataProperties []DataPropertyNode `json:"data_properties"`
	SourceFileName string             `json:"source_file_name"`
	AsTable        bool               `json:"as_table"`
	SubClasses     []string           `json:"sub_classes"`
}

type ColumnSpec

type ColumnSpec struct {
	// contains filtered or unexported fields
}

type ContainsOp

type ContainsOp struct {
}

CONTAINS operator

func (*ContainsOp) Eval

func (op *ContainsOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*ContainsOp) InitializeOperator

func (op *ContainsOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*ContainsOp) RegisterCallback

func (op *ContainsOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type CreateEntityOp

type CreateEntityOp struct {
}

CREATE_ENTITY unary operator

func (*CreateEntityOp) Eval

func (op *CreateEntityOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*CreateEntityOp) InitializeOperator

func (op *CreateEntityOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*CreateEntityOp) RegisterCallback

func (op *CreateEntityOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type CreateLiteralOp

type CreateLiteralOp struct {
}

CREATE_LITERAL unary operator

func (*CreateLiteralOp) Eval

func (op *CreateLiteralOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*CreateLiteralOp) InitializeOperator

func (op *CreateLiteralOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*CreateLiteralOp) RegisterCallback

func (op *CreateLiteralOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type CreateResourceOp

type CreateResourceOp struct {
}

CREATE_RESOURCE unary operator

func (*CreateResourceOp) Eval

func (op *CreateResourceOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*CreateResourceOp) InitializeOperator

func (op *CreateResourceOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*CreateResourceOp) RegisterCallback

func (op *CreateResourceOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type CreateUuidResourceOp

type CreateUuidResourceOp struct {
}

CREATE_UUID_RESOURCE unary operator

func (*CreateUuidResourceOp) Eval

func (op *CreateUuidResourceOp) Eval(reteSession *ReteSession, _ *BetaRow, _ *rdf.Node) *rdf.Node

func (*CreateUuidResourceOp) InitializeOperator

func (op *CreateUuidResourceOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*CreateUuidResourceOp) RegisterCallback

func (op *CreateUuidResourceOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type DataPropertyNode

type DataPropertyNode struct {
	Type           string `json:"type"`
	DomainClassKey int    `json:"domain_class_key"`
	Name           string `json:"name"`
	AsArray        bool   `json:"as_array"`
}

type DayPeriodOfOp

type DayPeriodOfOp struct {
}

MonthPeriodOf unary operator

func (*DayPeriodOfOp) Eval

func (op *DayPeriodOfOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*DayPeriodOfOp) InitializeOperator

func (op *DayPeriodOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*DayPeriodOfOp) RegisterCallback

func (op *DayPeriodOfOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type DivOp

type DivOp struct {
}

DIV operator

func (*DivOp) Eval

func (op *DivOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*DivOp) InitializeOperator

func (op *DivOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*DivOp) RegisterCallback

func (op *DivOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type EndsWithOp

type EndsWithOp struct {
}

ENDS_WITH operator

func (*EndsWithOp) Eval

func (op *EndsWithOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*EndsWithOp) InitializeOperator

func (op *EndsWithOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*EndsWithOp) RegisterCallback

func (op *EndsWithOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type EqOp

type EqOp struct {
}

EQ operator

func (*EqOp) Eval

func (op *EqOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*EqOp) InitializeOperator

func (op *EqOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*EqOp) RegisterCallback

func (op *EqOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ExistOp

type ExistOp struct {
	// contains filtered or unexported fields
}

exist / exist_not operators - with truth maintenance

func (*ExistOp) Eval

func (op *ExistOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

Apply the operator:

lhs exist rhs     (case op.isExistNot is false)
lhs exist_not rhs (case op.isExistNot is true)

func (*ExistOp) InitializeOperator

func (op *ExistOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*ExistOp) RegisterCallback

func (op *ExistOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

Add truth maintenance

func (*ExistOp) String

func (op *ExistOp) String() string

type ExprBinaryOp

type ExprBinaryOp struct {
	// contains filtered or unexported fields
}

Binary Operator term

func (*ExprBinaryOp) Eval

func (expr *ExprBinaryOp) Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node

func (*ExprBinaryOp) EvalFilter

func (expr *ExprBinaryOp) EvalFilter(reteSession *ReteSession, row *BetaRow) bool

func (*ExprBinaryOp) InitializeExpression

func (expr *ExprBinaryOp) InitializeExpression(reteSession *ReteSession) error

func (*ExprBinaryOp) RegisterCallback

func (expr *ExprBinaryOp) RegisterCallback(reteSession *ReteSession, vertex int) error

func (*ExprBinaryOp) StaticEval

func (expr *ExprBinaryOp) StaticEval(reteSession *ReteSession) *rdf.Node

type ExprBindedVar

type ExprBindedVar struct {
	// contains filtered or unexported fields
}

Binded variable term

func (*ExprBindedVar) Eval

func (expr *ExprBindedVar) Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node

func (*ExprBindedVar) EvalFilter

func (expr *ExprBindedVar) EvalFilter(reteSession *ReteSession, row *BetaRow) bool

func (*ExprBindedVar) InitializeExpression

func (expr *ExprBindedVar) InitializeExpression(reteSession *ReteSession) error

func (*ExprBindedVar) RegisterCallback

func (expr *ExprBindedVar) RegisterCallback(reteSession *ReteSession, vertex int) error

func (*ExprBindedVar) StaticEval

func (expr *ExprBindedVar) StaticEval(reteSession *ReteSession) *rdf.Node

type ExprCst

type ExprCst struct {
	// contains filtered or unexported fields
}

Constant term

func (*ExprCst) Eval

func (expr *ExprCst) Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node

func (*ExprCst) EvalFilter

func (expr *ExprCst) EvalFilter(reteSession *ReteSession, row *BetaRow) bool

func (*ExprCst) InitializeExpression

func (expr *ExprCst) InitializeExpression(reteSession *ReteSession) error

func (*ExprCst) RegisterCallback

func (expr *ExprCst) RegisterCallback(reteSession *ReteSession, vertex int) error

func (*ExprCst) StaticEval

func (expr *ExprCst) StaticEval(reteSession *ReteSession) *rdf.Node

type ExprUnaryOp

type ExprUnaryOp struct {
	// contains filtered or unexported fields
}

Unary Operator term

func (*ExprUnaryOp) Eval

func (expr *ExprUnaryOp) Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node

func (*ExprUnaryOp) EvalFilter

func (expr *ExprUnaryOp) EvalFilter(reteSession *ReteSession, row *BetaRow) bool

func (*ExprUnaryOp) InitializeExpression

func (expr *ExprUnaryOp) InitializeExpression(reteSession *ReteSession) error

func (*ExprUnaryOp) RegisterCallback

func (expr *ExprUnaryOp) RegisterCallback(reteSession *ReteSession, vertex int) error

func (*ExprUnaryOp) StaticEval

func (expr *ExprUnaryOp) StaticEval(reteSession *ReteSession) *rdf.Node

type Expression

type Expression interface {
	// Initialize the operators in expressions
	//
	// Applicable to filter and object
	InitializeExpression(reteSession *ReteSession) error
	// Register callback with graph
	//
	// Applicable to operator having predicates as argument
	// that need to participate to the truth maintenance
	// e.g. operators exists and exists_not
	// Only some binary operator do participate to the truth maintenance.
	// Applicable to filter components only.
	RegisterCallback(reteSession *ReteSession, vertex int) error
	// Eval the Expression node
	Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node
	// StaticEval Expression, used for RegisterCallback
	StaticEval(reteSession *ReteSession) *rdf.Node
	EvalFilter(reteSession *ReteSession, row *BetaRow) bool
}

func NewExprBinaryOp

func NewExprBinaryOp(lhs Expression, op BinaryOperator, rhs Expression) Expression

func NewExprBindedVar

func NewExprBindedVar(idx int, label string) Expression

func NewExprCst

func NewExprCst(r *rdf.Node) Expression

func NewExprUnaryOp

func NewExprUnaryOp(op UnaryOperator, rhs Expression) Expression

type FBinded

type FBinded struct {
	// contains filtered or unexported fields
}

FBinded (aka F_binded): A binded variable to a previous term, such as ?C in second term:

(?s rdf:type ?C).(?C subclassOf Thing)

func (*FBinded) BetaRowIndex

func (af *FBinded) BetaRowIndex() int

func (*FBinded) Eval

func (af *FBinded) Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node

func (*FBinded) InitializeExpression

func (af *FBinded) InitializeExpression(reteSession *ReteSession) error

func (*FBinded) StaticValue

func (af *FBinded) StaticValue() *rdf.Node

func (*FBinded) String

func (af *FBinded) String() string

type FConstant

type FConstant struct {
	// contains filtered or unexported fields
}

Constant (aka F_cst): Constant resource, such as rdf:type in: (?s rdf:type ?C)

func (*FConstant) BetaRowIndex

func (af *FConstant) BetaRowIndex() int

func (*FConstant) Eval

func (af *FConstant) Eval(*ReteSession, *BetaRow) *rdf.Node

func (*FConstant) InitializeExpression

func (af *FConstant) InitializeExpression(reteSession *ReteSession) error

func (*FConstant) StaticValue

func (af *FConstant) StaticValue() *rdf.Node

func (*FConstant) String

func (af *FConstant) String() string

type FExpression

type FExpression struct {
	// contains filtered or unexported fields
}

FExpression (aka F_expr): An expression involving binded variables and constant terms.

func (*FExpression) BetaRowIndex

func (af *FExpression) BetaRowIndex() int

func (*FExpression) Eval

func (af *FExpression) Eval(reteSession *ReteSession, row *BetaRow) *rdf.Node

func (*FExpression) InitializeExpression

func (af *FExpression) InitializeExpression(reteSession *ReteSession) error

func (*FExpression) StaticValue

func (af *FExpression) StaticValue() *rdf.Node

func (*FExpression) String

func (af *FExpression) String() string

type FVariable

type FVariable struct {
	// contains filtered or unexported fields
}

FVariable (aka F_var): A variable as ?s in: (?s rdf:type ?C)

func (*FVariable) BetaRowIndex

func (af *FVariable) BetaRowIndex() int

func (*FVariable) Eval

func (af *FVariable) Eval(*ReteSession, *BetaRow) *rdf.Node

func (*FVariable) InitializeExpression

func (af *FVariable) InitializeExpression(reteSession *ReteSession) error

func (*FVariable) StaticValue

func (af *FVariable) StaticValue() *rdf.Node

func (*FVariable) String

func (af *FVariable) String() string

type GeOp

type GeOp struct {
}

GE operator

func (*GeOp) Eval

func (op *GeOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*GeOp) InitializeOperator

func (op *GeOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*GeOp) RegisterCallback

func (op *GeOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type GtOp

type GtOp struct {
}

Add operator

func (*GtOp) Eval

func (op *GtOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*GtOp) InitializeOperator

func (op *GtOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*GtOp) RegisterCallback

func (op *GtOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type IntStack

type IntStack []int

Simple stack of int, FILO

func NewIntStack

func NewIntStack(reserve int) *IntStack

func (IntStack) Len

func (s IntStack) Len() int

func (*IntStack) Pop

func (s *IntStack) Pop() int

func (*IntStack) Push

func (s *IntStack) Push(x int)

type IsLiteralOp

type IsLiteralOp struct {
}

IS_LITERAL unary operator

func (*IsLiteralOp) Eval

func (op *IsLiteralOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*IsLiteralOp) InitializeOperator

func (op *IsLiteralOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*IsLiteralOp) RegisterCallback

func (op *IsLiteralOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type IsNullOp

type IsNullOp struct {
}

IS_NULL unary operator

func (*IsNullOp) Eval

func (op *IsNullOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*IsNullOp) InitializeOperator

func (op *IsNullOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*IsNullOp) RegisterCallback

func (op *IsNullOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type IsResourceOp

type IsResourceOp struct {
}

IS_LITERAL unary operator

func (*IsResourceOp) Eval

func (op *IsResourceOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*IsResourceOp) InitializeOperator

func (op *IsResourceOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*IsResourceOp) RegisterCallback

func (op *IsResourceOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type JetruleModel

type JetruleModel struct {
	MainRuleFileName string `json:"main_rule_file_name"`
	// SupportRuleFileNames []string                 `json:"support_rule_file_names"`
	Resources    []ResourceNode    `json:"resources"`
	LookupTables []LookupTableNode `json:"lookup_tables"`
	// Jetrules             []JetruleNode            `json:"jet_rules"`
	ReteNodes []RuleTerm `json:"rete_nodes"`
	// Imports              map[string][]string      `json:"imports"`
	JetstoreConfig map[string]string        `json:"jetstore_config"`
	RuleSequences  []map[string]interface{} `json:"rule_sequences"`
	Classes        []ClassNode              `json:"classes"`
	Tables         []TableNode              `json:"tables"`
	Triples        []TripleNode             `json:"triples"`
	HeadRuleTerm   *RuleTerm
	Antecedents    []*RuleTerm
	Consequents    []*RuleTerm
}

type JetruleNode

type JetruleNode struct {
	Name            string            `json:"name"`
	Properties      map[string]string `json:"properties"`
	Optimization    bool              `json:"optimization"`
	Salience        int               `json:"salience"`
	Antecedents     []RuleTerm        `json:"antecedents"`
	Consequents     []RuleTerm        `json:"consequents"`
	AuthoredLabel   string            `json:"authoredLabel"`
	SourceFileName  string            `json:"source_file_name"`
	NormalizedLabel string            `json:"normalizedLabel"`
	Label           string            `json:"label"`
}

JetruleNode provides a rule view of the rete network

type LeOp

type LeOp struct {
}

LE operator

func (*LeOp) Eval

func (op *LeOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*LeOp) InitializeOperator

func (op *LeOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*LeOp) RegisterCallback

func (op *LeOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type LengthOfOp

type LengthOfOp struct {
}

LENGTH_OF unary operator

func (*LengthOfOp) Eval

func (op *LengthOfOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*LengthOfOp) InitializeOperator

func (op *LengthOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*LengthOfOp) RegisterCallback

func (op *LengthOfOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type LookupOp

type LookupOp struct {
	// contains filtered or unexported fields
}

Lookup / Multi Lookup Operators

func (*LookupOp) Eval

func (op *LookupOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*LookupOp) InitializeOperator

func (op *LookupOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*LookupOp) RegisterCallback

func (op *LookupOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type LookupRandOp

type LookupRandOp struct {
	// contains filtered or unexported fields
}

LookupRand / Multi Lookup Rand Operators

func (*LookupRandOp) Eval

func (op *LookupRandOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*LookupRandOp) InitializeOperator

func (op *LookupRandOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*LookupRandOp) RegisterCallback

func (op *LookupRandOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type LookupTable

type LookupTable interface {
	Lookup(rs *ReteSession, tblName *string, key *string) (*rdf.Node, error)
	MultiLookup(rs *ReteSession, tblName *string, key *string) (*rdf.Node, error)
	LookupRand(rs *ReteSession, tblName *string) (*rdf.Node, error)
	MultiLookupRand(rs *ReteSession, tblName *string) (*rdf.Node, error)
}

func NewLookupTableSqlite3

func NewLookupTableSqlite3(rmgr *rdf.ResourceManager, metaGraph *rdf.RdfGraph, spec *LookupTableNode,
	lookupDb *sql.DB) (LookupTable, error)

type LookupTableColumn

type LookupTableColumn struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	IsArray bool   `json:"as_array"`
}

type LookupTableDataInfo

type LookupTableDataInfo struct {
	DbFileName    string `json:"db_file_name"`
	Format        string `json:"format"`
	IndexFileName string `json:"index_file_name"`
}

LookupTableDataInfo contain the information of the lookup table data. Originally this was the `lookup.db` and is a sqlite3 file. Which is the default when data_file_info is not specified. Other option will be in a jetstore binary format (TODO).

type LookupTableManager

type LookupTableManager struct {
	LookupTableMap map[string]LookupTable
}

func NewLookupTableManager

func NewLookupTableManager(rmgr *rdf.ResourceManager, metaGraph *rdf.RdfGraph, jetruleModel *JetruleModel) (*LookupTableManager, error)

NewLookupTableManager creates the LookupTableManager which is used in the context of a single rete network (main rule file or a rule sequence). This manager opens the DB connection to the sqlite file lookup.db located in the workspace root. This connection is used by the lookup table of type 'sqlite3' (default type when not specified).

type LookupTableNode

type LookupTableNode struct {
	Columns        []LookupTableColumn  `json:"columns"`
	DataInfo       *LookupTableDataInfo `json:"data_file_info"`
	CsvFile        string               `json:"csv_file"`
	Key            []string             `json:"key"`
	Name           string               `json:"name"`
	Resources      []string             `json:"resources"`
	SourceFileName string               `json:"source_file_name"`
	Type           string               `json:"type"`
}

type LookupTableSqlite3

type LookupTableSqlite3 struct {
	// contains filtered or unexported fields
}

func (*LookupTableSqlite3) Lookup

func (tbl *LookupTableSqlite3) Lookup(rs *ReteSession, tblName *string, key *string) (*rdf.Node, error)

func (*LookupTableSqlite3) LookupRand

func (tbl *LookupTableSqlite3) LookupRand(rs *ReteSession, tblName *string) (*rdf.Node, error)

func (*LookupTableSqlite3) MultiLookup

func (tbl *LookupTableSqlite3) MultiLookup(rs *ReteSession, tblName *string, key *string) (*rdf.Node, error)

func (*LookupTableSqlite3) MultiLookupRand

func (tbl *LookupTableSqlite3) MultiLookupRand(rs *ReteSession, tblName *string) (*rdf.Node, error)

type LtOp

type LtOp struct {
}

LT operator

func (*LtOp) Eval

func (op *LtOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*LtOp) InitializeOperator

func (op *LtOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*LtOp) RegisterCallback

func (op *LtOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type MinMaxOp

type MinMaxOp struct {
	// contains filtered or unexported fields
}

Max operator - with truth maintenance

func (*MinMaxOp) Eval

func (op *MinMaxOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

Apply the visitor to find the min/max value.

  • case datap == nullptr: return ?o such that min/max ?o in (s, objp, ?o) with objp functional property
  • case datap != nullptr: return ?o or ?v such that min/max ?v in (s, objp, ?o).(?o datap ?v) with objp non-functional and datap functional property

In the implementation we have:

?o is currentObj and ?v is currentValue with
(s, objp, currentObj).(currentObj, datap, currentValue), with currentObj = currentValue if datap==nullptr

func (*MinMaxOp) InitializeOperator

func (op *MinMaxOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*MinMaxOp) RegisterCallback

func (op *MinMaxOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

Add truth maintenance

func (*MinMaxOp) String

func (op *MinMaxOp) String() string

type MonthPeriodOfOp

type MonthPeriodOfOp struct {
}

MonthPeriodOf unary operator

func (*MonthPeriodOfOp) Eval

func (op *MonthPeriodOfOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*MonthPeriodOfOp) InitializeOperator

func (op *MonthPeriodOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*MonthPeriodOfOp) RegisterCallback

func (op *MonthPeriodOfOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type MultOp

type MultOp struct {
}

MULT operator

func (*MultOp) Eval

func (op *MultOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*MultOp) InitializeOperator

func (op *MultOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*MultOp) RegisterCallback

func (op *MultOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type NeOp

type NeOp struct {
}

NE operator

func (*NeOp) Eval

func (op *NeOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*NeOp) InitializeOperator

func (op *NeOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*NeOp) RegisterCallback

func (op *NeOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type NodeVertex

type NodeVertex struct {
	Vertex               int
	ParentNodeVertex     *NodeVertex
	ChildAlphaNodes      []*AlphaNode
	ConsequentAlphaNodes []*AlphaNode
	IsNegation           bool
	Salience             int
	FilterExpr           Expression
	NormalizedLabel      string
	RowInitializer       *BetaRowInitializer
	AntecedentQueryKey   int
	AssociatedRules      []string
}

Note the child_nodes and consequent_alpha_vertexes properties are set after construction by ReteMetaStore as part of metadata initialization routine.

func NewNodeVertex

func NewNodeVertex(vertex int, parent *NodeVertex, isNeg bool, salience int,
	filter Expression, label string, rules []string, rowInitializer *BetaRowInitializer) *NodeVertex

func (*NodeVertex) AddChildAlphaNode

func (node *NodeVertex) AddChildAlphaNode(alphaNd *AlphaNode)

func (*NodeVertex) AddConsequentTerm

func (node *NodeVertex) AddConsequentTerm(alphaNd *AlphaNode)

func (*NodeVertex) HasChildren

func (node *NodeVertex) HasChildren() bool

Children as descendent NodeVertex (antecedent AlphaNode)

func (*NodeVertex) HasConsequentTerms

func (node *NodeVertex) HasConsequentTerms() bool

func (*NodeVertex) HasExpression

func (node *NodeVertex) HasExpression() bool

func (*NodeVertex) IsHead

func (node *NodeVertex) IsHead() bool

func (*NodeVertex) String

func (node *NodeVertex) String() string

type NotOp

type NotOp struct {
}

NOT unary operator

func (*NotOp) Eval

func (op *NotOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*NotOp) InitializeOperator

func (op *NotOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*NotOp) RegisterCallback

func (op *NotOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type OrOp

type OrOp struct {
}

OR operator

func (*OrOp) Eval

func (op *OrOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*OrOp) InitializeOperator

func (op *OrOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*OrOp) RegisterCallback

func (op *OrOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ParseCurrencyOp

type ParseCurrencyOp struct {
}

PARSE_CURRENCY unary operator

func (*ParseCurrencyOp) Eval

func (op *ParseCurrencyOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ParseCurrencyOp) InitializeOperator

func (op *ParseCurrencyOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ParseCurrencyOp) RegisterCallback

func (op *ParseCurrencyOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type RangeOp

type RangeOp struct {
}

RANGE aka Iterator operator

func (*RangeOp) Eval

func (op *RangeOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*RangeOp) InitializeOperator

func (op *RangeOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*RangeOp) RegisterCallback

func (op *RangeOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ReplaceCharOp

type ReplaceCharOp struct {
}

REPLACE_CHAR operator lhs argument is a config resource with data properties:

  • jets:replace_chars string: list of characters to replace
  • jets:replace_with string: character(s) to replace with

rhs is the string that we want to replace char from

func (*ReplaceCharOp) Eval

func (op *ReplaceCharOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*ReplaceCharOp) InitializeOperator

func (op *ReplaceCharOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*ReplaceCharOp) RegisterCallback

func (op *ReplaceCharOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type ResourceNode

type ResourceNode struct {
	Id             string `json:"id"`
	Inline         bool   `json:"inline"`
	IsAntecedent   bool   `json:"is_antecedent"`
	IsBinded       bool   `json:"is_binded"`
	Key            int    `json:"key"`
	SourceFileName string `json:"source_file_name"`
	Type           string `json:"type"`
	Value          string `json:"value"`
	VarPos         int    `json:"var_pos"`
	Vertex         int    `json:"vertex"`
}

type ReteBuilderContext

type ReteBuilderContext struct {
	ResourceMgr     *rdf.ResourceManager
	WorkspaceCtrl   *WorkspaceControl
	MetaGraph       *rdf.RdfGraph
	ResourcesLookup map[int]*rdf.Node
	VariablesLookup map[int]*VarInfo
	MainRuleUri     string
	JetruleModel    *JetruleModel
	JetStoreConfig  *map[string]string
	LookupTables    *LookupTableManager
	AlphaNodes      []*AlphaNode
	NodeVertices    []*NodeVertex
}

Context for building the components of the ReteMetaStore. The meta store is identified by the main rule uri `MainRuleUri`. The `ResourcesLookup` and `VariablesLookup` are lookup to link the json components together while `LookupTables`, `AlphaNodes`, and `NodeVertices` are the actual components that are being built here and are making the ReteMetaStore

func (*ReteBuilderContext) BuildReteMetaStore

func (ctx *ReteBuilderContext) BuildReteMetaStore() (*ReteMetaStore, error)

func (*ReteBuilderContext) CreateBinaryOperator

func (ctx *ReteBuilderContext) CreateBinaryOperator(op string) BinaryOperator

func (*ReteBuilderContext) CreateUnaryOperator

func (ctx *ReteBuilderContext) CreateUnaryOperator(op string) UnaryOperator

func (*ReteBuilderContext) NewAlphaFunctor

func (ctx *ReteBuilderContext) NewAlphaFunctor(key int) (AlphaFunctor, error)

type ReteCallback

type ReteCallback struct {
	// contains filtered or unexported fields
}

forFilterTerm is true when the callback if for a rule filter term

func (*ReteCallback) TripleDeleted

func (cm *ReteCallback) TripleDeleted(s, p, o *rdf.Node)

func (*ReteCallback) TripleInserted

func (cm *ReteCallback) TripleInserted(s, p, o *rdf.Node)

type ReteMetaStore

type ReteMetaStore struct {
	ResourceMgr     *rdf.ResourceManager
	MetaGraph       *rdf.RdfGraph
	LookupTables    *LookupTableManager
	AlphaNodes      []*AlphaNode
	NodeVertices    []*NodeVertex
	JetStoreConfig  *map[string]string
	DataPropertyMap map[string]*DataPropertyNode
	DomainTableMap  map[string]*TableNode
}

ReteMetaStore -- metadata store for a rete network named by it's ruleset uri The ReteMetaStore correspond to a complete rule set organized as a rete network.

func NewReteMetaStore

func NewReteMetaStore(rm *rdf.ResourceManager, mg *rdf.RdfGraph, ltm *LookupTableManager,
	an []*AlphaNode, nv []*NodeVertex, config *map[string]string,
	dataPropertyMap map[string]*DataPropertyNode,
	domainTableMap map[string]*TableNode) (*ReteMetaStore, error)

func (*ReteMetaStore) GetRangeDataType

func (ms *ReteMetaStore) GetRangeDataType(dataProperty string) (string, bool, error)

func (*ReteMetaStore) NbrVertices

func (ms *ReteMetaStore) NbrVertices() int

type ReteMetaStoreFactory

type ReteMetaStoreFactory struct {
	WorkspaceCtrl     *WorkspaceControl
	MainRuleFileNames []string
	ResourceMgr       *rdf.ResourceManager
	MetaGraph         *rdf.RdfGraph
	MetaStoreLookup   map[string]*ReteMetaStore
	ReteModelLookup   map[string]*JetruleModel
}

Note: single ResourceManager for all reteMetaStores Note: single MetaGraph for all reteMetaStores

func NewReteMetaStoreFactory

func NewReteMetaStoreFactory(jetRuleName string) (*ReteMetaStoreFactory, error)

Main function to create the factory and to load ReteMetaStore, one per main rule file. Each rule file is a json with extension .jrcc.json produced by the rule compiler Argument jetRuleName is either a main rule file (ending with .jr) or a RuleSequence name. The WorkspaceControl component provides the mapping from jetRuleName to a list of main rule files.

type ReteSession

type ReteSession struct {
	RdfSession *rdf.RdfSession

	VertexVisits []VisitCount
	// contains filtered or unexported fields
}

func NewReteSession

func NewReteSession(rdfSession *rdf.RdfSession) *ReteSession

Create an uninitialized the ReteSession

func (*ReteSession) ComputeConsequentTriples

func (rs *ReteSession) ComputeConsequentTriples() error

func (*ReteSession) Done

func (rs *ReteSession) Done()

func (*ReteSession) ExecuteRules

func (rs *ReteSession) ExecuteRules() (err error)

func (*ReteSession) GetAlphaNode

func (rs *ReteSession) GetAlphaNode(vertex int) *AlphaNode

func (*ReteSession) GetBetaRelation

func (rs *ReteSession) GetBetaRelation(vertex int) *BetaRelation

func (*ReteSession) GetNodeVertex

func (rs *ReteSession) GetNodeVertex(vertex int) *NodeVertex

func (*ReteSession) Initialize

func (rs *ReteSession) Initialize(ms *ReteMetaStore)

func (*ReteSession) ScheduleConsequentTerms

func (rs *ReteSession) ScheduleConsequentTerms(row *BetaRow)

func (*ReteSession) TripleUpdated

func (rs *ReteSession) TripleUpdated(vertex int, s, p, o *rdf.Node, isInserted bool)

This is called by callback manager in response to a triple inserted or deleted from the rdf graph

func (*ReteSession) TripleUpdatedForFilter

func (rs *ReteSession) TripleUpdatedForFilter(vertex int, _, _, _ *rdf.Node, _ bool)

This is called by callback manager in response to a triple inserted or deleted from the rdf graph Case for rule filters The approach is to replay all the inferrence of this node when a triple is inserted or retracted, this is done by first retracting all the beta rows of the current node and then infer based on the beta rows of the parent node Note: since we replay all the inferrence of this node, only the vertex argument is used.

func (*ReteSession) VisitReteGraph

func (rs *ReteSession) VisitReteGraph(fromVertex int, isInferring bool) error

type RuleSequence

type RuleSequence struct {
	Name     string   `json:"name"`
	RuleSets []string `json:"rule_sets"`
}

func NewRuleSequence

func NewRuleSequence(name string, ruleSets []string) *RuleSequence

type RuleTerm

type RuleTerm struct {
	Type               string                 `json:"type"`
	IsNot              bool                   `json:"isNot"`
	NormalizedLabel    string                 `json:"normalizedLabel"`
	Vertex             int                    `json:"vertex"`
	ParentVertex       int                    `json:"parent_vertex"`
	BetaRelationVars   []string               `json:"beta_relation_vars"`
	PrunedVars         []string               `json:"pruned_var"`
	BetaVarNodes       []BetaVarNode          `json:"beta_var_nodes"`
	ChildrenVertexes   []int                  `json:"children_vertexes"`
	Rules              []string               `json:"rules"`
	Salience           []int                  `json:"salience"`
	ConsequentSeq      int                    `json:"consequent_seq"`
	ConsequentForRule  string                 `json:"consequent_for_rule"`
	ConsequentSalience int                    `json:"consequent_salience"`
	SubjectKey         int                    `json:"subject_key"`
	PredicateKey       int                    `json:"predicate_key"`
	ObjectKey          int                    `json:"object_key"`
	ObjectExpr         map[string]interface{} `json:"obj_expr"`
	Filter             map[string]interface{} `json:"filter"`
}

RulTerm type is either antecedent or consequent

type SizeOfOp

type SizeOfOp struct {
}

size_of operator - with truth maintenance

func (*SizeOfOp) Eval

func (op *SizeOfOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

Apply the operator:

lhs size_of rhs

func (*SizeOfOp) InitializeOperator

func (op *SizeOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*SizeOfOp) RegisterCallback

func (op *SizeOfOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

Add truth maintenance

func (*SizeOfOp) String

func (op *SizeOfOp) String() string

type SortedHeadOp

type SortedHeadOp struct {
	// contains filtered or unexported fields
}

SORTED_HEAD operator - DEPRECATED - with truth maintenance use min_head_of or max_head_of instead

func (*SortedHeadOp) Eval

func (op *SortedHeadOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

Delegate to MinMaxOp

func (*SortedHeadOp) InitializeOperator

func (op *SortedHeadOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*SortedHeadOp) RegisterCallback

func (op *SortedHeadOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

Add truth maintenance Delegate to MinMaxOp

func (*SortedHeadOp) String

func (op *SortedHeadOp) String() string

type StartWithOp

type StartWithOp struct {
}

STARTS_WITH operator

func (*StartWithOp) Eval

func (op *StartWithOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*StartWithOp) InitializeOperator

func (op *StartWithOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*StartWithOp) RegisterCallback

func (op *StartWithOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type SubOp

type SubOp struct {
}

Add operator

func (*SubOp) Eval

func (op *SubOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*SubOp) InitializeOperator

func (op *SubOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*SubOp) RegisterCallback

func (op *SubOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type SubstringOfOp

type SubstringOfOp struct {
}

SUBSTRING_OF operator lhs argument is a config resource with data properties:

  • jets:from int value for start position of substring
  • jets:length int value for length of substring.

Note: if jets:from + jets:length > rhs.data.size() then return the available characters of rhs.data Note: if jets:length < 0 then remove jets:length from the end of the string rhs is the string that we want to take a substring from

func (*SubstringOfOp) Eval

func (op *SubstringOfOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

func (*SubstringOfOp) InitializeOperator

func (op *SubstringOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*SubstringOfOp) RegisterCallback

func (op *SubstringOfOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

type SumValuesOp

type SumValuesOp struct {
	// contains filtered or unexported fields
}

SUM_VALUES operator - with truth maintenance

func (*SumValuesOp) Eval

func (op *SumValuesOp) Eval(reteSession *ReteSession, row *BetaRow, lhs, rhs *rdf.Node) *rdf.Node

Apply the visitor to find:

  • case datap is nullptr: the sum of ?v in (lhs, objp, ?v)
  • case datap is not nullptr: the sum of ?v in (lhs, objp, ?o).(?o, datap, ?v)

func (*SumValuesOp) InitializeOperator

func (op *SumValuesOp) InitializeOperator(metaGraph *rdf.RdfGraph, lhs, rhs *rdf.Node) error

func (*SumValuesOp) RegisterCallback

func (op *SumValuesOp) RegisterCallback(reteSession *ReteSession, vertex int, lhs, rhs *rdf.Node) error

Add truth maintenance

func (*SumValuesOp) String

func (op *SumValuesOp) String() string

type TableColumnNode

type TableColumnNode struct {
	Type         string `json:"type"`
	AsArray      bool   `json:"as_array"`
	PropertyName string `json:"property_name"`
	ColumnName   string `json:"column_name"`
}

type TableNode

type TableNode struct {
	DomainClassKey int               `json:"domain_class_key"`
	TableName      string            `json:"table_name"`
	ClassName      string            `json:"class_name"`
	Columns        []TableColumnNode `json:"columns"`
	SourceFileName string            `json:"source_file_name"`
}

type ToDateOp

type ToDateOp struct {
}

TO_DATE unary operator

func (*ToDateOp) Eval

func (op *ToDateOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToDateOp) InitializeOperator

func (op *ToDateOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToDateOp) RegisterCallback

func (op *ToDateOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type ToDatetimeOp

type ToDatetimeOp struct {
}

TO_DATETIME unary operator

func (*ToDatetimeOp) Eval

func (op *ToDatetimeOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToDatetimeOp) InitializeOperator

func (op *ToDatetimeOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToDatetimeOp) RegisterCallback

func (op *ToDatetimeOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type ToDoubleOp

type ToDoubleOp struct {
}

TO_DOUBLE unary operator

func (*ToDoubleOp) Eval

func (op *ToDoubleOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToDoubleOp) InitializeOperator

func (op *ToDoubleOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToDoubleOp) RegisterCallback

func (op *ToDoubleOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type ToIntOp

type ToIntOp struct {
}

TO_INT unary operator

func (*ToIntOp) Eval

func (op *ToIntOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToIntOp) InitializeOperator

func (op *ToIntOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToIntOp) RegisterCallback

func (op *ToIntOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type ToLowerOp

type ToLowerOp struct {
}

TO_LOWER unary operator

func (*ToLowerOp) Eval

func (op *ToLowerOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToLowerOp) InitializeOperator

func (op *ToLowerOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToLowerOp) RegisterCallback

func (op *ToLowerOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type ToTimestampOp

type ToTimestampOp struct {
}

TO_TIMESTAMP unary operator

func (*ToTimestampOp) Eval

func (op *ToTimestampOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToTimestampOp) InitializeOperator

func (op *ToTimestampOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToTimestampOp) RegisterCallback

func (op *ToTimestampOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type ToUpperOp

type ToUpperOp struct {
}

TO_UPPER unary operator

func (*ToUpperOp) Eval

func (op *ToUpperOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*ToUpperOp) InitializeOperator

func (op *ToUpperOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*ToUpperOp) RegisterCallback

func (op *ToUpperOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type TrimOp

type TrimOp struct {
}

TRIM unary operator

func (*TrimOp) Eval

func (op *TrimOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*TrimOp) InitializeOperator

func (op *TrimOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*TrimOp) RegisterCallback

func (op *TrimOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type TripleNode

type TripleNode struct {
	Type           string `json:"type"`
	SubjectKey     int    `json:"subject_key"`
	PredicateKey   int    `json:"predicate_key"`
	ObjectKey      int    `json:"object_key"`
	SourceFileName string `json:"source_file_name"`
}

type UnaryOperator

type UnaryOperator interface {
	InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error
	RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error
	Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node
}

func NewAbsOp

func NewAbsOp() UnaryOperator

func NewCreateEntityOp

func NewCreateEntityOp() UnaryOperator

func NewCreateLiteralOp

func NewCreateLiteralOp() UnaryOperator

func NewCreateResourceOp

func NewCreateResourceOp() UnaryOperator

func NewCreateUuidResourceOp

func NewCreateUuidResourceOp() UnaryOperator

func NewDayPeriodOfOp

func NewDayPeriodOfOp() UnaryOperator

func NewIsLiteralOp

func NewIsLiteralOp() UnaryOperator

func NewIsNullOp

func NewIsNullOp() UnaryOperator

func NewIsResourceOp

func NewIsResourceOp() UnaryOperator

func NewLengthOfOp

func NewLengthOfOp() UnaryOperator

func NewLookupRandOp

func NewLookupRandOp() UnaryOperator

func NewMonthPeriodOfOp

func NewMonthPeriodOfOp() UnaryOperator

func NewMultiLookupRandOp

func NewMultiLookupRandOp() UnaryOperator

func NewNotOp

func NewNotOp() UnaryOperator

func NewParseCurrencyOp

func NewParseCurrencyOp() UnaryOperator

func NewToDateOp

func NewToDateOp() UnaryOperator

func NewToDatetimeOp

func NewToDatetimeOp() UnaryOperator

func NewToDoubleOp

func NewToDoubleOp() UnaryOperator

func NewToIntOp

func NewToIntOp() UnaryOperator

func NewToLowerOp

func NewToLowerOp() UnaryOperator

func NewToTimestampOp

func NewToTimestampOp() UnaryOperator

func NewToUpperOp

func NewToUpperOp() UnaryOperator

func NewTrimOp

func NewTrimOp() UnaryOperator

func NewUuidMd5Op

func NewUuidMd5Op() UnaryOperator

func NewUuidSha1Op

func NewUuidSha1Op() UnaryOperator

func NewWeekPeriodOfOp

func NewWeekPeriodOfOp() UnaryOperator

type UuidMd5Op

type UuidMd5Op struct {
}

UUID_MD5 unary operator

func (*UuidMd5Op) Eval

func (op *UuidMd5Op) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*UuidMd5Op) InitializeOperator

func (op *UuidMd5Op) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*UuidMd5Op) RegisterCallback

func (op *UuidMd5Op) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type UuidSha1Op

type UuidSha1Op struct {
}

UUID_MD5 unary operator

func (*UuidSha1Op) Eval

func (op *UuidSha1Op) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*UuidSha1Op) InitializeOperator

func (op *UuidSha1Op) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*UuidSha1Op) RegisterCallback

func (op *UuidSha1Op) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type VarInfo

type VarInfo struct {
	Id       string
	IsBinded bool
	Vertex   int
	VarPos   int
}

type VisitCount

type VisitCount struct {
	Label        string
	InferCount   int
	RetractCount int
}

type WeekPeriodOfOp

type WeekPeriodOfOp struct {
}

MonthPeriodOf unary operator

func (*WeekPeriodOfOp) Eval

func (op *WeekPeriodOfOp) Eval(reteSession *ReteSession, row *BetaRow, rhs *rdf.Node) *rdf.Node

func (*WeekPeriodOfOp) InitializeOperator

func (op *WeekPeriodOfOp) InitializeOperator(metaGraph *rdf.RdfGraph, rhs *rdf.Node) error

func (*WeekPeriodOfOp) RegisterCallback

func (op *WeekPeriodOfOp) RegisterCallback(reteSession *ReteSession, vertex int, rhs *rdf.Node) error

type WorkspaceControl

type WorkspaceControl struct {
	RuleSets      []string       `json:"rule_sets"`
	RuleSequences []RuleSequence `json:"rule_sequences"`
}

Component living in the workspace root directory as a json This component list the main rule files of the workspace, known as ruleSets, and the ruleSeq which are sequences of ruleSets.

func LoadWorkspaceControl

func LoadWorkspaceControl(fpath string) (*WorkspaceControl, error)

func NewWorkspaceControl

func NewWorkspaceControl(ruleSets []string, ruleSequences []RuleSequence) *WorkspaceControl

func (*WorkspaceControl) MainRuleFileNames

func (wc *WorkspaceControl) MainRuleFileNames(ruleFileName string) []string

Provide rule file names (ending in .jr) for a logical ruleFileName which may correspong to a RuleSequence or an individual main rule file.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL