Josh Berdine
8d81a2dcaf
Note that Z3_get_numeral_small is essentially redundant ( #7599 )
...
* Check that Z3_get_numeral_small is given non-null out params
Analogous to other Z3_get_numeral_* functions with out params.
* Note that Z3_get_numeral_small is essentially redundant
The error behavior of Z3_get_numeral_small does not follow the pattern of
the other functions. The functions that have out params and return a bool
indicating success (such as Z3_get_numeral_rational_int64) return false
rather than signaling an error when given an unsupported expression
argument (such as a rounding mode value). The functions that do not have out
params signal an error in such cases. Z3_get_numeral_small is the odd one
out in that it signals errors and returns a status bool.
This error handling is the only difference between Z3_get_numeral_small and
Z3_get_numeral_rational_int64, so this patch adds a comment to the
documentation.
2025-03-29 10:02:32 -07:00
Nikolaj Bjorner
ef275ab1a0
fix #7523
2025-01-22 11:46:11 -08:00
Nuno Lopes
bd8c870bbe
api: avoid some string copies when using mk_external_string
2024-12-28 09:42:54 +00:00
Nikolaj Bjorner
59b18d4a14
create as_bin as_hex wrappers for display
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-12 09:19:22 -08:00
Nuno Lopes
b2d5c24c1d
remove a few string copies
2023-12-20 16:55:09 +00:00
Nikolaj Bjorner
32f8705ac3
#7001 - align is_numeral without to behavior if is_numeral with return numeral.
2023-11-19 10:43:14 -08:00
Nikolaj Bjorner
ee80414e55
sketch initial for mpz/mpq numeral creation
2022-07-27 10:46:03 +02:00
Nuno Lopes
73a24ca0a9
remove '#include <iostream>' from headers and from unneeded places
...
It's harmful to have iostream everywhere as it injects functions in the compiled files
2022-06-17 14:10:19 +01:00
Nuno Lopes
23e6adcad3
fix a couple hundred deref-after-free bugs due to .c_str() on a temporary string
2020-07-11 20:24:45 +01:00
Nikolaj Bjorner
4a8533e41f
enable binary string access to unsigned numerals over API #4568
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-07 18:17:54 -07:00
Christoph M. Wintersteiger
580faa72aa
Fix FPA rounding mode for FP string numerals. Fixes #2851 .
2020-01-09 17:11:08 +00:00
Nuno Lopes
423e084cda
remove unused var
2019-10-19 17:36:57 +01:00
Nikolaj Bjorner
a990e7f02e
add visitor example, fix double conversion
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-11 12:37:26 -07:00
Christoph M. Wintersteiger
2f60bcbfcb
Clean up NaN return values in Z3_get_numeral_double
2019-08-19 14:43:39 +01:00
Christoph M. Wintersteiger
f22d6e399d
Fix floats in Z3_get_numeral_*string.
2019-08-19 13:10:43 +01:00
Christoph M. Wintersteiger
79cd1f0edc
Fixed Z3_get_numeral_double. Fixes #2501 .
2019-08-19 12:37:02 +01:00
Nuno Lopes
6bbe8e2619
add some static
2019-07-07 15:30:32 +01:00
Sebastian Buchwald
5690dbcbfd
Fix enum type of case labels
2018-12-06 00:08:29 +01:00
Bruce Mitchener
edf8ba44d1
Switch from using Z3_bool to using bool.
...
This is a continuation of the work started by using stdbool and
continued by switching from Z3_TRUE|FALSE to true|false.
2018-11-20 11:27:09 +07:00
Nikolaj Bjorner
5a825d7ac3
true is true, false is not true, it is false
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-19 09:37:23 -08:00
Bruce Mitchener
56bbed173e
Remove usages of Z3_TRUE / Z3_FALSE.
...
Now that this is all using stdbool.h, we can just use true/false.
For now, we leave the aliases in place in z3_api.h.
2018-11-20 00:25:37 +07:00
Nikolaj Bjorner
694a6a26c9
bump version, add double access
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-19 20:20:08 -07:00
Nikolaj Bjorner
8b4e1c1209
fix #1793
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-08-06 18:13:26 -07:00
Nikolaj Bjorner
5380b01fd1
bool -> string
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-29 00:44:40 -07:00
Nikolaj Bjorner
1cb3f7c792
fixing #1520
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-28 18:03:13 -07:00
Nikolaj Bjorner
1eb8ccad59
overhaul of error messages. Add warning in dimacs conversion
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-04 16:04:37 -07:00
Bruce Mitchener
2fa304d8de
Remove int64, uint64 typedefs in favor of int64_t / uint64_t.
2018-03-31 14:45:04 +07:00
Bruce Mitchener
16a2ad9afd
Use stdint.h for int64_t / uint64_t in API.
...
Now that we can use stdint.h, we can use it to portably define
64 bit integer types for use in the API.
2018-03-30 23:06:24 +07:00
Bruce Mitchener
76eb7b9ede
Use nullptr.
2018-02-12 14:05:55 +07:00
Nikolaj Bjorner
e7851a0637
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-01-07 18:32:31 -08:00
Nikolaj Bjorner
482738bc8a
avoid reset_error in dec_ref in bv_val #1443 . Add BSD required template instance #1444
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-01-07 15:51:45 -08:00
Nikolaj Bjorner
7f13cf13f2
clean up bv_numeral code and fix bug in how they are initialized
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-15 15:00:11 -08:00
Nikolaj Bjorner
795e0c641a
add method to create bit-vectors directly from an array of Booleans
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-15 14:44:59 -08:00
Dan Liew
a2d7b43554
Update header includes to be relative to src/
directory.
2017-08-17 18:26:53 +01:00
Nikolaj Bjorner
b19f94ae5b
make include paths uniformly use path relative to src. #534
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Christoph M. Wintersteiger
0cb8193cdd
logic fix
2016-03-01 17:42:33 +00:00
Christoph M. Wintersteiger
c171170bed
Fixed FP string input conversions.
...
Fixes #464
2016-03-01 15:31:33 +00:00
Christoph M. Wintersteiger
00ce124db3
Bugfix for Z3_is_numeral for finite-domain numerals.
...
Relates to #318
2015-12-02 14:41:46 +00:00
Christoph M. Wintersteiger
52bbd67cd3
Whitespace
2015-12-02 14:40:47 +00:00
Christoph M. Wintersteiger
0c2e2d78dd
renamed function to avoid compilation issues
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-22 18:52:28 +00:00
Christoph M. Wintersteiger
0ab54b9e0c
bugfix for FPA numerals
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-21 19:43:26 +00:00
Christoph M. Wintersteiger
ee0ec7fe3a
FPA API: numerals, .NET and Java
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-10 17:28:07 +00:00
Christoph M. Wintersteiger
0381e4317a
Formatting, mostly tabs.
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-08 17:54:04 +00:00
Christoph M. Wintersteiger
c0bc2518b0
Renaming for consistency mk_value -> mk_numeral
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-08 14:22:44 +00:00
Christoph M. Wintersteiger
5e5758bb25
More float -> fpa renaming
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-08 13:37:18 +00:00
Christoph M. Wintersteiger
dd17f3c7d6
Renaming floats, float, Floats, Float -> FPA, fpa
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-08 13:18:56 +00:00
Christoph M. Wintersteiger
8b40d4a735
FPA theory bug fixes.
...
Also removed unnecessary intermediate variables.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2014-08-04 17:00:04 +01:00
Christoph M. Wintersteiger
165da842b7
Numeral API: added floating-point numeral cases.
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2013-06-14 13:12:44 +01:00
Christoph M. Wintersteiger
a9840b291f
FPA API: Tied into rest of the API;
...
added numeral/value handling through existing functions;
added trivial .NET example.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2013-06-10 19:06:45 +01:00
Leonardo de Moura
711abc75fb
Fix issue reported at http://z3.codeplex.com/workitem/14
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-24 13:22:28 -08:00