summaryrefslogtreecommitdiff
path: root/src/theory/strings/skolem_cache.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-11-21 14:44:44 -0600
committerGitHub <noreply@github.com>2018-11-21 14:44:44 -0600
commit2c05402119dba7e90e24621c5768514ab2f5042c (patch)
treecec74ac8b51d20c622205bfa39e6ef6e44d510dc /src/theory/strings/skolem_cache.h
parentb3b1fffb390d19312227d7095fb404e9e0447d95 (diff)
Support string replace all (#2704)
Diffstat (limited to 'src/theory/strings/skolem_cache.h')
-rw-r--r--src/theory/strings/skolem_cache.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/theory/strings/skolem_cache.h b/src/theory/strings/skolem_cache.h
index 1cd4d7de8..d0eabd4c2 100644
--- a/src/theory/strings/skolem_cache.h
+++ b/src/theory/strings/skolem_cache.h
@@ -100,6 +100,16 @@ class SkolemCache
// b > 0 =>
// exists k. a = a' ++ k ^ len( k ) = ite( len(a)>b, len(a)-b, 0 )
SK_SUFFIX_REM,
+ // --------------- integer skolems
+ // exists k. ( b occurs k times in a )
+ SK_NUM_OCCUR,
+ // --------------- function skolems
+ // For function k: Int -> Int
+ // exists k.
+ // forall 0 <= x <= n,
+ // k(x) is the end index of the x^th occurrence of b in a
+ // where n is the number of occurrences of b in a, and k(0)=0.
+ SK_OCCUR_INDEX,
};
/**
* Returns a skolem of type string that is cached for (a,b,id) and has
@@ -111,12 +121,21 @@ class SkolemCache
* name c.
*/
Node mkSkolemCached(Node a, SkolemId id, const char* c);
+ /** Same as above, but the skolem to construct has a custom type tn */
+ Node mkTypedSkolemCached(
+ TypeNode tn, Node a, Node b, SkolemId id, const char* c);
+ /** Same as mkTypedSkolemCached above for (a,[null],id) */
+ Node mkTypedSkolemCached(TypeNode tn, Node a, SkolemId id, const char* c);
/** Returns a (uncached) skolem of type string with name c */
Node mkSkolem(const char* c);
+ /** Same as above, but for custom type tn */
+ Node mkTypedSkolem(TypeNode tn, const char* c);
/** Returns true if n is a skolem allocated by this class */
bool isSkolem(Node n) const;
private:
+ /** string type */
+ TypeNode d_strType;
/** map from node pairs and identifiers to skolems */
std::map<Node, std::map<Node, std::map<SkolemId, Node> > > d_skolemCache;
/** the set of all skolems we have generated */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback