mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
Added 16 bit string-encoding (#5540)
This commit is contained in:
parent
e70f501932
commit
47fdd6c060
7 changed files with 74 additions and 35 deletions
|
@ -106,8 +106,15 @@ void context_params::set(char const * param, char const * value) {
|
|||
else if (p == "smtlib2_compliant") {
|
||||
set_bool(m_smtlib2_compliant, param, value);
|
||||
}
|
||||
else if (p == "unicode") {
|
||||
set_bool(m_unicode, param, value);
|
||||
else if (p == "encoding") {
|
||||
if (strcmp(value, "unicode") == 0 || strcmp(value, "bmp") == 0 || strcmp(value, "ascii") == 0) {
|
||||
m_encoding = value;
|
||||
}
|
||||
else {
|
||||
std::stringstream strm;
|
||||
strm << "invalid value '" << value << "' for parameter '" << param << "' (supported: unicode, bmp, ascii)";
|
||||
throw default_exception(strm.str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
param_descrs d;
|
||||
|
@ -140,7 +147,7 @@ void context_params::updt_params(params_ref const & p) {
|
|||
m_debug_ref_count = p.get_bool("debug_ref_count", m_debug_ref_count);
|
||||
m_smtlib2_compliant = p.get_bool("smtlib2_compliant", m_smtlib2_compliant);
|
||||
m_statistics = p.get_bool("stats", m_statistics);
|
||||
m_unicode = p.get_bool("unicode", m_unicode);
|
||||
m_encoding = p.get_str("encoding", m_encoding.c_str());
|
||||
}
|
||||
|
||||
void context_params::collect_param_descrs(param_descrs & d) {
|
||||
|
@ -157,7 +164,7 @@ void context_params::collect_param_descrs(param_descrs & d) {
|
|||
d.insert("debug_ref_count", CPK_BOOL, "debug support for AST reference counting", "false");
|
||||
d.insert("smtlib2_compliant", CPK_BOOL, "enable/disable SMT-LIB 2.0 compliance", "false");
|
||||
d.insert("stats", CPK_BOOL, "enable/disable statistics", "false");
|
||||
d.insert("unicode", CPK_BOOL, "use unicode strings instead of ASCII strings");
|
||||
d.insert("encoding", CPK_STRING, "string encoding used internally: unicode|bmp|ascii", "unicode");
|
||||
// statistics are hidden as they are controlled by the /st option.
|
||||
collect_solver_param_descrs(d);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ Notes:
|
|||
#pragma once
|
||||
|
||||
#include "util/params.h"
|
||||
#include "util/zstring.h"
|
||||
|
||||
class context_params {
|
||||
void set_bool(bool & opt, char const * param, char const * value);
|
||||
|
@ -28,21 +29,21 @@ class context_params {
|
|||
unsigned m_rlimit { 0 };
|
||||
|
||||
public:
|
||||
unsigned m_timeout { UINT_MAX } ;
|
||||
std::string m_dot_proof_file;
|
||||
std::string m_trace_file_name;
|
||||
bool m_auto_config { true };
|
||||
bool m_proof { false };
|
||||
bool m_debug_ref_count { false };
|
||||
bool m_trace { false };
|
||||
bool m_well_sorted_check { false };
|
||||
bool m_model { true };
|
||||
bool m_model_validate { false };
|
||||
bool m_dump_models { false };
|
||||
bool m_unsat_core { false };
|
||||
bool m_smtlib2_compliant { false }; // it must be here because it enable/disable the use of coercions in the ast_manager.
|
||||
bool m_statistics { false };
|
||||
bool m_unicode { true };
|
||||
unsigned m_timeout { UINT_MAX } ;
|
||||
std::string m_dot_proof_file;
|
||||
std::string m_trace_file_name;
|
||||
bool m_auto_config { true };
|
||||
bool m_proof { false };
|
||||
bool m_debug_ref_count { false };
|
||||
bool m_trace { false };
|
||||
bool m_well_sorted_check { false };
|
||||
bool m_model { true };
|
||||
bool m_model_validate { false };
|
||||
bool m_dump_models { false };
|
||||
bool m_unsat_core { false };
|
||||
bool m_smtlib2_compliant { false }; // it must be here because it enable/disable the use of coercions in the ast_manager.
|
||||
bool m_statistics { false };
|
||||
std::string m_encoding { "unicode" };
|
||||
|
||||
unsigned rlimit() const { return m_rlimit; }
|
||||
context_params();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue