opencog::pln Namespace Reference


Classes

class  AtomLookupProvider
class  AtomSpaceWrapper
struct  EqOutgoing
class  FIMATW
class  NormalizingATW
class  DirectATW
struct  less_dpargs
struct  BDRUMUpdater
class  BITException
 Provide rules when expanding the tree. More...
struct  BITNodeFitnessCompare
struct  parent_link
class  ParametrizedBITNode
class  BITNode
class  BITNodeRoot
class  ExplicitlyEvaluatedBITNode
struct  nofilter
struct  triviality_filter
class  stats
class  DeductionLookupTable
class  ArityFreeFormula
class  Formula
class  TautologyFormula
class  InversionFormula
class  ImplicationBreakdownFormula
class  ImplicationConstructionFormula
class  NotFormula
class  DeductionSimpleFormula
class  DeductionGeometryFormula
class  RevisionFormula
class  Inh2SimFormula
class  Sim2InhFormula
class  ANDBreakdownFormula
class  ModusPonensFormula
class  Inh2ImpFormula
class  Imp2InhFormula
class  Mem2InhFormula
class  Mem2EvalFormula
class  Eval2InhFormula
class  Ext2IntFormula
class  Int2ExtFormula
class  SymmetricANDFormula
class  AsymmetricANDFormula
class  OldANDFormula
class  ORFormula
class  ExcludingORFormula
class  NOTFormula
class  ORFormula2
class  OldORFormula
class  SubsetEvalFormula
class  SubsetEvalFormulaTimes
class  SubsetEvalFormulaMin
class  FORALLFormula
class  PredicateTVFormula
class  EXISTFormula
class  InhSubstFormula
class  IndefiniteSymmetricBayesFormula
class  IndefiniteSymmetricImplicationBreakdownFormula
class  IndefiniteSymmetricDeductionFormula
class  IndefiniteSymmetricRevisionFormula
class  IndefiniteSymmetricANDFormula
class  IndefiniteMem2InhFormula
class  IndefiniteInh2MemFormula
class  Sampler
class  IndefiniteRule
class  ConjunctionRule
class  ImplicationRule
class  RevisionRule
class  BayesRule
class  AbductionRule
class  DeductionRule
class  RuleGenerator
class  LookupTable
class  StrengthCountFormula
class  StrengthFormula
class  VectorLookupTable
class  ForwardChainer
struct  iAtomSpaceWrapper
struct  atom
struct  lessatom
struct  lessatom_ignoreVarNameDifferences
class  atom_print
class  handle_print
struct  countAtom
class  getNameOp
class  handleNoOp
class  PostCondition
class  NoCondition
struct  ModifiedVTree
struct  ModifiedBoundVTree
class  BoundVTree
struct  mapper
struct  PLNexception
struct  weak_atom
struct  TableGather
class  Concat
class  GetHandle
class  DropVertexBindings
struct  getOutgoingFun
class  AND2ORRule
class  ANDBreakdownRule
class  ANDPartitionRule
class  ANDRule
class  ArityFreeANDRule
class  SimpleANDRule
class  ANDSubstRule
class  CrispTheoremRule
class  IntensionalInheritanceRule
class  LookupRule
class  PrintRule
class  ScholemFunctionProductionRule
class  SubsetEvalRule
class  VarInstantiationRule
class  Equi2ImpRule
class  Eval2MemRule
class  Exist2ForAllRule
class  Ext2ExtRule
class  Inclusion2EvalRule
class  Inh2EvalRule
class  Inh2SimRule
class  Link2LinkRule
class  Sim2InhRule
class  GenericRule
class  ImplicationBreakdownRule
class  ImplicationRedundantExpansionRule
class  ImplicationTailExpansionRule
class  StrictImplicationBreakdownRule
 (A->B, A) => B. More...
class  HypothesisRule
class  InversionRule
class  QuantifierRule
class  NotEliminationRule
class  NotEvaluatorRule
class  OR2ANDRule
class  ORPartitionRule
class  ORRule
class  Rule
struct  VtreeProvider
struct  VtreeProviderWrapper
class  RuleApp
struct  returnor
struct  converter
struct  EqRuleName
class  GenericRule2
class  InversionRule2
class  RuleProvider
class  VariableRuleProvider
class  DefaultVariableRuleProvider
class  ForwardChainerRuleProvider
class  SimSubstRule1
class  SimSubstRule2
class  BaseCrispUnificationRule
class  CrispUnificationRule
class  CustomCrispUnificationRule
class  CustomCrispUnificationRuleComposer
class  StrictCrispUnificationRule
 Requires that all subtrees are separately produced; hence requires HypothesisRule. More...
class  BackwardInferenceTask
struct  PLNTest
class  TimeStamp
class  XMLtag
 A helper class to contain the data of an XMLNode. More...
class  XMLNode
 An elementary XML parser. More...
struct  iXMLvalue
struct  XMLvalue
struct  IntXMLValue
struct  StringXMLValue
struct  FloatXMLValue

Namespaces

namespace  simple_evaluator

Typedefs

typedef unsigned int pHandle
typedef std::vector< pHandlepHandleSeq
typedef std::pair< Handle,
VersionHandle
vhpair
typedef pair< Rule *, vtreedirectProductionArgs
typedef std::pair< std::string,
atom
subst
typedef std::set< atom, lessatomatomset
typedef opencog::pln::BoundVertex atomT
typedef std::set< atomTatomSetT
typedef std::vector< atomTatomVectorT
typedef Btr< std::vector
< Vertex > > 
VertexVector
typedef Btr< std::set< Vertex > > VertexSet
typedef std::map< pHandle,
pHandle
bindingsT
typedef std::map< pHandle, vtreebindingsVTreeT
typedef Btr< BoundVTreeBBvtree
typedef std::pair< std::string,
pHandle
hsubst
typedef weak_atom< VertexBoundVertex
typedef std::set< VertexBasicVertexSet
typedef std::vector
< opencog::pln::BoundVertex
BV_Vector
typedef std::set
< opencog::pln::BoundVertex
BV_Set
typedef TableGather::iterator TableGatherIt
typedef TableGather::const_iterator TableGatherConstIt
typedef Ext2ExtRule
< EXTENSIONAL_IMPLICATION_LINK,
SUBSET_LINK > 
ExtImpl2SubsetRule
typedef Ext2ExtRule
< EXTENSIONAL_EQUIVALENCE_LINK,
EXTENSIONAL_SIMILARITY_LINK > 
ExtEqui2ExtSimRule
typedef Ext2ExtRule
< EQUIVALENCE_LINK,
SIMILARITY_LINK > 
Equi2SimRule
typedef Inclusion2EvalRule
< MEMBER_LINK > 
Mem2EvalRule
typedef Inclusion2EvalRule
< SUBSET_LINK > 
Inh2EvalRule
typedef Link2LinkRule
< Mem2InhFormula
Mem2InhRule
typedef Link2LinkRule
< Int2ExtFormula
Int2ExtRule
typedef Link2LinkRule
< Ext2IntFormula
Ext2IntRule
typedef Link2LinkRule
< Inh2ImpFormula
Inh2ImpRule
typedef Link2LinkRule
< Imp2InhFormula
Imp2InhRule
typedef QuantifierRule
< FORALLFormula
FORALLRule
typedef QuantifierRule
< EXISTFormula
ExistRule
typedef QuantifierRule
< PredicateTVFormula
PLNPredicateRule

Enumerations

enum  RULE {
  PTL_AND, SimpleAND, SimpleAND2, SimpleAND3,
  SimpleAND4, SimpleAND5, ForAll, PLNPredicate,
  ORPartition, OR, ANDPartition, NotEvaluation,
  UnorderedLinkPermutation, ANDBreakdown1, ANDBreakdown2, ANDBreakdown3,
  ANDBreakdown4, ANDBreakdown5, ORBreakdown, StrictImplicationBreakdown,
  ImplicationBreakdown, ImplicationConstruction, ImplicationTailExpansion, VariableInstantiation,
  ScholemFunctionProduction, ChildSubstitution, NOTElimination, Deduction_Implication,
  Deduction_Inheritance, Inversion_Implication, Inversion_Inheritance, Revision,
  MetaPredicateExecution, SubSetEval_ConceptNode, Equi2Impl, Equi2Sim,
  Inh2Imp, Inh2Sim, Inh2Eval, Sim2Inh,
  Mem2Inh, Mem2Eval, Imp2Inh, IntImp2Ext,
  IntInh2Ext, ExtImp2Int, ExtInh2Int, ExtImpl2Subset,
  ExtEqui2ExtSim, CrispTheorem, Lookup, Hypothesis,
  CrispUnification, StrictCrispUnification, Tautology, OR2AND,
  Exist2ForAll, Exist
}

Functions

pHandle CreateConceptASSOC (AtomSpaceWrapper *asw, pHandle c_h)
SimpleTruthValue ASSOC (const TruthValue &tv1, const TruthValue &tv2)
AtomSpaceWrapperASW (AtomSpace *a)
Handle singular (HandleSeq hs)
vtree make_vtree (pHandle h)
 Construct a vtree around Handle h.
void pr (pair< pHandle, pHandle > i)
void pr3 (pair< pHandle, pHandle > i)
template<typename V, typename Vit, typename Tit>
void copy_vars (V &vars, Vit varsbegin, Tit bbvt_begin, Tit bbvt_end)
template<typename T>
bool equal_indirect (const T &a, const T &b)
void * BetaDistribution (void *arg)
static number_t scaleLU (number_t value, number_t L_, number_t U_)
static void truncate (number_t &value)
static void setSaveDeductionLookupTable (bool b)
static void setUseDeductionLookupTable (bool b)
bool existMPin (const vector< Btr< atom > > &hs)
void prn (tree< Btr< atom > > &tr)
 Remove the explicit outgoingset (hs) and replace it with a tree structure.
void expandHandletree (bool fullVirtual, vtree &ret, tree< Vertex >::iterator ret_top)
void makeHandletree (pHandle h, bool fullVirtual, tree< Vertex > &ret)
void addatomcopy (const tree< Btr< atom > > &a, set< atom, lessatom_ignoreVarNameDifferences > &res)
void printAtomTree (const atom &a, int level=0, int LogLevel=5)
void getAtomTreeString (const atom &a, std::string &outbuf)
void VariableMPforms (const atom &src, std::set< atom, lessatom_ignoreVarNameDifferences > &res, std::set< subst > *forbiddenBindings)
bool getLargestIntersection2 (const std::set< atom, lessatom > &keyelem_set, const std::vector< pHandle > &link_set, std::vector< boost::shared_ptr< atom > > &result)
atomneBoundVertexWithNewType (Handle h, Type T)
void infer (Handle h, int &steps, bool setTarget)
Handle applyRule (const string &ruleName, const HandleSeq &premises)
Handle applyRule (const std::string &ruleName, const HandleSeq &premises)
bool unifiesWithVariableChangeTo (const vtree &lhs_t, const vtree &rhs_t, vtree::sibling_iterator ltop, vtree::sibling_iterator rtop, map< pHandle, pHandle > &bindings)
bool unifiesWithVariableChangeTo (const vtree &lhs_t, const vtree &rhs_t, map< pHandle, pHandle > &bindings)
string make_subst_buf (const BoundVertex &a)
bool equal_vectors (pHandle *lhs, int lhs_arity, pHandle *rhs)
bool within (float a, float b, float diff)
void convertTo (const VertexVector &args, auto_ptr< Handle > &ret)
void convertTo (const vector< Vertex > &args, auto_ptr< Handle > &ret)
void convertTo (const vector< BoundVertex > &args, auto_ptr< Handle > &ret)
void convertTo (const set< BoundVertex > &args, auto_ptr< Handle > &ret)
void convertTo (const VertexSet &args, auto_ptr< Handle > &ret)
void convertTo (const vector< Handle > &args, auto_ptr< Handle > &ret)
void convertTo (const VertexVector &args, Handle *&ret)
void convertTo (const vector< Vertex > &args, Handle *&ret)
void convertTo (const vector< BoundVertex > &args, Handle *&ret)
void convertTo (const vector< BoundVertex > &args, HandleSeq &ret)
void convertTo (const set< BoundVertex > &args, Handle *&ret)
void convertTo (const VertexSet &args, Handle *&ret)
void convertTo (const vector< Handle > &args, Handle *&ret)
bool substitutableTo (atom &from, atom &to, map< string, atom > &bindings, const set< subst > &forbiddenBindings, std::pair< string, atom > **restart_from, std::pair< string, atom > **restart_to)
bool getLargestIntersection (const set< pHandle > &keyelem_set, const set< pHandle > &link_set, pHandle &result)
bool getLargestIntersection2 (const set< atom, lessatom > &keyelem_set, const pHandleSeq &link_set, std::vector< Btr< atom > > &result)
string printNode1 (pHandle h, int level, int LogLevel)
std::string printTree (pHandle h, int level, int LogLevel)
string GetRandomString (int size)
bool _in (set< subst > *forbid, string entry, atom a)
string make_subst_buf (const atom &a)
void getAtomTreeString (const atom &a, string &outbuf)
string printNode1 (const atom &a, int level, int LogLevel)
void printLeveledString (int level, string str)
bool equal (pHandle A, pHandle B)
pHandleSet memberLinkSet (pHandle CP, strength_t min_membershipStrength, count_t min_membershipCount, AtomSpaceWrapper *asw)
pHandleSet constitutedSet (const pHandleSet &memberLinks, AtomSpaceWrapper *asw)
pHandleSet constitutedSet (pHandle CP, strength_t min_membershipStrength, count_t min_membershipCount, AtomSpaceWrapper *asw)
FitnessEvaluatorT getFitnessEvaluator (string name)
pHandle _v2h (const Vertex &v)
bool MPunifyHandle (pHandle lhs, const atom &rhs, bindingsT &bindings, set< hsubst > **forbiddenBindings, bool *restart, const Type VarT)
bool MPunify1 (tree< Vertex > &lhs_t, tree< Vertex >::iterator lhs_ti, const atom &rhs, bindingsT &bindings, set< hsubst > **forbiddenBindings, bool *restart, const Type VarT)
bool MPunifyVector (tree< Vertex > &lhs_t, tree< Vertex >::iterator lhs_top, const vector< Btr< atom > > &rhsv, bindingsT &bindings, set< hsubst > **forbiddenBindings, bool *restart, const Type VarT)
bool isVariableAtom (string name, Type type, int arity)
string condensed_form (const atom &a)
template<typename BindKeyT, typename BindKeyOpT, typename BindItT>
bool ttsubstitutableTo (pHandle from, pHandle to, map< BindKeyT, pHandle > &bindings, BindKeyOpT bind_key_op)
void foo2 ()
bool substitutableTo (pHandle from, pHandle to, map< string, pHandle > &bindings)
bool substitutableTo (pHandle from, pHandle to, map< pHandle, pHandle > &bindings)
const char * Type2Name (Type t)
pHandle make_real (vtree &vt)
void recursiveBind (Vertex &v, const map< pHandle, pHandle > &binds)
meta bind_vtree (vtree &targ, const map< pHandle, pHandle > &binds)
void removeRecursionFromHandleHandleMap (bindingsT &ret_bindings)
void removeRecursion (std::vector< Btr< set< BoundVertex > > > &multi_input_vector)
bool equalVariableStructure (const vtree &lhs, const vtree &rhs)
bool equalVariableStructure2 (BBvtree lhs, BBvtree rhs)
void ForceVirtual (meta _target, vtree::iterator &vit)
meta ForceAllLinksVirtual (meta _target)
meta ForceRootLinkVirtual (meta _target)
void print_progress ()
bool RealHandle (meta _target, Btr< set< BoundVertex > > result_set)
void bind (BoundVTree &bbvt, hpair new_bind)
void bind_Bvtree (meta arg, const bindingsVTreeT &binds)
void pr2 (std::pair< pHandle, vtree > i)
void print_binding (std::pair< Handle, vtree > i)
void printBinding (const std::pair< string, Handle > p)
void pr (std::pair< pHandle, pHandle > i)
void printSubsts (BoundVertex a, int LogLevel)
template<Type TRANSITIVE_LINK_TYPE, typename containerT, typename const_iteratorT>
Vertex transitive_produce (const containerT &chain, const_iteratorT next_it, Vertex last_result=(Handle) NULL)
bool IsIdenticalHigherConfidenceAtom (pHandle a, pHandle b)
bool unifiesTo (const vtree &lhs_t, const vtree &rhs_t, vtree::sibling_iterator ltop, vtree::sibling_iterator rtop, map< pHandle, vtree > &Lbindings, map< pHandle, vtree > &Rbindings, bool allow_rhs_binding, Type VarType)
bool unifiesTo (const vtree &lhs, const vtree &rhs, map< pHandle, vtree > &Lbindings, map< pHandle, vtree > &Rbindings, bool allow_rhs_binding, Type VarType)
FitnessEvaluatorT getFitnessEvaluator (std::string name)
bool unifiesTo (const vtree &lhs, const vtree &rhs, std::map< pHandle, vtree > &Lbindings, std::map< pHandle, vtree > &Rbindings, bool allow_rhs_binding, Type VarType=FW_VARIABLE_NODE)
bool unifiesWithVariableChangeTo (const vtree &lhs_t, const vtree &rhs_t, std::map< pHandle, pHandle > &bindings)
template<typename TransformerT>
Btr< vtreetree_transform (vtree &vt_const, TransformerT transformer)
template<typename T>
Btr< std::map< Vertex, Vertex > > toVertexMap (T mbegin, T mend)
template<typename T1, typename bindContainerIterT, typename TM>
bool consistent (TM &b1, TM &b2, bindContainerIterT b1start, bindContainerIterT b1end, bindContainerIterT b2start, bindContainerIterT b2end)
template<typename T1, typename T2, typename T3>
void insert_with_consistency_check (std::map< T1, T2 > &m, T3 rstart, T3 rend)
void insert_with_consistency_check_bindingsVTreeT (std::map< pHandle, vtree > &m, std::map< pHandle, vtree >::iterator rstart, std::map< pHandle, vtree >::iterator rend)
bool getLargestIntersection (const std::set< pHandle > &keyelem_set, const std::set< pHandle > &link_set, pHandle &result)
template<typename T>
bool vectorHas (std::vector< T > box, T key)
Handle satisfyingSet (Handle h)
template<typename T>
std::vector< T * > NewCartesianProduct (std::vector< std::vector< T > > &matrix)
bool MPunifyHandle (pHandle lhs, const atom &rhs, bindingsT &bindings, std::set< hsubst > **forbiddenBindings=NULL, bool *restart=NULL, const Type VarT=FW_VARIABLE_NODE)
bool MPunifyVector (tree< Vertex > &lhs_t, tree< Vertex >::iterator lhs_top, const std::vector< Btr< atom > > &rhsv, bindingsT &bindings, std::set< hsubst > **forbiddenBindings=NULL, bool *restart=NULL, const Type VarT=FW_VARIABLE_NODE)
bool MPunify1 (tree< Vertex > &lhs_t, tree< Vertex >::iterator lhs_ti, const atom &rhs, bindingsT &bindings, std::set< hsubst > **forbiddenBindings=NULL, bool *restart=NULL, const Type VarT=FW_VARIABLE_NODE)
void convertTo (const std::vector< Vertex > &args, std::auto_ptr< Handle > &ret)
void convertTo (const VertexVector &args, std::auto_ptr< Handle > &ret)
void convertTo (const std::vector< BoundVertex > &args, std::auto_ptr< Handle > &ret)
void convertTo (const std::set< BoundVertex > &args, std::auto_ptr< Handle > &ret)
void convertTo (const VertexSet &args, std::auto_ptr< Handle > &ret)
void convertTo (const std::vector< Handle > &args, std::auto_ptr< Handle > &ret)
void convertTo (const std::vector< Vertex > &args, Handle *&ret)
void convertTo (const std::vector< BoundVertex > &args, Handle *&ret)
void convertTo (const std::vector< BoundVertex > &args, HandleSeq &ret)
void convertTo (const std::set< BoundVertex > &args, Handle *&ret)
void convertTo (const std::vector< Handle > &args, Handle *&ret)
template<typename T>
bool deref_equal (T a, T b)
Vertex CreateVar (iAtomSpaceWrapper *atw, std::string varname)
 VariableNodes not memory-managed.
Vertex CreateVar (iAtomSpaceWrapper *atw)
Btr< std::set< Btr
< ModifiedBoundVTree > > > 
FindMatchingUniversals (Btr< vtree > target, iAtomSpaceWrapper *table)
Btr< ModifiedBoundVTreeFindMatchingUniversal (meta target, pHandle ForAllLink, iAtomSpaceWrapper *table)
meta bind_vtree (vtree &targ, const std::map< pHandle, pHandle > &binds)
void printBinding (const std::pair< const Handle, Handle > p)
template<typename T, typename T2>
T2 second (const std::pair< T, T2 > &p)
template<typename T, typename T2>
first (const std::pair< T, T2 > &p)
template<typename T, typename T2>
void removeRecursionFromMap (T mbegin, T mend)
template<typename T1, typename T2>
bool overlap (T1 &abegin, T1 &aend, T2 &b)
bool RealHandle (meta _target, Btr< std::set< BoundVertex > > result_set)
template<typename MapIteratorT, typename MapItemT>
void removeRecursionFromMapSimple (MapIteratorT mbegin, MapIteratorT mend)
bool substitutableTo (pHandle from, pHandle to, std::map< pHandle, pHandle > &bindings)
Rule::setOfMPs makeSingletonSet (Rule::MPs &mp)
pHandle UnorderedCcompute (iAtomSpaceWrapper *destTable, Type linkT, const ArityFreeFormula< TruthValue, TruthValue * > &fN, pHandle *premiseArray, const int n, pHandle CX=PHANDLE_UNDEFINED)
BBvtree bind_vtree (vtree &targ, map< pHandle, vtree > &binds)
bool ExpandEvaluationLinks (vtree &target, iAtomSpaceWrapper *destTable)
static const int NUMBER_OF_RULES (((int) Exist)+1)
template<typename VTPContainerT, typename OutIterT>
OutIterT VtreeProviders_TO_BoundVertices (const VTPContainerT &vtps, OutIterT out)
template<typename BVContainerT, typename OutIterT>
OutIterT BoundVertices_TO_VtreeProviders (const BVContainerT &bvs, OutIterT out)
template<typename VContainerT, typename OutIterT>
OutIterT Vertices_TO_VtreeProviders (const VContainerT &vs, OutIterT out)
float max (float a, float b)
 Max of two floats.
BBvtree atomWithNewType (pHandle h, Type T)
BBvtree atomWithNewType (const tree< Vertex > &v, Type T)
BBvtree atomWithNewType (const Vertex &v, Type T)
bool UnprovableType (Type T)
 haxx::
template<Type T>
pHandle Join (pHandle *h, int N, AtomSpaceWrapper &atw)
template<Type T, typename ATW>
pHandle Join (pHandle h1, pHandle h2, ATW &atw)
void insertAllANDCombinations (set< atom, lessatom_ignoreVarNameDifferences > head, vector< atom > tail, set< atom, lessatom_ignoreVarNameDifferences > &AND_combinations)
template<typename C>
void createPermutation (vector< C > seed, set< vector< C > > &result, int index)
template<typename C>
set< vector< C > > * newCreatePermutations (vector< C > seed)
Rule::setOfMPs PartitionRule_o2iMetaExtra (meta outh, bool &overrideInputFilter, Type OutLinkType)
template<class InputIterator, class OutputIterator, class UnaryOperation, class UnaryPredicate>
OutputIterator transform_if (InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op, UnaryPredicate test)
Btr< vtreeconvert_all_var2fwvar (vtree vt_const, iAtomSpaceWrapper *table)
Btr< ModifiedVTreeconvertToModifiedVTree (pHandle h, Btr< vtree > vt)
template<typename T, typename T2>
bool stlhasi (const T &c, const T2 &k)
template<typename T1, typename bindContainerIterT, typename TM>
bool consistent_bindingsVTreeT (TM &b1, bindContainerIterT b2start, bindContainerIterT b2end)
void insert_with_consistency_check_bindingsVTreeT (map< pHandle, vtree > &m, map< pHandle, vtree >::iterator rstart, map< pHandle, vtree >::iterator rend)
Btr< set< Btr
< ModifiedBoundVTree > > > 
FindMatchingUniversals (meta target, iAtomSpaceWrapper *table)
Rule::setOfMPs makeSingletonSet (Btr< Rule::MPs > mp)
BBvtree atomWithNewType (Handle h, Type T)
Handle AND2ORLink (Handle &andL, Type _ANDLinkType, Type _OR_LINK)
Handle OR2ANDLink (Handle &andL)
Handle AND2ORLink (Handle &andL)
Handle Exist2ForAllLink (Handle &exL)
std::pair< Handle, HandleEqui2ImpLink (Handle &)
template<typename T>
void delete_op (T *r)
void InitAxiomSet (string premiseFile)
void foo_pretest ()
void footest ()
void RunPLNTest (Btr< PLNTest > t)
void finger_print_test (vtree &v)
void InitPLNTests ()
bool satSetTest ()
void RunPLNTestsOnce ()
void RunPLNTests ()
void MacroRuleTest ()
void CleanSpace (string &s)
Handle LoadXMLFile (iAtomSpaceWrapper *table, string fname)
Handle LoadXMLInput (iAtomSpaceWrapper *table, string buf)
bool valid (Type T, HandleSeq &children)
TruthValueCreateTVfromArguments (const XMLNode &xml)
Handle Add1NodeFromXML (iAtomSpaceWrapper *table, const XMLNode &xml, const set< string > &old_free_names, set< string > &new_free_names, std::map< string, string > &newVarName)
Handle Add1LinkFromXML (iAtomSpaceWrapper *table, const XMLNode &xml, HandleSeq &children)
Handle HandleXMLInputNode (iAtomSpaceWrapper *table, const XMLNode &xml, const set< string > &prev_free_names, std::map< string, string > &returning_names, std::map< string, string > newVarName)

Variables

const std::string ASSOC_suffix = "__ASSOC__"
static const unsigned int mapOffset = NOTYPE+1
const bool USE_GENERATOR_CACHE = false
 This cache apparently gives a 30% speed up when active.
const bool DIRECT_RESULTS_SPAWN = true
static const float MIN_CONFIDENCE_FOR_RULE_APPLICATION = 0.00001f
const bool PREVENT_LOOPS = false
Btr< set< pHandle > > ForAll_handles
static int ParametrizedBITNodes = 0
static int more_count = 0
static int count111 = 0
float all_best_fitness = 0.0f
static int _trail_print_more_count = 0
static bool bigcounter = true
const int MAX_A = 10
const int MAX_B = MAX_A
const int MAX_C = MAX_A
const int MAX_AB = MAX_A
const int MAX_BC = MAX_A
const int FORMULA_MAX_ARITY = 100
const int AND_MAX_ARITY = FORMULA_MAX_ARITY
const int OR_MAX_ARITY = FORMULA_MAX_ARITY
const int FORALL_MAX_ARITY = FORMULA_MAX_ARITY
const float TV_MIN = 0.000001f
const float MembershipToExtensionalInheritanceCountDiscountFactor = 1.0f
const float IntensionToExtensionCountDiscountFactor = 1.0f
const float ExtensionToIntensionCountDiscountFactor = 1.0f
const float IndependenceAssumptionDiscount = 1.0f
const float IndependenceAssumptionGeometryDiscount = 1.0f
const float DefaultNodeProbability = 1 / DefaultU
gsl_rng * rng_ = gsl_rng_alloc (gsl_rng_mt19937)
const float IndefiniteMembershipToExtensionalInheritanceCountDiscountFactor = 1.5f
static bool SAVE_DEDUCTION_LOOKUP_TABLE = true
static bool USE_DEDUCTION_LOOKUP_TABLE = false
static const int FWD_CHAIN_MAX_APPS = 100
static const float FWD_CHAIN_MIN_CONFIDENCE = 0.4f
static const float FWD_CHAIN_PROB_STACK = 0.7f
static const float FWD_CHAIN_PROB_GLOBAL = 0.3f
static const int FWD_CHAIN_MAX_FILL = 50
int atom_alloc_count = 0
int inode_alloc_count = 0
const int MAX_VARIABLE_NUMBER = 5
int varcount = 0
const float MIN_CONFIDENCE = 0.0000001f
map< int, Typecounter
static long _ttt = 0
const bool RuleResultFreshness = true
unsigned long now_interval_len = 50000
const strength_t MIN_MEMBERS_STRENGTH = 0.000001
const strength_t MIN_MEMBERS_COUNT = 1
bool UnificationRuleResultFreshness = true
bool RECORD_TRAILS
int addlinks = 0
int gethandles = 0
FitnessEvalutorT FitnessEvaluator
map< int, Btr< tree< Vertex > > > tests
set< Btr< PLNTest > > PLNTests
bool foo42 = false
float temperature = 0.1f
float temperatures []
const int temperaturesN = 7
std::map< nocase_string, int > name2type
std::map< std::string, Handlenodenames
int xml_level = -1
set< string > declared_vars
static int helper1 = 0
static int helper2 = 0
static int helper3 = 0


Detailed Description

Todo:
Replace the numerous heap allocated TruthValue pointers throughout the Rules with references instead (Particular in the rules).

Typedef Documentation

typedef std::set<atom, lessatom> opencog::pln::atomset

Definition at line 255 of file PLNatom.h.

typedef std::set<atomT> opencog::pln::atomSetT

Definition at line 37 of file PLNEvaluator.h.

Definition at line 36 of file PLNEvaluator.h.

typedef std::vector<atomT> opencog::pln::atomVectorT

Definition at line 38 of file PLNEvaluator.h.

Definition at line 482 of file PLNUtils.h.

Definition at line 298 of file PLNUtils.h.

Definition at line 243 of file PLNUtils.h.

Definition at line 244 of file PLNUtils.h.

Definition at line 481 of file PLNUtils.h.

Definition at line 484 of file PLNUtils.h.

Definition at line 483 of file PLNUtils.h.

Definition at line 117 of file BackInferenceTreeNode.cc.

typedef Ext2ExtRule<EQUIVALENCE_LINK, SIMILARITY_LINK> opencog::pln::Equi2SimRule

Definition at line 81 of file Ext2ExtRule.h.

Definition at line 82 of file QuantifierRule.h.

Definition at line 122 of file Link2LinkRule.h.

typedef Ext2ExtRule<EXTENSIONAL_EQUIVALENCE_LINK, EXTENSIONAL_SIMILARITY_LINK> opencog::pln::ExtEqui2ExtSimRule

Definition at line 80 of file Ext2ExtRule.h.

typedef Ext2ExtRule<EXTENSIONAL_IMPLICATION_LINK, SUBSET_LINK> opencog::pln::ExtImpl2SubsetRule

Definition at line 79 of file Ext2ExtRule.h.

Definition at line 81 of file QuantifierRule.h.

typedef std::pair<std::string, pHandle> opencog::pln::hsubst

Definition at line 436 of file PLNUtils.h.

Definition at line 124 of file Link2LinkRule.h.

Definition at line 102 of file Inclusion2EvalRule.h.

Definition at line 123 of file Link2LinkRule.h.

Definition at line 121 of file Link2LinkRule.h.

Definition at line 101 of file Inclusion2EvalRule.h.

Definition at line 120 of file Link2LinkRule.h.

typedef unsigned int opencog::pln::pHandle

Definition at line 43 of file AtomLookupProvider.h.

typedef std::vector<pHandle> opencog::pln::pHandleSeq

Definition at line 44 of file AtomLookupProvider.h.

Definition at line 83 of file QuantifierRule.h.

typedef std::pair<std::string, atom> opencog::pln::subst

Definition at line 53 of file PLNatom.h.

typedef TableGather::const_iterator opencog::pln::TableGatherConstIt

Definition at line 504 of file PLNUtils.h.

typedef TableGather::iterator opencog::pln::TableGatherIt

Definition at line 503 of file PLNUtils.h.

typedef Btr< std::set<Vertex> > opencog::pln::VertexSet

Definition at line 145 of file PLNUtils.h.

typedef Btr< std::vector<Vertex> > opencog::pln::VertexVector

Definition at line 144 of file PLNUtils.h.

Definition at line 66 of file AtomSpaceWrapper.h.


Enumeration Type Documentation

Note: enum RULE is currently unused

Enumerator:
PTL_AND 
SimpleAND 
SimpleAND2 
SimpleAND3 
SimpleAND4 
SimpleAND5 
ForAll 
PLNPredicate 
ORPartition 
OR 
ANDPartition 
NotEvaluation 
UnorderedLinkPermutation 
ANDBreakdown1 
ANDBreakdown2 
ANDBreakdown3 
ANDBreakdown4 
ANDBreakdown5 
ORBreakdown 
StrictImplicationBreakdown 
ImplicationBreakdown 
ImplicationConstruction 
ImplicationTailExpansion 
VariableInstantiation 
ScholemFunctionProduction 
ChildSubstitution 
NOTElimination 
Deduction_Implication 
Deduction_Inheritance 
Inversion_Implication 
Inversion_Inheritance 
Revision 
MetaPredicateExecution 
SubSetEval_ConceptNode 
Equi2Impl 
Equi2Sim 
Inh2Imp 
Inh2Sim 
Inh2Eval 
Sim2Inh 
Mem2Inh 
Mem2Eval 
Imp2Inh 
IntImp2Ext 
IntInh2Ext 
ExtImp2Int 
ExtInh2Int 
ExtImpl2Subset 
ExtEqui2ExtSim 
CrispTheorem 
Lookup 
Hypothesis 
CrispUnification 
StrictCrispUnification 
Tautology 
OR2AND 
Exist2ForAll 
Exist 

Definition at line 234 of file Rule.h.


Function Documentation

bool opencog::pln::_in ( set< subst > *  forbid,
string  entry,
atom  a 
)

The implementation for REAL RandomStrings Could be more inclusive...

Definition at line 1120 of file PLNUtils.cc.

References STLhas.

Here is the caller graph for this function:

pHandle opencog::pln::_v2h ( const Vertex &  v  ) 

Definition at line 1372 of file PLNUtils.cc.

Handle opencog::pln::Add1LinkFromXML ( iAtomSpaceWrapper *  table,
const XMLNode &  xml,
HandleSeq &  children 
)

Handle opencog::pln::Add1NodeFromXML ( iAtomSpaceWrapper *  table,
const XMLNode &  xml,
const set< string > &  old_free_names,
set< string > &  new_free_names,
std::map< string, string > &  newVarName 
)

void opencog::pln::addatomcopy ( const tree< Btr< atom > > &  a,
set< atom, lessatom_ignoreVarNameDifferences > &  res 
)

Definition at line 748 of file PLNatom.cc.

References opencog::pln::atom::atom().

Handle opencog::pln::AND2ORLink ( Handle andL  ) 

Handle opencog::pln::AND2ORLink ( Handle andL,
Type  _ANDLinkType,
Type  _OR_LINK 
)

Here is the caller graph for this function:

Handle opencog::pln::applyRule ( const std::string &  ruleName,
const HandleSeq &  premises 
)

that function apply a PLN inference rule given its name and its premises to produce the conclusion. The set of rules is taken from DefaultVariableRuleProvider. If the name rule does not correspond to any declared rules then the Handle returned is UNDEFINED_HANDLE NOTE: VersionHandle is ignored for now

Parameters:
rule_name the name of PLN rule to apply
premises the list of Handle premises
Returns:
the Handle of the conclusion. Handle::UNDEFINED if no rule corresponds to ruleName

Here is the caller graph for this function:

Handle opencog::pln::applyRule ( const string &  ruleName,
const HandleSeq &  premises 
)

SimpleTruthValue opencog::pln::ASSOC ( const TruthValue tv1,
const TruthValue tv2 
)

Parameters:
tv1 TruthValue representing P(F|G)
tv2 TruthValue representing P(F|NOT G)
Returns:
SimpleTruthValue such that strength = max(tv1.s - tv2.s, 0)

Definition at line 64 of file ASSOC.cc.

References opencog::TruthValue::getMean(), and max().

Here is the caller graph for this function:

AtomSpaceWrapper * opencog::pln::ASW ( AtomSpace a = NULL  ) 

Singleton instance of AtomSpaceWrapper (following meyer's design pattern)

Definition at line 57 of file AtomSpaceWrapper.cc.

References opencog::pln::NormalizingATW::getInstance(), PetCombo::instance(), and LOG.

Here is the caller graph for this function:

BBvtree opencog::pln::atomWithNewType ( Handle  h,
Type  T 
)

BBvtree opencog::pln::atomWithNewType ( const Vertex &  v,
Type  T 
)

Definition at line 132 of file RuleFunctions.cc.

References GET_ASW, and mva.

BBvtree opencog::pln::atomWithNewType ( const tree< Vertex > &  v,
Type  T 
)

Definition at line 105 of file RuleFunctions.cc.

References opencog::tree< T, tree_node_allocator >::begin(), GET_ASW, and mva.

BBvtree opencog::pln::atomWithNewType ( pHandle  h,
Type  T 
)

Definition at line 91 of file RuleFunctions.cc.

References GET_ASW, and mva.

Here is the caller graph for this function:

void* opencog::pln::BetaDistribution ( void *  arg  ) 

Definition at line 44 of file FormulasIndefinite.cc.

References SPCTools::argv, b(), and rng_.

Here is the caller graph for this function:

void opencog::pln::bind ( BoundVTree bbvt,
hpair  new_bind 
)

Definition at line 2205 of file PLNUtils.cc.

References _v2h(), opencog::tree< T, tree_node_allocator >::begin(), opencog::tree< T, tree_node_allocator >::end(), and v.

Here is the caller graph for this function:

void opencog::pln::bind_Bvtree ( meta  arg,
const bindingsVTreeT &  binds 
)

Definition at line 2212 of file PLNUtils.cc.

References _v2h(), and v.

Here is the caller graph for this function:

BBvtree opencog::pln::bind_vtree ( vtree targ,
map< pHandle, vtree > &  binds 
)

Definition at line 48 of file CrispTheoremRule.cc.

References _v2h(), cprintf(), NMP_HANDLE, NMP_TYPE_NAME, and NMPrinter::print().

meta opencog::pln::bind_vtree ( vtree targ,
const std::map< pHandle, pHandle > &  binds 
)

meta opencog::pln::bind_vtree ( vtree targ,
const map< pHandle, pHandle > &  binds 
)

Definition at line 1926 of file PLNUtils.cc.

References recursiveBind().

Here is the caller graph for this function:

template<typename BVContainerT, typename OutIterT>
OutIterT opencog::pln::BoundVertices_TO_VtreeProviders ( const BVContainerT &  bvs,
OutIterT  out 
) [inline]

void opencog::pln::CleanSpace ( string &  s  ) 

Definition at line 22 of file XMLNode.cc.

Here is the caller graph for this function:

std::string opencog::pln::condensed_form ( const atom a  ) 

Definition at line 1635 of file PLNUtils.cc.

References GET_ASW, opencog::pln::atom::hs, i2str(), opencog::pln::AtomSpaceWrapper::inheritsType(), opencog::pln::atom::name, and opencog::pln::atom::T.

Here is the caller graph for this function:

template<typename T1, typename bindContainerIterT, typename TM>
bool opencog::pln::consistent ( TM &  b1,
TM &  b2,
bindContainerIterT  b1start,
bindContainerIterT  b1end,
bindContainerIterT  b2start,
bindContainerIterT  b2end 
) [inline]

The same var bound different way. First virtualize them:

Then apply all bindings on both sides to both, to "normalize away" dependencies

Definition at line 372 of file PLNUtils.h.

References _v2h(), b(), make_vtree(), and tree_transform().

template<typename T1, typename bindContainerIterT, typename TM>
bool opencog::pln::consistent_bindingsVTreeT ( TM &  b1,
bindContainerIterT  b2start,
bindContainerIterT  b2end 
) [inline]

After a StrictCrispU Node has been created here, it contains some newly converted FW_VARs. We have to convert them to FW_VARs to avoid complexities of having to deal with 2 types of vars everywhere. But we must be able to bind those vars later, by spawning a new copy of this Inference Node. But if we do that, then we must be able to connect the FW_VARs with this node. But we cannot simply fix the conversion mapping from VARs to FW_VARs for each ForAllLink, because we want to be able to use the same ForAllLink several times during the same inference chain!

Definition at line 569 of file RuleFunctions.cc.

References b(), make_vtree(), tree_transform(), and v2h.

pHandleSet opencog::pln::constitutedSet ( pHandle  concept,
strength_t  min_membershipStrength,
count_t  min_membershipCount,
AtomSpaceWrapper asw 
)

Return the set of members of a given concept node (or inheriting concept)

Parameters:
concept The pHandle of the concept node (or inheriting concept)
min_membershipStrength The minimum strength of the membership to be taken in consideration
min_membershipCount The minimum count of the membership
asw AtomSpaceWrapper where to look for the concept P Note that it is not const because TableGather is not const it must be fixed
Returns:
The pHandleSet containing all elements that are member of concept and have their memberLink TV above the given threshold strength and count

Definition at line 1313 of file PLNUtils.cc.

References constitutedSet(), opencog::pln::AtomSpaceWrapper::isSubType(), memberLinkSet(), and OC_ASSERT.

pHandleSet opencog::pln::constitutedSet ( const pHandleSet memberLinks,
AtomSpaceWrapper asw 
)

Return the set of members of a given memberLink set

Parameters:
memberLinks memberLink set
asw AtomSpaceWrapper where to look for the concept P Note that it is not const because TableGather is not const it must be fixed
Returns:
The pHandleSet containing all elements of the memberLink set

Definition at line 1303 of file PLNUtils.cc.

References opencog::pln::AtomSpaceWrapper::getOutgoing().

Here is the caller graph for this function:

Btr<vtree> opencog::pln::convert_all_var2fwvar ( vtree  vt_const,
iAtomSpaceWrapper table 
)

USE THIS IF YOU WISH TO CONVERT VARIABLE_NODEs to FW_VARIABLE_NODEs!

Definition at line 491 of file RuleFunctions.cc.

References _v2h(), bind(), CreateVar(), opencog::for_each(), GET_ASW, getTypeVFun, NMP_HANDLE, NMP_TYPE_NAME, printTree(), rawPrint(), and v2h.

Here is the caller graph for this function:

void opencog::pln::convertTo ( const std::vector< Handle > &  args,
Handle *&  ret 
)

void opencog::pln::convertTo ( const std::set< BoundVertex > &  args,
Handle *&  ret 
)

void opencog::pln::convertTo ( const std::vector< BoundVertex > &  args,
HandleSeq &  ret 
)

void opencog::pln::convertTo ( const std::vector< BoundVertex > &  args,
Handle *&  ret 
)

void opencog::pln::convertTo ( const std::vector< Vertex > &  args,
Handle *&  ret 
)

void opencog::pln::convertTo ( const std::vector< Handle > &  args,
std::auto_ptr< Handle > &  ret 
)

void opencog::pln::convertTo ( const VertexSet &  args,
std::auto_ptr< Handle > &  ret 
)

void opencog::pln::convertTo ( const std::set< BoundVertex > &  args,
std::auto_ptr< Handle > &  ret 
)

void opencog::pln::convertTo ( const std::vector< BoundVertex > &  args,
std::auto_ptr< Handle > &  ret 
)

void opencog::pln::convertTo ( const VertexVector &  args,
std::auto_ptr< Handle > &  ret 
)

void opencog::pln::convertTo ( const std::vector< Vertex > &  args,
std::auto_ptr< Handle > &  ret 
)

void opencog::pln::convertTo ( const vector< Handle > &  args,
Handle *&  ret 
)

Definition at line 406 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const VertexSet &  args,
Handle *&  ret 
)

Definition at line 397 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const set< BoundVertex > &  args,
Handle *&  ret 
)

Definition at line 388 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const vector< BoundVertex > &  args,
HandleSeq &  ret 
)

Definition at line 380 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const vector< BoundVertex > &  args,
Handle *&  ret 
)

Definition at line 371 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const vector< Vertex > &  args,
Handle *&  ret 
)

Definition at line 362 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const VertexVector &  args,
Handle *&  ret 
)

Definition at line 353 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const vector< Handle > &  args,
auto_ptr< Handle > &  ret 
)

Definition at line 345 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const VertexSet &  args,
auto_ptr< Handle > &  ret 
)

Definition at line 336 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const set< BoundVertex > &  args,
auto_ptr< Handle > &  ret 
)

Definition at line 327 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const vector< BoundVertex > &  args,
auto_ptr< Handle > &  ret 
)

Definition at line 318 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const vector< Vertex > &  args,
auto_ptr< Handle > &  ret 
)

Definition at line 309 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

void opencog::pln::convertTo ( const VertexVector &  args,
auto_ptr< Handle > &  ret 
)

Definition at line 300 of file PLNUtils.cc.

References visualise_importance_diffusion::N.

Btr<ModifiedVTree> opencog::pln::convertToModifiedVTree ( pHandle  h,
Btr< vtree vt 
)

Definition at line 523 of file RuleFunctions.cc.

Here is the caller graph for this function:

template<typename V, typename Vit, typename Tit>
void opencog::pln::copy_vars ( V &  vars,
Vit  varsbegin,
Tit  bbvt_begin,
Tit  bbvt_end 
) [inline]

Definition at line 167 of file BackInferenceTreeNode.cc.

References _v2h(), bind(), opencog::copy_if(), getTypeFun, and opencog::inserter().

Here is the caller graph for this function:

pHandle opencog::pln::CreateConceptASSOC ( AtomSpaceWrapper asw,
pHandle  c_h 
)

CreateConceptASSOC is in charge of creating the concept AC such that AC(x) = ASSOC(x, C).

where ASSOC(F, G) = max(P(F|G) − P(F|NOT G), 0)

Here P(F|G) will be measured by SubSet G F

This procedure is used by Intensional Inheritance.

It operates on an AtomSpaceWrapper. If it turns out that creating ASSOC is useful by other modules than PLN the code can be moved to operate over AtomSpace directly.

Parameters:
asw the AtomSpaceWrapper over which the creating takes place
c_h the pHandle of the concept, must be of type or subtype CONCEPT
Returns:
the pHandle containing the concept AC, such that forall x, AC(x) = ASSOC(x, c_h), the name of AC is Name__ASSOC__, where Name is the name of c_h

Definition at line 28 of file ASSOC.cc.

References opencog::pln::AtomSpaceWrapper::addLink(), opencog::pln::AtomSpaceWrapper::addNode(), ASSOC(), ASSOC_suffix, opencog::TruthValue::DEFAULT_TV(), opencog::pln::AtomSpaceWrapper::getHandle(), opencog::pln::AtomSpaceWrapper::getName(), opencog::pln::AtomSpaceWrapper::getOutgoing(), opencog::pln::AtomSpaceWrapper::getTV(), opencog::pln::AtomSpaceWrapper::isSubType(), OC_ASSERT, and PHANDLE_UNDEFINED.

Here is the caller graph for this function:

template<typename C>
void opencog::pln::createPermutation ( vector< C >  seed,
set< vector< C > > &  result,
int  index 
) [inline]

Definition at line 222 of file RuleFunctions.cc.

TruthValue* opencog::pln::CreateTVfromArguments ( const XMLNode &  xml  ) 

Definition at line 166 of file XMLNodeLoader.cc.

References opencog::pln::XMLtag::arguments, opencog::SimpleTruthValue::confidenceToCount(), STLhas, and opencog::pln::XMLNode::TagData().

Here is the caller graph for this function:

Vertex opencog::pln::CreateVar ( iAtomSpaceWrapper atw  )  [related]

Definition at line 77 of file RuleFunctions.cc.

References CreateVar(), and GetRandomString().

Vertex opencog::pln::CreateVar ( iAtomSpaceWrapper atw,
std::string  varname 
) [related]

VariableNodes not memory-managed.

Definition at line 64 of file RuleFunctions.cc.

References opencog::pln::iAtomSpaceWrapper::addNode(), cprintf(), opencog::TruthValue::TRIVIAL_TV(), and varcount.

Here is the caller graph for this function:

template<typename T>
void opencog::pln::delete_op ( T *  r  )  [inline]

Definition at line 39 of file RuleProvider.cc.

template<typename T>
bool opencog::pln::deref_equal ( a,
b 
) [inline]

Definition at line 656 of file PLNUtils.h.

bool opencog::pln::equal ( pHandle  A,
pHandle  B 
)

Definition at line 1228 of file PLNUtils.cc.

Here is the caller graph for this function:

template<typename T>
bool opencog::pln::equal_indirect ( const T &  a,
const T &  b 
) [inline]

Definition at line 519 of file BackInferenceTreeNode.cc.

bool opencog::pln::equal_vectors ( pHandle *  lhs,
int  lhs_arity,
pHandle *  rhs 
)

Definition at line 282 of file PLNUtils.cc.

bool opencog::pln::equalVariableStructure ( const vtree lhs,
const vtree rhs 
)

bool opencog::pln::equalVariableStructure2 ( BBvtree  lhs,
BBvtree  rhs 
)

Definition at line 2121 of file PLNUtils.cc.

std::pair<Handle,Handle> opencog::pln::Equi2ImpLink ( Handle  ) 

Handle opencog::pln::Exist2ForAllLink ( Handle exL  ) 

Here is the caller graph for this function:

bool opencog::pln::existMPin ( const vector< Btr< atom > > &  hs  ) 

Definition at line 876 of file PLNUtils.cc.

References GET_ASW, opencog::pln::AtomSpaceWrapper::inheritsType(), and RESTRICTOR.

Here is the caller graph for this function:

bool opencog::pln::ExpandEvaluationLinks ( vtree target,
iAtomSpaceWrapper destTable 
)

void opencog::pln::expandHandletree ( bool  fullVirtual,
vtree ret,
tree< Vertex >::iterator  ret_top 
)

If virtual link, then we keep expanding

Definition at line 600 of file PLNatom.cc.

References opencog::tree< T, tree_node_allocator >::append_child(), GET_ASW, and opencog::pln::atom::T.

Here is the caller graph for this function:

Btr< ModifiedBoundVTree > opencog::pln::FindMatchingUniversal ( meta  target,
pHandle  ForAllLink,
iAtomSpaceWrapper table 
)

bindsInTarget will later become constraints/pre-bindings of the new BIN. UPDATE: THIS FEATURE WAS CANCELCED: BoundUniversal->bindings = bindsInTarget;

Remove FW_VAR => FW_VAR mappings. WARNING! Potentially goes to infinite loop.

Now: I changed the unifiesTo function so that lhs/rhs binding distinction was blurred.

Todo:
Verify that this is correct: now including bindings on both sides!

Definition at line 613 of file RuleFunctions.cc.

References convert_all_var2fwvar(), convertToModifiedVTree(), cprintf(), opencog::for_each(), insert_with_consistency_check_bindingsVTreeT(), make_vtree(), NMP_HANDLE, NMP_TYPE_NAME, pr2(), NMPrinter::print(), STLhas, unifiesTo(), v, and v2h.

Here is the caller graph for this function:

Btr< set<Btr<ModifiedBoundVTree> > > opencog::pln::FindMatchingUniversals ( meta  target,
iAtomSpaceWrapper table 
)

Btr< std::set<Btr<ModifiedBoundVTree> > > opencog::pln::FindMatchingUniversals ( Btr< vtree target,
iAtomSpaceWrapper table 
)

Here is the caller graph for this function:

void opencog::pln::finger_print_test ( vtree v  ) 

Definition at line 152 of file Tester.cc.

References opencog::pln::BoundVTree::getFingerPrint().

template<typename T, typename T2>
T opencog::pln::first ( const std::pair< T, T2 > &  p  )  [inline]

Definition at line 705 of file PLNUtils.h.

Here is the caller graph for this function:

void opencog::pln::foo2 (  ) 

Whether one can produce 'to' from 'from' by some variable substitutions.

Definition at line 1861 of file PLNUtils.cc.

void opencog::pln::foo_pretest (  ) 

Definition at line 121 of file Tester.cc.

void opencog::pln::footest (  ) 

Definition at line 122 of file Tester.cc.

meta opencog::pln::ForceAllLinksVirtual ( meta  _target  ) 

Definition at line 2151 of file PLNUtils.cc.

References ForceVirtual().

Here is the caller graph for this function:

meta opencog::pln::ForceRootLinkVirtual ( meta  _target  ) 

void opencog::pln::ForceVirtual ( meta  _target,
vtree::iterator vit 
)

void opencog::pln::getAtomTreeString ( const atom a,
string &  outbuf 
)

void opencog::pln::getAtomTreeString ( const atom &  a,
std::string &  outbuf 
)

Here is the caller graph for this function:

FitnessEvaluatorT opencog::pln::getFitnessEvaluator ( std::string  name  ) 

Here is the caller graph for this function:

FitnessEvaluatorT opencog::pln::getFitnessEvaluator ( string  name  ) 

Definition at line 1360 of file PLNUtils.cc.

References BEST, PLN_FITNESS_BEST, PLN_FITNESS_RANDOM, and PLN_FITNESS_SOFTMAX.

Here is the caller graph for this function:

bool opencog::pln::getLargestIntersection ( const std::set< pHandle > &  keyelem_set,
const std::set< pHandle > &  link_set,
pHandle &  result 
)

bool opencog::pln::getLargestIntersection ( const set< pHandle > &  keyelem_set,
const set< pHandle > &  link_set,
pHandle &  result 
)

Definition at line 894 of file PLNUtils.cc.

References GET_ASW, opencog::pln::AtomSpaceWrapper::getArity(), opencog::pln::AtomSpaceWrapper::getOutgoing(), LOG, and PHANDLE_UNDEFINED.

Here is the caller graph for this function:

bool opencog::pln::getLargestIntersection2 ( const set< atom, lessatom > &  keyelem_set,
const pHandleSeq &  link_set,
std::vector< Btr< atom > > &  result 
)

Definition at line 926 of file PLNUtils.cc.

References GET_ASW, and opencog::pln::AtomSpaceWrapper::isType().

bool opencog::pln::getLargestIntersection2 ( const std::set< atom, lessatom > &  keyelem_set,
const std::vector< pHandle > &  link_set,
std::vector< boost::shared_ptr< atom > > &  result 
)

Here is the caller graph for this function:

std::string opencog::pln::GetRandomString ( int  size  ) 

Definition at line 1039 of file PLNUtils.cc.

References cprintf().

Here is the caller graph for this function:

Handle opencog::pln::HandleXMLInputNode ( iAtomSpaceWrapper *  table,
const XMLNode &  xml,
const set< string > &  prev_free_names,
std::map< string, string > &  returning_names,
std::map< string, string >  newVarName 
)

A special treatment is given to Listed ForAlls. Others, just add to da std::vector.

The next level's names will be forgotten, unless next level was ListLink.

Definition at line 286 of file XMLNodeLoader.cc.

References Add1LinkFromXML(), Add1NodeFromXML(), GET_ASW, helper1, helper2, helper3, LOG, opencog::pln::XMLtag::name, opencog::pln::XMLNode::Sub(), opencog::pln::XMLNode::TagData(), xml_level, and XMLITERATE.

Here is the caller graph for this function:

void opencog::pln::infer ( Handle  h,
int &  steps,
bool  setTarget 
)

Does steps inference steps on target h. Optionally sets the target used in the PLN cogserver commands. Intended for use by the pln-bc Scheme command; this is currently set up for practical use rather than testing use, and as such will not stop at the first result it finds.

Parameters:
h The handle to do inference on (a normal handle, not a PLN handle)
steps Takes the maximum number of steps allowed, and stores the number of steps performed
setTarget If true, the BIT created here will be/replace the one used with the 'pln' cogserver command.

Definition at line 220 of file PLNModule.cc.

References ASW(), opencog::config(), SPCTools::f, ForceAllLinksVirtual(), opencog::Config::get_bool(), getFitnessEvaluator(), opencog::pln::BITNodeRoot::infer(), PLN_FITNESS_BEST, opencog::pln::BITNode::printResults(), and opencog::pln::AtomSpaceWrapper::realToFakeHandle().

Here is the caller graph for this function:

void opencog::pln::InitAxiomSet ( string  premiseFile  ) 

void opencog::pln::InitPLNTests (  ) 

Definition at line 172 of file Tester.cc.

References haxx::ArchiveTheorems, currentDebugLevel, test::logfile, and haxx::printRealAtoms.

Here is the caller graph for this function:

template<typename T1, typename T2, typename T3>
void opencog::pln::insert_with_consistency_check ( std::map< T1, T2 > &  m,
T3  rstart,
T3  rend 
) [inline]

haxx::

Definition at line 413 of file PLNUtils.h.

References toVertexMap().

Here is the caller graph for this function:

void opencog::pln::insert_with_consistency_check_bindingsVTreeT ( map< pHandle, vtree > &  m,
map< pHandle, vtree >::iterator  rstart,
map< pHandle, vtree >::iterator  rend 
)

Definition at line 603 of file RuleFunctions.cc.

void opencog::pln::insert_with_consistency_check_bindingsVTreeT ( std::map< pHandle, vtree > &  m,
std::map< pHandle, vtree >::iterator  rstart,
std::map< pHandle, vtree >::iterator  rend 
)

Here is the caller graph for this function:

void opencog::pln::insertAllANDCombinations ( set< atom, lessatom_ignoreVarNameDifferences head,
vector< atom tail,
set< atom, lessatom_ignoreVarNameDifferences > &  AND_combinations 
)

Combinations without natom

Combinations with natom

Definition at line 183 of file RuleFunctions.cc.

References opencog::pln::atom::hs.

bool opencog::pln::IsIdenticalHigherConfidenceAtom ( pHandle  a,
pHandle  b 
)

Definition at line 2299 of file PLNUtils.cc.

References SPCTools::f, GET_ASW, opencog::TruthValue::getConfidence(), opencog::pln::AtomSpaceWrapper::getTV(), and make_vtree().

Here is the caller graph for this function:

bool opencog::pln::isVariableAtom ( string  name,
Type  type,
int  arity 
) [inline]

Check if the atom with the given properties is a template variable. There are 3 types of variables: 1) FWVariableNodes => anything 2) Any type of node with no name => any node of that type 3) Any type of link with no arity => any link of that type

Definition at line 1627 of file PLNUtils.cc.

References GET_ASW, and opencog::pln::AtomSpaceWrapper::inheritsType().

Here is the caller graph for this function:

template<Type T, typename ATW>
pHandle opencog::pln::Join ( pHandle  h1,
pHandle  h2,
ATW &  atw 
) [inline]

Definition at line 177 of file RuleFunctions.cc.

template<Type T>
pHandle opencog::pln::Join ( pHandle *  h,
int  N,
AtomSpaceWrapper atw 
) [inline]

Handle opencog::pln::LoadXMLFile ( iAtomSpaceWrapper *  table,
string  fname 
)

Handle opencog::pln::LoadXMLInput ( iAtomSpaceWrapper *  table,
string  buf 
)

Definition at line 60 of file XMLNodeLoader.cc.

References __AND, __NOT, __OR, opencog::classserver(), ELEMENT_NODE, HandleXMLInputNode(), HAS_R, IN_R, INSTANCEOF_R, L, LOG, opencog::pln::XMLNode::ok, and RESTRICTOR.

Here is the caller graph for this function:

void opencog::pln::MacroRuleTest (  ) 

pHandle opencog::pln::make_real ( vtree vt  ) 

Definition at line 1905 of file PLNUtils.cc.

References opencog::pln::AtomSpaceWrapper::addAtom(), ASW(), and opencog::TruthValue::TRIVIAL_TV().

Here is the caller graph for this function:

string opencog::pln::make_subst_buf ( const atom a  ) 

string opencog::pln::make_subst_buf ( const BoundVertex a  ) 

Definition at line 2262 of file PLNUtils.cc.

References opencog::pln::weak_atom< ATOM_REPRESENTATION_T >::bindings, condensed_form(), GET_ASW, and opencog::pln::AtomSpaceWrapper::getName().

Here is the caller graph for this function:

vtree opencog::pln::make_vtree ( pHandle  h  ) 

Construct a vtree around Handle h.

Todo:
haxx:: Re-enable cache. It must simply be updated so that reset takes it into account.

Definition at line 1937 of file PLNUtils.cc.

References opencog::tree< T, tree_node_allocator >::begin(), makeHandletree(), printTree(), and rawPrint().

Here is the caller graph for this function:

void opencog::pln::makeHandletree ( pHandle  h,
bool  fullVirtual,
tree< Vertex > &  ret 
)

Definition at line 594 of file PLNatom.cc.

References opencog::tree< T, tree_node_allocator >::begin(), expandHandletree(), and opencog::tree< T, tree_node_allocator >::set_head().

Here is the caller graph for this function:

Rule::setOfMPs opencog::pln::makeSingletonSet ( Btr< Rule::MPs >  mp  ) 

Rule::setOfMPs opencog::pln::makeSingletonSet ( Rule::MPs &  mp  ) 

Definition at line 83 of file RuleFunctions.cc.

Here is the caller graph for this function:

float opencog::pln::max ( float  a,
float  b 
)

Max of two floats.

Definition at line 59 of file RuleFunctions.cc.

Here is the caller graph for this function:

pHandleSet opencog::pln::memberLinkSet ( pHandle  concept,
strength_t  min_membershipStrength,
count_t  min_membershipCount,
AtomSpaceWrapper asw 
)

Return the set of membership links of a given concept node (or inheriting concept)

Parameters:
concept The pHandle of the concept node (or inheriting concept)
min_membershipStrength The minimum strength of the membership to be taken in consideration
min_membershipCount The minimum count of the membership
asw AtomSpaceWrapper where to look for the concept Note that it is not const because TableGather is not const it must be fixed
Returns:
The pHandleSet containing all memberLinks of members of P and have their TV above the given threshold strength and count

Definition at line 1273 of file PLNUtils.cc.

References equal(), opencog::TruthValue::getCount(), opencog::TruthValue::getMean(), opencog::pln::AtomSpaceWrapper::getOutgoing(), opencog::pln::AtomSpaceWrapper::getTV(), opencog::pln::AtomSpaceWrapper::isSubType(), OC_ASSERT, and tr.

Here is the caller graph for this function:

bool opencog::pln::MPunify1 ( tree< Vertex > &  lhs_t,
tree< Vertex >::iterator  lhs_ti,
const atom rhs,
bindingsT &  bindings,
std::set< hsubst > **  forbiddenBindings = NULL,
bool *  restart = NULL,
const Type  VarT = FW_VARIABLE_NODE 
)

bool opencog::pln::MPunify1 ( tree< Vertex > &  lhs_t,
tree< Vertex >::iterator  lhs_ti,
const atom rhs,
bindingsT &  bindings,
set< hsubst > **  forbiddenBindings,
bool *  restart,
const Type  VarT 
)

bool opencog::pln::MPunifyHandle ( pHandle  lhs,
const atom rhs,
bindingsT &  bindings,
std::set< hsubst > **  forbiddenBindings = NULL,
bool *  restart = NULL,
const Type  VarT = FW_VARIABLE_NODE 
)

Todo:
Not defined anywhere, but probably should be implemented.

bool opencog::pln::MPunifyHandle ( pHandle  lhs,
const atom rhs,
bindingsT &  bindings,
set< hsubst > **  forbiddenBindings,
bool *  restart,
const Type  VarT 
)

bool opencog::pln::MPunifyVector ( tree< Vertex > &  lhs_t,
tree< Vertex >::iterator  lhs_top,
const std::vector< Btr< atom > > &  rhsv,
bindingsT &  bindings,
std::set< hsubst > **  forbiddenBindings = NULL,
bool *  restart = NULL,
const Type  VarT = FW_VARIABLE_NODE 
)

bool opencog::pln::MPunifyVector ( tree< Vertex > &  lhs_t,
tree< Vertex >::iterator  lhs_top,
const vector< Btr< atom > > &  rhsv,
bindingsT &  bindings,
set< hsubst > **  forbiddenBindings,
bool *  restart,
const Type  VarT 
)

atom* opencog::pln::neBoundVertexWithNewType ( Handle  h,
Type  T 
)

Here is the caller graph for this function:

template<typename T>
std::vector<T*> opencog::pln::NewCartesianProduct ( std::vector< std::vector< T > > &  matrix  )  [inline]

template<typename C>
set<vector<C> >* opencog::pln::newCreatePermutations ( vector< C >  seed  )  [inline]

Definition at line 243 of file RuleFunctions.cc.

static const int opencog::pln::NUMBER_OF_RULES ( ((int) Exist)+  1  )  [static]

Total number of rules in PLN (Not necessarily the number that are active though).

Handle opencog::pln::OR2ANDLink ( Handle andL  ) 

Here is the caller graph for this function:

template<typename T1, typename T2>
bool opencog::pln::overlap ( T1 &  abegin,
T1 &  aend,
T2 &  b 
) [inline]

Definition at line 740 of file PLNUtils.h.

References STLhas, and T1.

Rule::setOfMPs opencog::pln::PartitionRule_o2iMetaExtra ( meta  outh,
bool &  overrideInputFilter,
Type  OutLinkType 
)

void opencog::pln::pr ( std::pair< pHandle, pHandle >  i  ) 

void opencog::pln::pr ( pair< pHandle, pHandle >  i  ) 

void opencog::pln::pr2 ( std::pair< pHandle, vtree i  ) 

Ok, you're not allowed to laugh at the following. It's a collection of my various quick-hack binding printers from the last 6 months.

Definition at line 2228 of file PLNUtils.cc.

References cprintf(), and rawPrint().

Here is the caller graph for this function:

void opencog::pln::pr3 ( pair< pHandle, pHandle >  i  ) 

void opencog::pln::print_binding ( std::pair< Handle, vtree i  ) 

Definition at line 2234 of file PLNUtils.cc.

References rawPrint().

void opencog::pln::print_progress (  ) 

Definition at line 2180 of file PLNUtils.cc.

References cprintf(), and currentDebugLevel.

Here is the caller graph for this function:

void opencog::pln::printAtomTree ( const atom a,
int  level = 0,
int  LogLevel = 5 
)

void opencog::pln::printBinding ( const std::pair< const Handle, Handle p  ) 

void opencog::pln::printBinding ( const std::pair< string, Handle p  ) 

Definition at line 2240 of file PLNUtils.cc.

References cprintf().

void opencog::pln::printLeveledString ( int  level,
string  str 
)

Definition at line 1204 of file PLNUtils.cc.

References LOG, and repeatc().

string opencog::pln::printNode1 ( const atom a,
int  level,
int  LogLevel 
)

string opencog::pln::printNode1 ( pHandle  h,
int  level,
int  LogLevel 
)

void opencog::pln::printSubsts ( BoundVertex  a,
int  LogLevel 
)

Definition at line 2257 of file PLNUtils.cc.

References LOG, and make_subst_buf().

Here is the caller graph for this function:

std::string opencog::pln::printTree ( pHandle  h,
int  level,
int  LogLevel 
)

void opencog::pln::prn ( tree< Btr< atom > > &  tr  ) 

Remove the explicit outgoingset (hs) and replace it with a tree structure.

Definition at line 554 of file PLNatom.cc.

References tr, and Type2Name().

bool opencog::pln::RealHandle ( meta  _target,
Btr< std::set< BoundVertex > >  result_set 
)

bool opencog::pln::RealHandle ( meta  _target,
Btr< set< BoundVertex > >  result_set 
)

void opencog::pln::recursiveBind ( Vertex &  v,
const map< pHandle, pHandle > &  binds 
)

Definition at line 1911 of file PLNUtils.cc.

References cprintf().

Here is the caller graph for this function:

void opencog::pln::removeRecursion ( std::vector< Btr< set< BoundVertex > > > &  multi_input_vector  ) 

void opencog::pln::removeRecursionFromHandleHandleMap ( bindingsT &  ret_bindings  ) 

Definition at line 1997 of file PLNUtils.cc.

References make_real(), and make_vtree().

Here is the caller graph for this function:

template<typename T, typename T2>
void opencog::pln::removeRecursionFromMap ( mbegin,
mend 
) [inline]

The replace call invalidates the iterator. Re-initialize:

Definition at line 711 of file PLNUtils.h.

References _v2h(), bind(), cprintf(), and T2.

template<typename MapIteratorT, typename MapItemT>
void opencog::pln::removeRecursionFromMapSimple ( MapIteratorT  mbegin,
MapIteratorT  mend 
) [inline]

Definition at line 757 of file PLNUtils.h.

References bind(), and cprintf().

void opencog::pln::RunPLNTest ( Btr< PLNTest t  ) 

void opencog::pln::RunPLNTests (  ) 

You can run the tests multiple times, which makes sense if the heuristics function is not deterministic (eg. SoftMax)

Definition at line 207 of file Tester.cc.

References AllTestsInferenceNodes, DETERMINISTIC, SPCTools::f, FitnessEvaluator, InitPLNTests(), INstatsV, INstatsVT, RANDOM, RunPLNTestsOnce(), SOFTMAX, temperature, temperatures, temperaturesN, and v.

void opencog::pln::RunPLNTestsOnce (  ) 

Basic spawning test

Test for multiple roots spawning

Test Generalization for VARIABLE_SCOPE_LINK

Test Generalization for FORALL_LINK

Definition at line 380 of file Tester.cc.

References SPCTools::f, GET_ASW, getCount(), InitAxiomSet(), INstats, INstatsV, makemeta, maketest, mva, and NewNode.

Here is the caller graph for this function:

Handle opencog::pln::satisfyingSet ( Handle  h  ) 

Here is the caller graph for this function:

bool opencog::pln::satSetTest (  ) 

static number_t opencog::pln::scaleLU ( number_t  value,
number_t  L_,
number_t  U_ 
) [static]

Definition at line 53 of file FormulasIndefinite.cc.

Here is the caller graph for this function:

template<typename T, typename T2>
T2 opencog::pln::second ( const std::pair< T, T2 > &  p  )  [inline]

Definition at line 700 of file PLNUtils.h.

Here is the caller graph for this function:

static void opencog::pln::setSaveDeductionLookupTable ( bool  b  )  [static]

Definition at line 69 of file FormulasIndefinite.h.

References SAVE_DEDUCTION_LOOKUP_TABLE.

static void opencog::pln::setUseDeductionLookupTable ( bool  b  )  [static]

Definition at line 73 of file FormulasIndefinite.h.

References USE_DEDUCTION_LOOKUP_TABLE.

Handle opencog::pln::singular ( HandleSeq  hs  ) 

Definition at line 1294 of file AtomSpaceWrapper.cc.

References opencog::Handle::UNDEFINED.

template<typename T, typename T2>
bool opencog::pln::stlhasi ( const T &  c,
const T2 &  k 
) [inline]

Definition at line 551 of file RuleFunctions.cc.

bool opencog::pln::substitutableTo ( pHandle  from,
pHandle  to,
std::map< pHandle, pHandle > &  bindings 
)

Here is the caller graph for this function:

bool opencog::pln::substitutableTo ( pHandle  from,
pHandle  to,
map< pHandle, pHandle > &  bindings 
)

Whether one can produce 'to' from 'from' by some variable substitutions.

Definition at line 1887 of file PLNUtils.cc.

bool opencog::pln::substitutableTo ( pHandle  from,
pHandle  to,
map< string, pHandle > &  bindings 
)

Definition at line 1869 of file PLNUtils.cc.

bool opencog::pln::substitutableTo ( atom from,
atom to,
map< string, atom > &  bindings,
const set< subst > &  forbiddenBindings,
std::pair< string, atom > **  restart_from,
std::pair< string, atom > **  restart_to 
)

template<typename T>
Btr<std::map<Vertex, Vertex> > opencog::pln::toVertexMap ( mbegin,
mend 
) [inline]

We may have a case like: First bindings: 64 => Britney2:ConceptNode (11) <1.000000, 0.000000> [209] 65 => Osama2:ConceptNode (11) <1.000000, 0.000000> [210] 88 => :EvaluationLink (77) <0.800000, 0.200000> [212] friendOf:PredicateNode (26) <1.000000, 0.000000> [203] :ListLink (32) <1.000000, 0.000000> [211] Britney2:ConceptNode (11) <1.000000, 0.000000> [209] Osama2:ConceptNode (11) <1.000000, 0.000000> [210] 2nd bindings: 88 => :EvaluationLink (77) <1.000000, 0.000000> [281] friendOf:PredicateNode (26) <1.000000, 0.000000> [203] :ListLink (32) <1.000000, 0.000000> [280] $AAAAAAAAD:FWVariableNode (146) <1.000000, 0.000000> [264] $AAAAAAAAE:FWVariableNode (146) <1.000000, 0.000000> [265]

which must be found consistent when these guys are combined!

Definition at line 357 of file PLNUtils.h.

References combo::id::next.

Here is the caller graph for this function:

template<class InputIterator, class OutputIterator, class UnaryOperation, class UnaryPredicate>
OutputIterator opencog::pln::transform_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
UnaryOperation  op,
UnaryPredicate  test 
) [inline]

Definition at line 457 of file RuleFunctions.cc.

References combo::test().

template<Type TRANSITIVE_LINK_TYPE, typename containerT, typename const_iteratorT>
Vertex opencog::pln::transitive_produce ( const containerT &  chain,
const_iteratorT  next_it,
Vertex  last_result = (Handle)NULL 
) [inline]

Definition at line 2277 of file PLNUtils.cc.

References _v2h(), and ASW().

template<typename TransformerT>
Btr<vtree> opencog::pln::tree_transform ( vtree vt_const,
TransformerT  transformer 
) [inline]

Definition at line 301 of file PLNUtils.h.

References v.

Here is the caller graph for this function:

static void opencog::pln::truncate ( number_t value  )  [static]

Definition at line 60 of file FormulasIndefinite.cc.

Here is the caller graph for this function:

template<typename BindKeyT, typename BindKeyOpT, typename BindItT>
bool opencog::pln::ttsubstitutableTo ( pHandle  from,
pHandle  to,
map< BindKeyT, pHandle > &  bindings,
BindKeyOpT  bind_key_op 
) [inline]

const char * opencog::pln::Type2Name ( Type  t  ) 

Definition at line 1894 of file PLNUtils.cc.

References opencog::classserver(), and opencog::ClassServer::getTypeName().

Here is the caller graph for this function:

bool opencog::pln::unifiesTo ( const vtree lhs,
const vtree rhs,
std::map< pHandle, vtree > &  Lbindings,
std::map< pHandle, vtree > &  Rbindings,
bool  allow_rhs_binding,
Type  VarType = FW_VARIABLE_NODE 
)

bool opencog::pln::unifiesTo ( const vtree lhs,
const vtree rhs,
map< pHandle, vtree > &  Lbindings,
map< pHandle, vtree > &  Rbindings,
bool  allow_rhs_binding,
Type  VarType 
)

Definition at line 2532 of file PLNUtils.cc.

References opencog::tree< T, tree_node_allocator >::begin(), and unifiesTo().

bool opencog::pln::unifiesTo ( const vtree lhs_t,
const vtree rhs_t,
vtree::sibling_iterator  ltop,
vtree::sibling_iterator  rtop,
map< pHandle, vtree > &  Lbindings,
map< pHandle, vtree > &  Rbindings,
bool  allow_rhs_binding,
Type  VarType 
)

bool opencog::pln::unifiesWithVariableChangeTo ( const vtree lhs_t,
const vtree rhs_t,
std::map< pHandle, pHandle > &  bindings 
)

bool opencog::pln::unifiesWithVariableChangeTo ( const vtree lhs_t,
const vtree rhs_t,
map< pHandle, pHandle > &  bindings 
)

bool opencog::pln::unifiesWithVariableChangeTo ( const vtree lhs_t,
const vtree rhs_t,
vtree::sibling_iterator  ltop,
vtree::sibling_iterator  rtop,
map< pHandle, pHandle > &  bindings 
)

pHandle opencog::pln::UnorderedCcompute ( iAtomSpaceWrapper destTable,
Type  linkT,
const ArityFreeFormula< TruthValue, TruthValue * > &  fN,
pHandle *  premiseArray,
const int  n,
pHandle  CX = PHANDLE_UNDEFINED 
)

Release

Definition at line 251 of file RuleFunctions.cc.

References opencog::pln::iAtomSpaceWrapper::addLink(), GET_ASW, and RuleResultFreshness.

Here is the caller graph for this function:

bool opencog::pln::UnprovableType ( Type  T  ) 

haxx::

Todo:
VariableNodes not memory-managed.

Definition at line 159 of file RuleFunctions.cc.

References GET_ASW.

bool opencog::pln::valid ( Type  T,
HandleSeq &  children 
)

Definition at line 156 of file XMLNodeLoader.cc.

Here is the caller graph for this function:

void opencog::pln::VariableMPforms ( const atom &  src,
std::set< atom, lessatom_ignoreVarNameDifferences > &  res,
std::set< subst > *  forbiddenBindings 
)

template<typename T>
bool opencog::pln::vectorHas ( std::vector< T >  box,
key 
) [inline]

Definition at line 509 of file PLNUtils.h.

template<typename VContainerT, typename OutIterT>
OutIterT opencog::pln::Vertices_TO_VtreeProviders ( const VContainerT &  vs,
OutIterT  out 
) [inline]

Definition at line 116 of file RuleApp.h.

References v.

template<typename VTPContainerT, typename OutIterT>
OutIterT opencog::pln::VtreeProviders_TO_BoundVertices ( const VTPContainerT &  vtps,
OutIterT  out 
) [inline]

bool opencog::pln::within ( float  a,
float  b,
float  diff 
)

Definition at line 290 of file PLNUtils.cc.

References d().

Here is the caller graph for this function:


Variable Documentation

Definition at line 1883 of file BackInferenceTreeNode.cc.

long opencog::pln::_ttt = 0 [static]

Definition at line 2179 of file PLNUtils.cc.

Definition at line 180 of file PLNShell.cc.

Definition at line 1555 of file BackInferenceTreeNode.cc.

Definition at line 142 of file Formulas.h.

const std::string opencog::pln::ASSOC_suffix = "__ASSOC__"

Definition at line 33 of file ASSOC.h.

Definition at line 37 of file PLNatom.cc.

bool opencog::pln::bigcounter = true [static]

Definition at line 1964 of file BackInferenceTreeNode.cc.

int opencog::pln::count111 = 0 [static]

Definition at line 651 of file BackInferenceTreeNode.cc.

Definition at line 1027 of file PLNUtils.cc.

Definition at line 152 of file XMLNodeLoader.cc.

const float opencog::pln::DefaultNodeProbability = 1 / DefaultU

Definition at line 166 of file Formulas.h.

Definition at line 152 of file BackInferenceTreeNode.cc.

Definition at line 161 of file Formulas.h.

bool opencog::pln::foo42 = false

Definition at line 170 of file Tester.cc.

Definition at line 611 of file RuleFunctions.cc.

Definition at line 144 of file Formulas.h.

Definition at line 140 of file Formulas.h.

const int opencog::pln::FWD_CHAIN_MAX_APPS = 100 [static]

Definition at line 32 of file ForwardChainer.h.

const int opencog::pln::FWD_CHAIN_MAX_FILL = 50 [static]

Definition at line 36 of file ForwardChainer.h.

const float opencog::pln::FWD_CHAIN_MIN_CONFIDENCE = 0.4f [static]

Definition at line 33 of file ForwardChainer.h.

const float opencog::pln::FWD_CHAIN_PROB_GLOBAL = 0.3f [static]

Definition at line 35 of file ForwardChainer.h.

const float opencog::pln::FWD_CHAIN_PROB_STACK = 0.7f [static]

Definition at line 34 of file ForwardChainer.h.

Definition at line 181 of file PLNShell.cc.

int opencog::pln::helper1 = 0 [static]

Definition at line 284 of file XMLNodeLoader.cc.

int opencog::pln::helper2 = 0 [static]

Definition at line 284 of file XMLNodeLoader.cc.

int opencog::pln::helper3 = 0 [static]

Definition at line 284 of file XMLNodeLoader.cc.

Definition at line 64 of file FormulasIndefinite.h.

Definition at line 163 of file Formulas.h.

Definition at line 164 of file Formulas.h.

Definition at line 38 of file PLNatom.cc.

Definition at line 160 of file Formulas.h.

const unsigned int opencog::pln::mapOffset = NOTYPE+1 [static]

Definition at line 46 of file AtomLookupProvider.h.

const int opencog::pln::MAX_A = 10

Definition at line 51 of file DeductionLookupTable.h.

Definition at line 54 of file DeductionLookupTable.h.

Definition at line 52 of file DeductionLookupTable.h.

Definition at line 55 of file DeductionLookupTable.h.

Definition at line 53 of file DeductionLookupTable.h.

Definition at line 746 of file PLNatom.cc.

Definition at line 159 of file Formulas.h.

const float opencog::pln::MIN_CONFIDENCE = 0.0000001f

Definition at line 489 of file PLNUtils.cc.

const float opencog::pln::MIN_CONFIDENCE_FOR_RULE_APPLICATION = 0.00001f [static]

Definition at line 153 of file BackInferenceTreeNode.cc.

Definition at line 38 of file SubsetEvalRule.cc.

Definition at line 37 of file SubsetEvalRule.cc.

int opencog::pln::more_count = 0 [static]

Definition at line 175 of file BackInferenceTreeNode.cc.

std::map<nocase_string, int> opencog::pln::name2type

Definition at line 39 of file XMLNodeLoader.cc.

std::map<std::string, Handle> opencog::pln::nodenames

Definition at line 41 of file XMLNodeLoader.cc.

unsigned long opencog::pln::now_interval_len = 50000

Definition at line 34 of file LookupRule.cc.

Definition at line 143 of file Formulas.h.

Definition at line 157 of file BackInferenceTreeNode.cc.

Definition at line 158 of file Tester.cc.

const bool opencog::pln::PREVENT_LOOPS = false

Definition at line 154 of file BackInferenceTreeNode.cc.

Definition at line 86 of file Tester.cc.

gsl_rng* opencog::pln::rng_ = gsl_rng_alloc (gsl_rng_mt19937)

Definition at line 39 of file FormulasIndefinite.cc.

Definition at line 28 of file ANDRuleSimple.h.

Definition at line 66 of file FormulasIndefinite.h.

Definition at line 198 of file Tester.cc.

Initial value:

 {    0.00005, 0.00007, 10,
                            0.0001, 0.0003, 0.0005,
                            0.001, 0.003, 0.005,
                            0.01, 0.03, 0.05,
                            0.1, 0.3, 0.5,
                            1, 3, 5 }

Definition at line 199 of file Tester.cc.

Definition at line 205 of file Tester.cc.

map<int, Btr<tree<Vertex> > > opencog::pln::tests

Definition at line 1 of file TestTargets.h.

const float opencog::pln::TV_MIN = 0.000001f

Definition at line 147 of file Formulas.h.

Definition at line 40 of file CustomCrispUnificationRule.cc.

Definition at line 67 of file FormulasIndefinite.h.

This cache apparently gives a 30% speed up when active.

Definition at line 150 of file BackInferenceTreeNode.cc.

Todo:
This variable is modified but not used anywhere

Definition at line 20 of file PLNGlobals.cc.

Definition at line 43 of file XMLNodeLoader.cc.


Generated on Fri Dec 4 23:24:48 2009 for OpenCog Framework by  doxygen 1.5.6