OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BackwardChainerPMCB.h
Go to the documentation of this file.
1 /*
2  * BackwardChainerPMCB.h
3  *
4  * Copyright (C) 2014 Misgana Bayetta
5  * Copyright (C) 2015 OpenCog Foundation
6  *
7  * Author: Misgana Bayetta <misgana.bayetta@gmail.com> October 2014
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU Affero General Public License v3 as
11  * published by the Free Software Foundation and including the exceptions
12  * at http://opencog.org/wiki/Licenses
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU Affero General Public License
20  * along with this program; if not, write to:
21  * Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24 
25 #ifndef _OPENCOG_BACKWARDCHAINERPMCB_H_
26 #define _OPENCOG_BACKWARDCHAINERPMCB_H_
27 
29 
30 namespace opencog
31 {
32 
34  public InitiateSearchCB,
35  public DefaultPatternMatchCB // : public virtual PLNImplicator
36 {
37 protected:
40 
41  std::vector<std::map<Handle, Handle>> var_solns_;
42  std::vector<std::map<Handle, Handle>> pred_solns_;
43 
44 public:
46  virtual ~BackwardChainerPMCB();
47 
48  virtual void set_pattern(const Variables& vars,
49  const Pattern& pat)
50  {
53  }
54 
55  virtual bool grounding(const std::map<Handle, Handle> &var_soln,
56  const std::map<Handle, Handle> &pred_soln);
57 
62  std::vector<std::map<Handle, Handle>> get_var_list();
63  std::vector<std::map<Handle, Handle>> get_pred_list();
64 };
65 
66 } // ~namespace opencog
67 
68 #endif /* _OPENCOG_BACKWARDCHAINERPMCB_H_ */
virtual void set_pattern(const Variables &, const Pattern &)
std::shared_ptr< VariableList > VariableListPtr
Definition: VariableList.h:94
std::vector< std::map< Handle, Handle > > get_pred_list()
virtual bool grounding(const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &pred_soln)
std::vector< std::map< Handle, Handle > > var_solns_
virtual void set_pattern(const Variables &vars, const Pattern &pat)
BackwardChainerPMCB(AtomSpace *, VariableListPtr)
std::vector< std::map< Handle, Handle > > pred_solns_
std::vector< std::map< Handle, Handle > > get_var_list()
virtual void set_pattern(const Variables &, const Pattern &)