Added CHOOSE operator for sets (#4211)
authormudathirmahgoub <mudathir-mahgoubyahia@uiowa.edu>
Wed, 8 Apr 2020 23:24:16 +0000 (18:24 -0500)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 23:24:16 +0000 (18:24 -0500)
commitdf1ea6b9cdc1f424073151d0f7fda639d4405622
treef28bd734c6f78e7399f91e92d517343a779c09c3
parenta48cafdd09c3ff8cb9984bad930343958c30ce56
Added CHOOSE operator for sets (#4211)

This PR enables THEORY_UF by default for sets and adds the operator CHOOSE for sets which returns an element from a given set. The semantics is as follows:

If a set A = {x}, then the term (choose A) is equivalent to the term x.
If the set is empty, then (choose A) is an arbitrary value.
If the set has cardinality > 1, then (choose A) will deterministically return an element in A.
17 files changed:
src/api/cvc4cpp.cpp
src/api/cvc4cppkind.h
src/parser/cvc/Cvc.g
src/parser/smt2/smt2.cpp
src/printer/smt2/smt2_printer.cpp
src/theory/sets/kinds
src/theory/sets/theory_sets_private.cpp
src/theory/sets/theory_sets_private.h
src/theory/sets/theory_sets_type_rules.h
test/regress/CMakeLists.txt
test/regress/regress1/fmf/agree466.smt2
test/regress/regress1/fmf/agree467.smt2
test/regress/regress1/sets/choose.cvc [new file with mode: 0644]
test/regress/regress1/sets/choose1.smt2 [new file with mode: 0644]
test/regress/regress1/sets/choose2.smt2 [new file with mode: 0644]
test/regress/regress1/sets/choose3.smt2 [new file with mode: 0644]
test/regress/regress1/sets/choose4.smt2 [new file with mode: 0644]