Change tuple tokens and update datatypes theory ref (#8420)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Wed, 30 Mar 2022 04:39:29 +0000 (23:39 -0500)
committerGitHub <noreply@github.com>
Wed, 30 Mar 2022 04:39:29 +0000 (04:39 +0000)
Changes tuple_ to tuple. for consistency.

Also fixes the lexer list for smt2 and updates the datatypes theory reference with missing content.

19 files changed:
docs/ext/smtliblexer.py
docs/theories/datatypes.rst
src/api/cpp/cvc5_kind.h
src/parser/smt2/Smt2.g
src/parser/smt2/smt2.cpp
src/printer/smt2/smt2_printer.cpp
test/regress/cli/regress0/datatypes/some-boolean-tests.cvc.smt2
test/regress/cli/regress0/datatypes/tuple-model.cvc.smt2
test/regress/cli/regress0/datatypes/tuple-record-bug.cvc.smt2
test/regress/cli/regress0/datatypes/tuple.cvc.smt2
test/regress/cli/regress0/datatypes/tuple_update.smt2
test/regress/cli/regress0/datatypes/tuples-multitype.smt2
test/regress/cli/regress0/printer/tuples_and_records.cvc.smt2
test/regress/cli/regress1/bags/product3.smt2
test/regress/cli/regress1/datatypes/tuple_projection.smt2
test/regress/cli/regress1/sets/sets-tuple-poly.cvc.smt2
test/unit/api/cpp/solver_black.cpp
test/unit/api/java/SolverTest.java
test/unit/api/python/test_solver.py

index cc0792aab1391a5b068e8f6de328da4170a01f33..b61cba1219189c0d316c8cb46ef46f586d00536e 100644 (file)
@@ -48,7 +48,7 @@ class SmtLibLexer(RegexLexer):
         '=>', '=', 'true', 'false', 'not', 'and', 'or', 'xor', 'distinct',
         'ite',
         # datatypes
-        'tuple', 'tuple_project', 'tuple_select',
+        'tuple', 'tuple\.project', 'tuple\.select', 'tuple\.update',
         # fp
         'RNE', 'RNA', 'RTP', 'RTN', 'RTZ', 'fp', 'NaN', 'fp\.abs', 'fp\.neg',
         'fp\.add', 'fp\.sub', 'fp\.mul', 'fp\.div', 'fp\.fma', 'fp\.sqrt',
@@ -62,15 +62,16 @@ class SmtLibLexer(RegexLexer):
         '<', '>', '<=', '>=', '!=', '\+', '-', '\*', '/', 'div', 'mod', 'abs',
         'divisible', 'to_real', 'to_int', 'is_int', 'iand', 'int2bv',
         # separation logic
-        'emp', 'pto', 'sep', 'wand', 'nil',
+        'sep\.emp', 'pto', 'sep', 'wand', 'sep\.nil',
         # sets / relations
-        'union', 'setminus', 'member', 'subset', 'emptyset', 'singleton',
-        'card', 'insert', 'complement', 'univset', 'transpose', 'tclosure',
-        'join', 'product', 'intersection',
+        'set\.union', 'set\.minus', 'set\.member', 'set\.subset', 'set\.empty',
+        'set\.singleton', 'set\.card', 'set\.insert', 'set\.complement',
+        'set\.universe', 'rel\.transpose', 'rel\.tclosure', 'rel\.join',
+        'rel\.product', 'set\.inter',
         # string
-        'char', 'str\.\+\+', 'str\.len', 'str\.<', 'str\.to_re', 'str\.in_re',
-        're\.none', 're\.all', 're\.allchar', 're\.\+\+', 're\.union',
-        're\.inter', 're\.*', 'str\.<=', 'str\.at', 'str\.substr',
+        'char', 'str\.\+\+', 'str\.len', 'str\.<', 'str\.<=', 'str\.to_re',
+        'str\.in_re', 're\.none', 're\.all', 're\.allchar', 're\.\+\+',
+        're\.union', 're\.inter', 're\.*', 'str\.<=', 'str\.at', 'str\.substr',
         'str\.prefixof', 'str\.suffixof', 'str\.contains', 'str\.indexof',
         'str\.replace', 'str\.replace_all', 'str\.replace_re',
         'str\.replace_re_all', 're\.comp', 're\.diff', 're\.\+', 're\.opt',
index 2864396534b74c8134bf5dd247c8cf8e15e4f3b9..e0d731d28eb936b274e50da84fec9ac665be500a 100644 (file)
@@ -27,13 +27,13 @@ datatypes in ``*.smt2`` input files in the smt lib 2.6 format:
 .. code:: smtlib
 
   (declare-datatypes ((D1 n1) ... (Dk nk))
-   (((C1 (S1 T1) ... (Si Ti)) ... (Cj ... ))
+   (((C1 (S11 T1) ... (S1i Ti)) ... (Cj ... ))
     ...
     ((...) ... (...)))
 
 where ``D1 ... Dk`` are datatype types, ``C1 ... Cj`` are the constructors for
 datatype ``D1``,
-``S1 ... Si`` are the selectors (or "destructors") of constructor ``C1``, and
+``S11 ... S1i`` are the selectors (or "destructors") of constructor ``C1``, and
 each ``T1 ... Ti`` is a previously declared type or one of ``D1 ... Dk``.
 The numbers ``n1 ... nk`` denote the number of type
 parameters for the datatype, where ``0`` is used for non-parametric datatypes.
@@ -144,7 +144,7 @@ For example:
 .. code:: smtlib
 
   (declare-const t (Tuple Int Int))
-  (assert (= ((_ tuple_select 0) t) 3))
+  (assert (= ((_ tuple.select 0) t) 3))
   (assert (not (= t (tuple 3 4))))
 
 
@@ -176,6 +176,42 @@ a `cvc5::api::Solver solver` object.
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
 | Logic String       | ``(set-logic QF_DT)``                  | ``solver.setLogic("QF_DT");``                                                                                                   |
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Datatype Sort      | ``(declare-datatype ...)``             | ``Sort s = solver.mkDatatypeSort(...);``                                                                                        |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Datatype Sorts     | ``(declare-datatypes ...)``            | ``std::vector<Sort> s = solver.mkDatatypeSorts(...);``                                                                          |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Constructor        | ``(Ci <Term_1>, ..., <Term_n>)``       | ``Sort s = solver.mkDatatypeSort(...);``                                                                                        |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term ci = dt[i].getConstructorTerm();``                                                                                       |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_CONSTRUCTOR, {ci, <Term_1>, ..., <Term_n>});``                                             |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Selector           | ``(Sij t)``                            | ``Sort s = solver.mkDatatypeSort(...);``                                                                                        |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term sij = dt[i].getSelector(j).getSelectorTerm();``                                                                          |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_SELECTOR, {sij, t});``                                                                     |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Updater            | ``((_ update Sij) t u)``               | ``Sort s = solver.mkDatatypeSort(...);``                                                                                        |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term upd = dt[i].getSelector(j).getUpdaterTerm();``                                                                           |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_UPDATER, {upd, t, u});``                                                                   |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Tester             | ``((_ is Ci) t)``                      | ``Sort s = solver.mkDatatypeSort(...);``                                                                                        |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term upd = dt[i].getTesterTerm();``                                                                                           |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_TESTER, {upd, t, u});``                                                                    |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
 | Tuple Sort         | ``(Tuple <Sort_1>, ..., <Sort_n>)``    | ``std::vector<cvc5::api::Sort> sorts = { ... };``                                                                               |
 |                    |                                        |                                                                                                                                 |
 |                    |                                        | ``Sort s = solver.mkTupleSort(sorts);``                                                                                         |
@@ -190,17 +226,33 @@ a `cvc5::api::Solver solver` object.
 |                    |                                        |                                                                                                                                 |
 |                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term c = dt[0].getConstructor();``                                                                                            |
+|                    |                                        | ``Term c = dt[0].getConstructorTerm();``                                                                                        |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_CONSTRUCTOR, {c, <Term_1>, ..., <Term_n>});``                                              |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Tuple Selector     | ``((_ tuple.select i) t)``             | ``Sort s = solver.mkTupleSort(sorts);``                                                                                         |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term sel = dt[0].getSelector(i).getSelectorTerm();``                                                                          |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_SELECTOR, {sel, t});``                                                                     |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Tuple Updater      | ``((_ tuple.update i) t u)``           | ``Sort s = solver.mkTupleSort(sorts);``                                                                                         |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term upd = dt[0].getSelector(i).getUpdaterTerm();``                                                                           |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term t = solver.mkTerm(Kind::APPLY_CONSTRUCTOR, {c, <Term_1>, ..., <Term_n>});``                                              |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_UPDATER, {upd, t, u});``                                                                   |
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
-| Tuple Selector     | ``((_ tuple_select i) t)``             | ``Sort s = solver.mkTupleSort(sorts);``                                                                                         |
+| Tuple Projection   | ``((_ tuple.project i1 ... in) t)``    | ``Sort s = solver.mkTupleSort(sorts);``                                                                                         |
 |                    |                                        |                                                                                                                                 |
 |                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term c = dt[0].getSelector(i);``                                                                                              |
+|                    |                                        | ``Term proj = solver.mkOp(Kind::TUPLE_PROJECT, {i1, ..., in});``                                                                |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term s = solver.mkTerm(Kind::APPLY_SELECTOR, {s, t});``                                                                       |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::TUPLE_PROJECT, {proj, t});``                                                                     |
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
 | Record Sort        | n/a                                    | ``Sort s = mkRecordSort(const std::vector<std::pair<std::string, Sort>>& fields);``                                             |
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
@@ -216,15 +268,23 @@ a `cvc5::api::Solver solver` object.
 |                    |                                        |                                                                                                                                 |
 |                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term c = dt[0].getConstructor();``                                                                                            |
+|                    |                                        | ``Term c = dt[0].getConstructorTerm();``                                                                                        |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term t = solver.mkTerm(Kind::APPLY_CONSTRUCTOR, {c, <Term_1>, ..., <Term_n>});``                                              |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_CONSTRUCTOR, {c, <Term_1>, ..., <Term_n>});``                                              |
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
 | Record Selector    | n/a                                    | ``Sort s = mkRecordSort(fields);``                                                                                              |
 |                    |                                        |                                                                                                                                 |
 |                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term c = dt[0].getSelector(name);``                                                                                           |
+|                    |                                        | ``Term sel = dt[0].getSelector(name).getSelectorTerm();``                                                                       |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_SELECTOR, {sel, t});``                                                                     |
++--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+| Record Updater     | n/a                                    | ``Sort s = solver.mkRecordSort(sorts);``                                                                                        |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Datatype dt = s.getDatatype();``                                                                                              |
+|                    |                                        |                                                                                                                                 |
+|                    |                                        | ``Term upd = dt[0].getSelector(name).getUpdaterTerm();``                                                                        |
 |                    |                                        |                                                                                                                                 |
-|                    |                                        | ``Term s = solver.mkTerm(Kind::APPLY_SELECTOR, {s, t});``                                                                       |
+|                    |                                        | ``Term r = solver.mkTerm(Kind::APPLY_UPDATER, {upd, t, u});``                                                                   |
 +--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
index 93ac21e117f9744e59a9d338af0ae6fd52568ab2..161241466f93c94838263166d8d94257d9ccab3b 100644 (file)
@@ -2275,7 +2275,7 @@ enum Kind : int32_t
    * \rst
    * .. code:: smtlib
    *
-   *     ((_ tuple_project 1 2 2 3 1) (tuple 10 20 30 40))
+   *     ((_ tuple.project 1 2 2 3 1) (tuple 10 20 30 40))
    * \endrst
    * yields
    * \rst
index 86ee80b4c9cf927c05517391992b31919a4e0bea..7361b70a0e0a309f630a078de30ce1c65f5345b7 100644 (file)
@@ -1639,7 +1639,7 @@ identifier[cvc5::ParseOp& p]
       }
     | TUPLE_PROJECT_TOK nonemptyNumeralList[numerals]
       {
-        // we adopt a special syntax (_ tuple_project i_1 ... i_n) where
+        // we adopt a special syntax (_ tuple.project i_1 ... i_n) where
         // i_1, ..., i_n are numerals
         p.d_kind = cvc5::TUPLE_PROJECT;
         p.d_op = SOLVER->mkOp(cvc5::TUPLE_PROJECT, numerals);
@@ -2282,7 +2282,7 @@ FORALL_TOK        : 'forall';
 
 CHAR_TOK : { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_STRINGS) }? 'char';
 TUPLE_CONST_TOK: { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }? 'tuple';
-TUPLE_PROJECT_TOK: { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }? 'tuple_project';
+TUPLE_PROJECT_TOK: { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }? 'tuple.project';
 FMF_CARD_TOK: { !PARSER_STATE->strictModeEnabled() && PARSER_STATE->hasCardinalityConstraints() }? 'fmf.card';
 
 HO_ARROW_TOK : { PARSER_STATE->isHoEnabled() }? '->';
index c4ff3cadfc6ab22efb820333cbcaa15b45b2a3bd..3538f40d3b2268d8d256299eec0d8fd5d6058b62 100644 (file)
@@ -136,8 +136,8 @@ void Smt2::addDatatypesOperators()
     // Notice that tuple operators, we use the generic APPLY_SELECTOR and
     // APPLY_UPDATER kinds. These are processed based on the context
     // in which they are parsed, e.g. when parsing identifiers.
-    addIndexedOperator(cvc5::APPLY_SELECTOR, "tuple_select");
-    addIndexedOperator(cvc5::APPLY_UPDATER, "tuple_update");
+    addIndexedOperator(cvc5::APPLY_SELECTOR, "tuple.select");
+    addIndexedOperator(cvc5::APPLY_UPDATER, "tuple.update");
   }
 }
 
@@ -962,7 +962,7 @@ cvc5::Term Smt2::applyParseOp(ParseOp& p, std::vector<cvc5::Term>& args)
   }
   else if (p.d_kind != cvc5::NULL_TERM)
   {
-    // It is a special case, e.g. tuple_select or array constant specification.
+    // It is a special case, e.g. tuple.select or array constant specification.
     // We have to wait until the arguments are parsed to resolve it.
   }
   else if (!p.d_expr.isNull())
index 583567e9894e671ff2088c1b2b859abaf8963abe..0187c2768591b5e62821f9e67b1fba6e9cdbda50 100644 (file)
@@ -774,13 +774,13 @@ void Smt2Printer::toStream(std::ostream& out,
     TupleProjectOp op = n.getOperator().getConst<TupleProjectOp>();
     if (op.getIndices().empty())
     {
-      // e.g. (tuple_project tuple)
-      out << "tuple_project " << n[0] << ")";
+      // e.g. (tuple.project tuple)
+      out << "tuple.project " << n[0] << ")";
     }
     else
     {
-      // e.g. ((_ tuple_project 2 4 4) tuple)
-      out << "(_ tuple_project" << op << ") " << n[0] << ")";
+      // e.g. ((_ tuple.project 2 4 4) tuple)
+      out << "(_ tuple.project" << op << ") " << n[0] << ")";
     }
     return;
   }
@@ -797,7 +797,7 @@ void Smt2Printer::toStream(std::ostream& out,
     if (dt.isTuple())
     {
       stillNeedToPrintParams = false;
-      out << "(_ tuple_select " << DType::indexOf(op) << ") ";
+      out << "(_ tuple.select " << DType::indexOf(op) << ") ";
     }
   }
   break;
@@ -823,7 +823,7 @@ void Smt2Printer::toStream(std::ostream& out,
     if (dt.isTuple())
     {
       stillNeedToPrintParams = false;
-      out << "(_ tuple_update " << DType::indexOf(op) << ") ";
+      out << "(_ tuple.update " << DType::indexOf(op) << ") ";
     }
     else
     {
index e05a65ad05dc32b426499296448b1941a50bdd03..d421bc47f42084436c4cd44a5a4a412a3be3673e 100644 (file)
@@ -5,6 +5,6 @@
 (declare-fun x () (list Real))
 (declare-fun y () (Tuple Int Bool Int))
 (assert (= y (tuple 5 true 4)))
-(assert ((_ tuple_select 1) y))
+(assert ((_ tuple.select 1) y))
 (assert (= x ((as cons (list Real)) (/ 11 10) true (as nil (list Real)))))
 (check-sat)
index 7f063a4990d58eeffa409bbfce56329cf8cf956d..a169f492c6690d718ff449ddde420bc03b4b2e5a 100644 (file)
@@ -2,5 +2,5 @@
 (set-logic ALL)
 (set-option :incremental false)
 (declare-fun x () (Tuple Int Int))
-(assert (= ((_ tuple_select 0) x) 5))
+(assert (= ((_ tuple.select 0) x) 5))
 (check-sat)
index f26769ccc1afa6935dcaa6b6babdd76c0a1b1b5e..8071abebfdea75042c5c88a673d0ce0b536bbc0b 100644 (file)
@@ -8,4 +8,4 @@
 (define-fun foo ((x |__cvc5_record_int_(Array Int Int)_queries_(Array Int Int)|)) |__cvc5_record_int_(Array Int Int)_queries_(Array Int Int)| ((_ update int) x (int x)))
 (declare-fun m () |__cvc5_record_int_(Array Int Int)_queries_(Array Int Int)|)
 (define-fun w () (Tuple |__cvc5_record_int_(Array Int Int)_queries_(Array Int Int)| Int) (ite (= x 0) (tuple (foo m) 0) (tuple m 0)))
-(check-sat-assuming ( (not (= ((_ tuple_select 1) (ite (= x 0) (tuple (foo m) 0) (tuple m 0))) 1)) ))
+(check-sat-assuming ( (not (= ((_ tuple.select 1) (ite (= x 0) (tuple (foo m) 0) (tuple m 0))) 1)) ))
index 9e6e83c2b6f67598df2dd13e89fa28b4db123e41..0c5ce70b5a921c32e274df3f77dfcead4329aedf 100644 (file)
@@ -2,9 +2,9 @@
 (set-logic ALL)
 (set-option :incremental false)
 (define-fun x () (Tuple Real Int Real) (tuple (/ 4 5) 9 (/ 11 9)))
-(define-fun first_elem () Real ((_ tuple_select 0) (tuple (/ 4 5) 9 (/ 11 9))))
-(define-fun third_elem () Real ((_ tuple_select 2) (tuple (/ 4 5) 9 (/ 11 9))))
+(define-fun first_elem () Real ((_ tuple.select 0) (tuple (/ 4 5) 9 (/ 11 9))))
+(define-fun third_elem () Real ((_ tuple.select 2) (tuple (/ 4 5) 9 (/ 11 9))))
 
 (define-fun y () (Tuple Real Int Real) (tuple (/ 4 5) 9 (/ 11 9)))
-(define-fun y1 () (Tuple Real Int Real) ((_ tuple_update 1) (tuple (/ 4 5) 9 (/ 11 9)) 3))
-(check-sat-assuming ( (not (let ((_let_1 (tuple (/ 4 5) 9 (/ 11 9)))) (let ((_let_2 ((_ tuple_update 1) _let_1 3))) (and (and (and (= _let_1 _let_1) (= ((_ tuple_select 0) _let_1) ((_ tuple_select 0) _let_2))) (= ((_ tuple_select 2) _let_1) ((_ tuple_select 2) _let_2))) (= ((_ tuple_select 1) _let_2) 3))))) ))
+(define-fun y1 () (Tuple Real Int Real) ((_ tuple.update 1) (tuple (/ 4 5) 9 (/ 11 9)) 3))
+(check-sat-assuming ( (not (let ((_let_1 (tuple (/ 4 5) 9 (/ 11 9)))) (let ((_let_2 ((_ tuple.update 1) _let_1 3))) (and (and (and (= _let_1 _let_1) (= ((_ tuple.select 0) _let_1) ((_ tuple.select 0) _let_2))) (= ((_ tuple.select 2) _let_1) ((_ tuple.select 2) _let_2))) (= ((_ tuple.select 1) _let_2) 3))))) ))
index 9812da728f8bdf95533108d27424f88b6d61e551..553d5593b8285ef5983c7e732b79e7fa5d1b6994 100644 (file)
@@ -2,5 +2,5 @@
 (set-info :status sat)
 (declare-fun x () (Tuple Int Int))
 (declare-fun y () (Tuple Int Int))
-(assert (= ((_ tuple_update 0) x 1) ((_ tuple_update 1) y 2)))
+(assert (= ((_ tuple.update 0) x 1) ((_ tuple.update 1) y 2)))
 (check-sat)
index c6555c5df20bc5c01a0a5e97591e68e4fa795731..b3464127a9ab63489bde4b43ff1901fbb113b933 100644 (file)
@@ -6,6 +6,6 @@
 (declare-fun i () String)
 
 (assert (= t (tuple 0 "0")))
-(assert (= i ((_ tuple_select 1) t)))
+(assert (= i ((_ tuple.select 1) t)))
 
 (check-sat)
index 0c54f5f4935c68f3f8ff6741c912e5112d34955d..e83751a2c49b499b57f3f7d1abfef505748fe3cf 100644 (file)
@@ -1,6 +1,6 @@
 ; EXPECT: sat
 ; EXPECT: (((a r) "active"))
-; EXPECT: ((((_ tuple_select 1) y) 9))
+; EXPECT: ((((_ tuple.select 1) y) 9))
 (set-logic ALL)
 (set-option :incremental false)
 (set-option :produce-models true)
@@ -12,4 +12,4 @@
 (assert (= y (tuple (/ 4 5) 9 (/ 11 9))))
 (check-sat-assuming ( (not (= (a r) "what?")) ))
 (get-value ( (a r) ))
-(get-value ( ((_ tuple_select 1) y) ))
+(get-value ( ((_ tuple.select 1) y) ))
index 8f2e8c38f533a535224721a9a266e7e1ade9b92b..8e62f55ca6503aec47d60223b6ff8ddd18287229 100644 (file)
@@ -16,6 +16,6 @@
 (assert (bag.member y B))
 (assert (bag.member z C))
 
-(assert (distinct x y ((_ tuple_project 0 1 2) z) ((_ tuple_project 3 4 5) z)))
+(assert (distinct x y ((_ tuple.project 0 1 2) z) ((_ tuple.project 3 4 5) z)))
 
 (check-sat)
index dfe37a9d04b602260949f77be318dc02383b2a8f..73c298dc429b3f78c32fce93ccf6141158cb0709 100644 (file)
@@ -5,7 +5,7 @@
 (declare-fun v () Tuple)
 (declare-fun x () String)
 (assert (= t (tuple "a" "b" "c" "d")))
-(assert (= x ((_ tuple_select 0) t)))
-(assert (= u ((_ tuple_project 2 3) t)))
-(assert (= v (tuple_project t)))
+(assert (= x ((_ tuple.select 0) t)))
+(assert (= u ((_ tuple.project 2 3) t)))
+(assert (= v (tuple.project t)))
 (check-sat)
\ No newline at end of file
index 64a2306c46a57e89759e81f4c7068b9e2e85b560..31d64cb49b42d843a3b13abbdab59077c173ae09 100644 (file)
@@ -7,7 +7,7 @@
 (declare-fun b () (Set (Tuple Int Real)))
 (declare-fun x () (Tuple Real Real))
 (assert (let ((_let_1 0.0)) (not (= x (tuple _let_1 _let_1)))))
-(assert (set.member (tuple ((_ tuple_select 0) x) (to_int ((_ tuple_select 1) x))) a))
-(assert (set.member (tuple (to_int ((_ tuple_select 0) x)) ((_ tuple_select 1) x)) b))
-(assert (not (= ((_ tuple_select 0) x) ((_ tuple_select 1) x))))
+(assert (set.member (tuple ((_ tuple.select 0) x) (to_int ((_ tuple.select 1) x))) a))
+(assert (set.member (tuple (to_int ((_ tuple.select 0) x)) ((_ tuple.select 1) x)) b))
+(assert (not (= ((_ tuple.select 0) x) ((_ tuple.select 1) x))))
 (check-sat)
index a29f9d268e4e8e895cbe13cb98c896fec83de170..97129787cfd55c7f61d9ec6c7886d06a49328f05 100644 (file)
@@ -2880,7 +2880,7 @@ TEST_F(TestApiBlackSolver, tupleProject)
   }
 
   ASSERT_EQ(
-      "((_ tuple_project 0 3 2 0 1 2) (tuple true 3 \"C\" (set.singleton "
+      "((_ tuple.project 0 3 2 0 1 2) (tuple true 3 \"C\" (set.singleton "
       "\"Z\")))",
       projection.toString());
 }
index 58fe0d9e707b2d9bfe396fcc11e37d49e37d7a5a..213979e620d38e7caa568f9affb255bf0b76c4f3 100644 (file)
@@ -2816,7 +2816,7 @@ class SolverTest
       assertEquals(elements[indices[i]], simplifiedTerm);
     }
 
-    assertEquals("((_ tuple_project 0 3 2 0 1 2) (tuple true 3 \"C\" "
+    assertEquals("((_ tuple.project 0 3 2 0 1 2) (tuple true 3 \"C\" "
             + "(set.singleton \"Z\")))",
         projection.toString());
   }
index 7ad960249db9cbfa035fa4101206813ff10bc307..9ba032f0a94282394121c00666b34a3d4d4f8731 100644 (file)
@@ -2585,5 +2585,5 @@ def test_tuple_project(solver):
         simplifiedTerm = solver.simplify(selectedTerm)
         assert elements[i] == simplifiedTerm
 
-        assert "((_ tuple_project 0 3 2 0 1 2) (tuple true 3 \"C\" (set.singleton \"Z\")))" == str(
+        assert "((_ tuple.project 0 3 2 0 1 2) (tuple true 3 \"C\" (set.singleton \"Z\")))" == str(
             projection)