OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ForwardChainerPMCB.h
Go to the documentation of this file.
1 /*
2  * ForwardChainPatternMatchCB.h
3  *
4  * Copyright (C) 2014 Misgana Bayetta
5  *
6  * Author: Misgana Bayetta <misgana.bayetta@gmail.com> Sept 2014
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Affero General Public License v3 as
10  * published by the Free Software Foundation and including the exceptions
11  * at http://opencog.org/wiki/Licenses
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Affero General Public License
19  * along with this program; if not, write to:
20  * Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 #ifndef FORWARDCHAINPATTERNMATCHCB_H_
25 #define FORWARDCHAINPATTERNMATCHCB_H_
26 
27 #include "FCMemory.h"
32 
33 namespace opencog
34 {
35 
36 class ForwardChainerPMCB: public virtual Implicator,
37  public virtual InitiateSearchCB,
38  /*public AttentionalFocusCB,*/
39  public virtual DefaultPatternMatchCB {
40 private:
43 public:
45  virtual ~ForwardChainerPMCB();
46 
47  virtual void set_pattern(const Variables& vars, const Pattern& pat)
48  {
51  }
52 
53  HandleSeq get_products(void);
54  void set_fcmem(FCMemory *fcmem);
55  // The follwing callbacks are used for guiding the PM to look
56  // only at the source list.
57  virtual bool node_match(const Handle& node1, const Handle& node2);
58  virtual bool link_match(const LinkPtr& lpat, const LinkPtr& lsoln);
63  virtual bool grounding(const std::map<Handle, Handle> &var_soln,
64  const std::map<Handle, Handle> &pred_soln);
65 };
66 
67 } // ~namespace opencog
68 
69 #endif /* FORWARDCHAINPATTERNMATCHCB_H_ */
virtual void set_pattern(const Variables &, const Pattern &)
void set_fcmem(FCMemory *fcmem)
std::vector< Handle > HandleSeq
a list of handles
Definition: Handle.h:246
virtual bool link_match(const LinkPtr &lpat, const LinkPtr &lsoln)
virtual bool node_match(const Handle &node1, const Handle &node2)
std::shared_ptr< Link > LinkPtr
Definition: Atom.h:53
virtual void set_pattern(const Variables &vars, const Pattern &pat)
virtual bool grounding(const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &pred_soln)
virtual void set_pattern(const Variables &, const Pattern &)