summaryrefslogtreecommitdiff
path: root/src/util/sort_inference.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2013-10-02 14:22:36 -0500
committerTianyi Liang <tianyi-liang@uiowa.edu>2013-10-03 10:55:14 -0500
commitb663c658c80cee918afe37222e62dd1e5db33f5c (patch)
tree0d440c65b6454b03a4e1f4820ed3e34623edc870 /src/util/sort_inference.h
parent8f29e55e2d508872234fe811bccf68ffc235d5a4 (diff)
Added support for converting unsorted problems to multi-sorted problems via sort inference and monotonicity. Minor cleanup.
Diffstat (limited to 'src/util/sort_inference.h')
-rw-r--r--src/util/sort_inference.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/util/sort_inference.h b/src/util/sort_inference.h
index 8f0fc5e9f..cd80f57d8 100644
--- a/src/util/sort_inference.h
+++ b/src/util/sort_inference.h
@@ -31,7 +31,8 @@ private:
//all subsorts
std::vector< int > d_sub_sorts;
std::map< int, bool > d_non_monotonic_sorts;
- void recordSubsort( int s );
+ std::map< TypeNode, std::vector< int > > d_type_sub_sorts;
+ void recordSubsort( TypeNode tn, int s );
public:
class UnionFind {
public:
@@ -79,20 +80,21 @@ private:
std::map< Node, Node > d_symbol_map;
//mapping from constants to new symbols
std::map< TypeNode, std::map< Node, Node > > d_const_map;
- //number of subtypes generated
- std::map< TypeNode, int > d_subtype_count;
//helper functions for simplify
TypeNode getOrCreateTypeForId( int t, TypeNode pref );
TypeNode getTypeForId( int t );
Node getNewSymbol( Node old, TypeNode tn );
//simplify
Node simplify( Node n, std::map< Node, Node >& var_bound );
-
+ //make injection
+ Node mkInjection( TypeNode tn1, TypeNode tn2 );
+ //reset
+ void reset();
public:
SortInference() : sortCount( 1 ){}
~SortInference(){}
- void simplify( std::vector< Node >& assertions, bool doRewrite = false );
+ bool simplify( std::vector< Node >& assertions );
//get sort id for term n
int getSortId( Node n );
//get sort id for variable of quantified formula f
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback