mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
Added full version strings and associated API functions.
This commit is contained in:
parent
5f5ef8b38d
commit
3587baaf24
12 changed files with 65 additions and 1 deletions
|
@ -430,6 +430,11 @@ extern "C" {
|
|||
*revision_number = Z3_REVISION_NUMBER;
|
||||
}
|
||||
|
||||
Z3_string Z3_API Z3_get_full_version(void) {
|
||||
LOG_Z3_get_full_version();
|
||||
return Z3_FULL_VERSION;
|
||||
}
|
||||
|
||||
void Z3_API Z3_enable_trace(Z3_string tag) {
|
||||
memory::initialize(UINT_MAX);
|
||||
LOG_Z3_enable_trace(tag);
|
||||
|
|
|
@ -83,6 +83,17 @@ namespace Microsoft.Z3
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A full version string
|
||||
/// </summary>
|
||||
public static string FullVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return Native.Z3_get_full_version();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A string representation of the version information.
|
||||
/// </summary>
|
||||
|
|
|
@ -63,6 +63,14 @@ public class Version
|
|||
return revision.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* A full version string
|
||||
**/
|
||||
public static String getFullVersion()
|
||||
{
|
||||
return Native.getFullVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* A string representation of the version information.
|
||||
**/
|
||||
|
|
|
@ -25,6 +25,8 @@ module Version =
|
|||
struct
|
||||
let (major, minor, build, revision) = Z3native.get_version ()
|
||||
|
||||
let full_version : string = Z3native.get_full_version()
|
||||
|
||||
let to_string =
|
||||
string_of_int major ^ "." ^
|
||||
string_of_int minor ^ "." ^
|
||||
|
|
|
@ -80,6 +80,9 @@ sig
|
|||
(** The revision. *)
|
||||
val revision : int
|
||||
|
||||
(** A full version string. *)
|
||||
val full_version : string
|
||||
|
||||
(** A string representation of the version information. *)
|
||||
val to_string : string
|
||||
end
|
||||
|
|
|
@ -79,6 +79,9 @@ def get_version():
|
|||
Z3_get_version(major, minor, build, rev)
|
||||
return (major.value, minor.value, build.value, rev.value)
|
||||
|
||||
def get_full_version():
|
||||
return Z3_get_full_version()
|
||||
|
||||
# We use _z3_assert instead of the assert command because we want to
|
||||
# produce nice error messages in Z3Py at rise4fun.com
|
||||
def _z3_assert(cond, msg):
|
||||
|
|
|
@ -5139,6 +5139,13 @@ extern "C" {
|
|||
*/
|
||||
void Z3_API Z3_get_version(unsigned * major, unsigned * minor, unsigned * build_number, unsigned * revision_number);
|
||||
|
||||
/**
|
||||
\brief Return a string that fully describes the version of Z3 in use.
|
||||
|
||||
def_API('Z3_get_full_version', STRING, ())
|
||||
*/
|
||||
Z3_string Z3_API Z3_get_full_version(void);
|
||||
|
||||
/**
|
||||
\brief Enable tracing messages tagged as \c tag when Z3 is compiled in debug mode.
|
||||
It is a NOOP otherwise
|
||||
|
|
|
@ -3,3 +3,5 @@
|
|||
#define Z3_MINOR_VERSION @Z3_VERSION_MINOR@
|
||||
#define Z3_BUILD_NUMBER @Z3_VERSION_PATCH@
|
||||
#define Z3_REVISION_NUMBER @Z3_VERSION_TWEAK@
|
||||
|
||||
#define Z3_FULL_VERSION @Z3_FULL_VERSION@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue