From 2c6645ef2df34ed8920d04a1378ac001b5a1fdcb Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Thu, 3 Dec 2015 13:57:29 +0000 Subject: [PATCH 1/2] Python 3.x issues --- doc/mk_api_doc.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/mk_api_doc.py b/doc/mk_api_doc.py index e45f56134..f5298a607 100644 --- a/doc/mk_api_doc.py +++ b/doc/mk_api_doc.py @@ -90,41 +90,41 @@ try: cleanup_API('../src/api/z3_interp.h', 'tmp/z3_interp.h') cleanup_API('../src/api/z3_fpa.h', 'tmp/z3_fpa.h') - print "Removed annotations from z3_api.h." + print("Removed annotations from z3_api.h.") try: if subprocess.call(['doxygen', 'z3api.dox']) != 0: - print "ERROR: doxygen returned nonzero return code" + print("ERROR: doxygen returned nonzero return code") exit(1) except: - print "ERROR: failed to execute 'doxygen', make sure doxygen (http://www.doxygen.org) is available in your system." + print("ERROR: failed to execute 'doxygen', make sure doxygen (http://www.doxygen.org) is available in your system.") exit(1) - print "Generated C and .NET API documentation." + print("Generated C and .NET API documentation.") os.remove('tmp/z3_api.h') os.remove('tmp/z3_algebraic.h') os.remove('tmp/z3_polynomial.h') os.remove('tmp/z3_rcf.h') os.remove('tmp/z3_interp.h') os.remove('tmp/z3_fpa.h') - print "Removed temporary file z3_api.h." + print("Removed temporary file z3_api.h.") os.remove('tmp/website.dox') - print "Removed temporary file website.dox" + print("Removed temporary file website.dox") os.remove('tmp/z3py.py') - print "Removed temporary file z3py.py" + print("Removed temporary file z3py.py") os.removedirs('tmp') - print "Removed temporary directory tmp." + print("Removed temporary directory tmp.") sys.path.append('../src/api/python') pydoc.writedoc('z3') shutil.move('z3.html', 'api/html/z3.html') - print "Generated Python documentation." + print("Generated Python documentation.") if ML_ENABLED: mk_dir('api/html/ml') if subprocess.call(['ocamldoc', '-html', '-d', 'api\html\ml', '-sort', '-hide', 'Z3', '-I', '%s/api/ml' % BUILD_DIR, '../src/api/ml/z3enums.mli', '../src/api/ml/z3.mli']) != 0: - print "ERROR: ocamldoc failed." + print("ERROR: ocamldoc failed.") exit(1) - print "Generated ML/OCaml documentation." + print("Generated ML/OCaml documentation.") - print "Documentation was successfully generated at subdirectory './api/html'." + print("Documentation was successfully generated at subdirectory './api/html'.") except: - print "ERROR: failed to generate documentation" + print("ERROR: failed to generate documentation") exit(1) From 00271e5531d02225c5608949bc4979dd9b03b252 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Thu, 3 Dec 2015 17:33:25 +0000 Subject: [PATCH 2/2] C API cleanup. Mainly removal of ML-specific macros that are not used anymore and inline documentation fixes. --- doc/mk_api_doc.py | 18 +- doc/z3api.dox | 5 - doc/z3code.dox | 5 - scripts/mk_project.py | 2 +- src/api/api_bv.cpp | 3 +- src/api/java/Model.java | 5 +- src/api/z3.h | 5 +- src/api/z3_algebraic.h | 65 +- src/api/z3_api.h | 1896 ++++++----------------------------- src/api/z3_ast_containers.h | 200 ++++ src/api/z3_fixedpoint.h | 377 +++++++ src/api/z3_fpa.h | 209 ++-- src/api/z3_interp.h | 25 +- src/api/z3_macros.h | 9 +- src/api/z3_optimization.h | 223 ++++ src/api/z3_polynomial.h | 20 +- src/api/z3_private.h | 11 +- src/api/z3_rcf.h | 27 +- 18 files changed, 1282 insertions(+), 1823 deletions(-) create mode 100644 src/api/z3_ast_containers.h create mode 100644 src/api/z3_fixedpoint.h create mode 100644 src/api/z3_optimization.h diff --git a/doc/mk_api_doc.py b/doc/mk_api_doc.py index f5298a607..beb6596d1 100644 --- a/doc/mk_api_doc.py +++ b/doc/mk_api_doc.py @@ -84,10 +84,13 @@ try: os.remove('website-adj.dox') shutil.copyfile('../src/api/python/z3.py', 'tmp/z3py.py') cleanup_API('../src/api/z3_api.h', 'tmp/z3_api.h') + cleanup_API('../src/api/z3_ast_containers.h', 'tmp/z3_ast_containers.h') cleanup_API('../src/api/z3_algebraic.h', 'tmp/z3_algebraic.h') cleanup_API('../src/api/z3_polynomial.h', 'tmp/z3_polynomial.h') cleanup_API('../src/api/z3_rcf.h', 'tmp/z3_rcf.h') - cleanup_API('../src/api/z3_interp.h', 'tmp/z3_interp.h') + cleanup_API('../src/api/z3_fixedpoint.h', 'tmp/z3_fixedpoint.h') + cleanup_API('../src/api/z3_optimization.h', 'tmp/z3_optimization.h') + cleanup_API('../src/api/z3_interp.h', 'tmp/z3_interp.h') cleanup_API('../src/api/z3_fpa.h', 'tmp/z3_fpa.h') print("Removed annotations from z3_api.h.") @@ -100,15 +103,19 @@ try: exit(1) print("Generated C and .NET API documentation.") os.remove('tmp/z3_api.h') + os.remove('tmp/z3_ast_containers.h') os.remove('tmp/z3_algebraic.h') os.remove('tmp/z3_polynomial.h') os.remove('tmp/z3_rcf.h') + os.remove('tmp/z3_fixedpoint.h') + os.remove('tmp/z3_optimization.h') os.remove('tmp/z3_interp.h') os.remove('tmp/z3_fpa.h') - print("Removed temporary file z3_api.h.") - os.remove('tmp/website.dox') + print("Removed temporary file header files.") + + os.remove('tmp/website.dox') print("Removed temporary file website.dox") - os.remove('tmp/z3py.py') + os.remove('tmp/z3py.py') print("Removed temporary file z3py.py") os.removedirs('tmp') print("Removed temporary directory tmp.") @@ -126,5 +133,6 @@ try: print("Documentation was successfully generated at subdirectory './api/html'.") except: - print("ERROR: failed to generate documentation") + exctype, value = sys.exc_info()[:2] + print("ERROR: failed to generate documentation: %s" % value) exit(1) diff --git a/doc/z3api.dox b/doc/z3api.dox index cb4569dc4..c96a7be73 100644 --- a/doc/z3api.dox +++ b/doc/z3api.dox @@ -214,11 +214,6 @@ ALIASES = "beginfaq=