25#ifndef FUNCTIONINDEX_HPP
26#define FUNCTIONINDEX_HPP
32#include<unordered_map>
34#include "Function.hpp"
35#include "FunctionHash.hpp"
42using std::unordered_map;
46using FunIndexType = pair<string, Arity>;
47using FunMapType = pair<FunIndexType, Function*>;
Basic representation of functions.
Mechanism for looking after functions.
unordered_map< pair< string, Arity >, Function *, fun_hash > name_index
Fast lookup from name/arity to pointer to the Function.
Arity find_minimum_arity() const
Find the smallest arity appearing for any Function in the index.
size_t get_size() const
Self-explanatory.
ID next_index
keep track of ids for adding new Functions.
Arity find_maximum_arity() const
Find the largest arity appearing for any Function in the index.
Function * find_function(const string &, Arity)
Look up a stored Function by name and arity.
Function * add_function(const string &, Arity)
Add a new function to the index.
uint32_t skolem_function_number
Automate the naming of Skolem functions.
vector< Function * > funs
Pointers to all the Functions used.
FunctionIndex(const FunctionIndex &)=delete
As usual, trying to copy one of these is a really bad idea.
Function * operator[](size_t i)
Access to pointers to Functions, but don't mess with them!
Function * make_skolem_function(Arity)
Add a new Skolem function. Naming is automatic.
Hashing for functions using the Boost library for hashing.