25#ifndef PREDICATEINDEX_HPP
26#define PREDICATEINDEX_HPP
32#include<unordered_map>
34#include "Predicate.hpp"
35#include "FunctionHash.hpp"
39using std::unordered_map;
45using PredIndexType = pair<string, Arity>;
46using PredMapType = pair<PredIndexType, Predicate*>;
67 unordered_map<PredIndexType, Predicate*, fun_hash>
name_index;
Basic representation of predicates: here just names, ids and arities.
Management of Predicate objects.
vector< Predicate * > preds
Pointers to all predicates.
ID next_definitional_id
Automatically generate IDs for definitional predicates.
Predicate * make_definitional_predicate(Arity arity)
Make a new, unique definitional predicate.
Predicate * find_predicate(const string &, Arity)
Self-explanatory.
Predicate * add_predicate(const string &, Arity)
Self-explanatory.
bool true_false_added() const
Sometimes $true and $false appear in the TPTP collection. See if you included them during the parsing...
size_t get_num_preds() const
Basic get method.
ID next_index
Automatically generate IDs.
Predicate * operator[](size_t i)
Access to Predicate pointers, but don't mess with them!
Arity find_maximum_arity() const
Find the largest arity appearing in the index.
PredicateIndex(const PredicateIndex &)=delete
Copying these is a terrible idea.
unordered_map< PredIndexType, Predicate *, fun_hash > name_index
Fast lookup using name and arity.