Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new instance
        /// </summary>
        public InferenceEngine(KnowledgeBase kb, RuleBase rb)
        {
            _knowledgeBase = kb;
            _ruleBase      = rb;

            _knowledgeBase.Changed += new KnowledgeChangedEventHandler(KnowledgeBase_Changed);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public Relationship(string id, KnowledgeBase kb)
 {
     _set       = new Set();
     _id        = id;
     _knowledge = kb;
     _variables = _knowledge.Variables;
 }
Ejemplo n.º 3
0
        public ExpressionInterpreter(Rule rule)
        {
            _bytes   = new List <ByteCode>();
            _opStack = new OpStack();

            _rule      = rule;
            _knowledge = _rule.KnowledgeBase;
            _variables = _knowledge.Variables;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public SetItem(object value, KnowledgeBase kb)
 {
     _value = value;
     if (_value is Variable)
     {
         _isWildcard = true;
     }
     _knowledge = kb;
     _variables = _knowledge.Variables;
 }
Ejemplo n.º 5
0
 public ICondition(Rule rule)
 {
     _rule      = rule;
     _knowledge = _rule.KnowledgeBase;
     _variables = _knowledge.Variables;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public Rule(KnowledgeBase kb)
 {
     _knowledgeBase = kb;
     _conditionList = new LinkedList <ICondition>();
     _actionList    = new List <IAction>();
 }
Ejemplo n.º 7
0
 public Expression(Rule rule)
 {
     _rule      = rule;
     _knowledge = _rule.KnowledgeBase;
     _variables = _knowledge.Variables;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public Relationship(string id, KnowledgeBase kb, params SetItem[] sets)
     : this(id, kb)
 {
     _set.AddRange(sets);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public Relationship(string id, KnowledgeBase kb, Set s)
     : this(id, kb)
 {
     _set.AddRange(s);
 }