From 239d9ecf1afc663803191c7347fee97d9089b982 Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Wed, 7 Jul 2021 11:36:15 -0700 Subject: Rename operator pow2 to int.pow2. (#6849) This name is the name of the symbol we parse. Internally, we still call it POW2. This is a fix for the problem that `pow2` may clash (and already does clash on SMT-LIB benchmarks) with user-defined symbols. --- src/parser/smt2/smt2.cpp | 2 +- test/regress/regress0/nl/pow2-native-0.smt2 | 2 +- test/regress/regress0/nl/pow2-native-1.smt2 | 2 +- test/regress/regress0/nl/pow2-native-2.smt2 | 2 +- test/regress/regress0/nl/pow2-native-3.smt2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index ec4ab6ae6..2a39a6208 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -566,7 +566,7 @@ Command* Smt2::setLogic(std::string name, bool fromCommand) // integer version of AND addIndexedOperator(api::IAND, api::IAND, "iand"); // pow2 - addOperator(api::POW2, "pow2"); + addOperator(api::POW2, "int.pow2"); } } diff --git a/test/regress/regress0/nl/pow2-native-0.smt2 b/test/regress/regress0/nl/pow2-native-0.smt2 index f88ac4151..066819108 100644 --- a/test/regress/regress0/nl/pow2-native-0.smt2 +++ b/test/regress/regress0/nl/pow2-native-0.smt2 @@ -2,5 +2,5 @@ (set-logic QF_NIA) (declare-fun x () Int) (assert (< x 0)) -(assert (distinct (pow2 x) 0)) +(assert (distinct (int.pow2 x) 0)) (check-sat) diff --git a/test/regress/regress0/nl/pow2-native-1.smt2 b/test/regress/regress0/nl/pow2-native-1.smt2 index 1e24ae572..c180d44aa 100644 --- a/test/regress/regress0/nl/pow2-native-1.smt2 +++ b/test/regress/regress0/nl/pow2-native-1.smt2 @@ -4,6 +4,6 @@ (declare-fun x () Int) (assert (and (<= 0 x) (< x 16))) -(assert (> (pow2 x) 0)) +(assert (> (int.pow2 x) 0)) (check-sat) diff --git a/test/regress/regress0/nl/pow2-native-2.smt2 b/test/regress/regress0/nl/pow2-native-2.smt2 index ba0621dbc..b5e742c51 100644 --- a/test/regress/regress0/nl/pow2-native-2.smt2 +++ b/test/regress/regress0/nl/pow2-native-2.smt2 @@ -4,6 +4,6 @@ (declare-fun x () Int) (assert (and (<= 0 x) (< x 16))) -(assert (< (pow2 x) x)) +(assert (< (int.pow2 x) x)) (check-sat) diff --git a/test/regress/regress0/nl/pow2-native-3.smt2 b/test/regress/regress0/nl/pow2-native-3.smt2 index 45975a474..23c7852aa 100644 --- a/test/regress/regress0/nl/pow2-native-3.smt2 +++ b/test/regress/regress0/nl/pow2-native-3.smt2 @@ -7,6 +7,6 @@ (assert (<= 0 x)) (assert (<= 0 y)) (assert (< x y)) -(assert (> (pow2 x) (pow2 y))) +(assert (> (int.pow2 x) (int.pow2 y))) (check-sat) -- cgit v1.2.3