mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 12:23:38 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
aab63dc126
8 changed files with 625 additions and 626 deletions
|
@ -50,7 +50,7 @@ def add_missing_cr(dir):
|
||||||
if f.endswith('.cpp') or f.endswith('.h') or f.endswith('.c') or f.endswith('.cs'):
|
if f.endswith('.cpp') or f.endswith('.h') or f.endswith('.c') or f.endswith('.cs'):
|
||||||
path = "%s\\%s" % (root, f)
|
path = "%s\\%s" % (root, f)
|
||||||
if not has_cr(path):
|
if not has_cr(path):
|
||||||
print "Missing CR for %s" % path
|
print("Missing CR for %s" % path)
|
||||||
add_cr(path)
|
add_cr(path)
|
||||||
|
|
||||||
add_missing_cr('src')
|
add_missing_cr('src')
|
||||||
|
|
|
@ -42,16 +42,16 @@ def set_build_dir(path):
|
||||||
mk_dir(BUILD_DIR)
|
mk_dir(BUILD_DIR)
|
||||||
|
|
||||||
def display_help():
|
def display_help():
|
||||||
print "mk_unix_dist.py: Z3 Linux/OSX/BSD distribution generator\n"
|
print("mk_unix_dist.py: Z3 Linux/OSX/BSD distribution generator\n")
|
||||||
print "This script generates the zip files containing executables, shared objects, header files for Linux/OSX/BSD."
|
print("This script generates the zip files containing executables, shared objects, header files for Linux/OSX/BSD.")
|
||||||
print "It must be executed from the Z3 root directory."
|
print("It must be executed from the Z3 root directory.")
|
||||||
print "\nOptions:"
|
print("\nOptions:")
|
||||||
print " -h, --help display this message."
|
print(" -h, --help display this message.")
|
||||||
print " -s, --silent do not print verbose messages."
|
print(" -s, --silent do not print verbose messages.")
|
||||||
print " -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist)."
|
print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).")
|
||||||
print " -f, --force force script to regenerate Makefiles."
|
print(" -f, --force force script to regenerate Makefiles.")
|
||||||
print " --nojava do not include Java bindings in the binary distribution files."
|
print(" --nojava do not include Java bindings in the binary distribution files.")
|
||||||
print " --githash include git hash in the Zip file."
|
print(" --githash include git hash in the Zip file.")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
# Parse configuration option for mk_make script
|
# Parse configuration option for mk_make script
|
||||||
|
@ -169,7 +169,7 @@ def mk_dist_dir():
|
||||||
mk_util.JAVA_ENABLED = JAVA_ENABLED
|
mk_util.JAVA_ENABLED = JAVA_ENABLED
|
||||||
mk_unix_dist(build_path, dist_path)
|
mk_unix_dist(build_path, dist_path)
|
||||||
if is_verbose():
|
if is_verbose():
|
||||||
print "Generated distribution folder at '%s'" % dist_path
|
print("Generated distribution folder at '%s'" % dist_path)
|
||||||
|
|
||||||
ZIPOUT = None
|
ZIPOUT = None
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ def mk_zip():
|
||||||
ZIPOUT = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
|
ZIPOUT = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
|
||||||
os.path.walk(dist_path, mk_zip_visitor, '*')
|
os.path.walk(dist_path, mk_zip_visitor, '*')
|
||||||
if is_verbose():
|
if is_verbose():
|
||||||
print "Generated '%s'" % zfname
|
print("Generated '%s'" % zfname)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
ZIPOUT = None
|
ZIPOUT = None
|
||||||
|
|
|
@ -10,7 +10,7 @@ endif = re.compile("#endif /\* \_(.*)\_H\_")
|
||||||
|
|
||||||
|
|
||||||
def fix_hdr(file):
|
def fix_hdr(file):
|
||||||
print file
|
print(file)
|
||||||
tmp = "%s.tmp" % file
|
tmp = "%s.tmp" % file
|
||||||
ins = open(file)
|
ins = open(file)
|
||||||
ous = open(tmp,'w')
|
ous = open(tmp,'w')
|
||||||
|
@ -29,7 +29,7 @@ def fix_hdr(file):
|
||||||
continue
|
continue
|
||||||
m = ifndef.search(line)
|
m = ifndef.search(line)
|
||||||
if m:
|
if m:
|
||||||
print m.group(1)
|
print(m.group(1))
|
||||||
ous.write("#ifndef ")
|
ous.write("#ifndef ")
|
||||||
ous.write(m.group(1))
|
ous.write(m.group(1))
|
||||||
ous.write("_H_\n")
|
ous.write("_H_\n")
|
||||||
|
|
|
@ -3208,7 +3208,7 @@ namespace Microsoft.Z3
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a tactic that applies the given tactics in parallel.
|
/// Create a tactic that applies the given tactics in parallel until one of them succeeds (i.e., the first that doesn't fail).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Tactic ParOr(params Tactic[] t)
|
public Tactic ParOr(params Tactic[] t)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2563,7 +2563,7 @@ public class Context extends IDisposable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a tactic that applies the given tactics in parallel.
|
* Create a tactic that applies the given tactics in parallel until one of them succeeds (i.e., the first that doesn't fail).
|
||||||
**/
|
**/
|
||||||
public Tactic parOr(Tactic... t)
|
public Tactic parOr(Tactic... t)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2941,7 +2941,7 @@ sig
|
||||||
Alias for [UsingParams]*)
|
Alias for [UsingParams]*)
|
||||||
val with_ : context -> tactic -> Params.params -> tactic
|
val with_ : context -> tactic -> Params.params -> tactic
|
||||||
|
|
||||||
(** Create a tactic that applies the given tactics in parallel. *)
|
(** Create a tactic that applies the given tactics in parallel until one of them succeeds (i.e., the first that doesn't fail). *)
|
||||||
val par_or : context -> tactic list -> tactic
|
val par_or : context -> tactic list -> tactic
|
||||||
|
|
||||||
(** Create a tactic that applies a tactic to a given goal and then another tactic
|
(** Create a tactic that applies a tactic to a given goal and then another tactic
|
||||||
|
|
|
@ -94,8 +94,8 @@ void help_tactic(cmd_context & ctx) {
|
||||||
std::ostringstream buf;
|
std::ostringstream buf;
|
||||||
buf << "combinators:\n";
|
buf << "combinators:\n";
|
||||||
buf << "- (and-then <tactic>+) executes the given tactics sequencially.\n";
|
buf << "- (and-then <tactic>+) executes the given tactics sequencially.\n";
|
||||||
buf << "- (or-else <tactic>+) tries the given tactics in sequence until one of them succeeds.\n";
|
buf << "- (or-else <tactic>+) tries the given tactics in sequence until one of them succeeds (i.e., the first that doesn't fail).\n";
|
||||||
buf << "- (par-or <tactic>+) executes the given tactics in parallel until one of them succeeds.\n";
|
buf << "- (par-or <tactic>+) executes the given tactics in parallel until one of them succeeds (i.e., the first that doesn't fail).\n";
|
||||||
buf << "- (par-then <tactic1> <tactic2>) executes tactic1 and then tactic2 to every subgoal produced by tactic1. All subgoals are processed in parallel.\n";
|
buf << "- (par-then <tactic1> <tactic2>) executes tactic1 and then tactic2 to every subgoal produced by tactic1. All subgoals are processed in parallel.\n";
|
||||||
buf << "- (try-for <tactic> <num>) excutes the given tactic for at most <num> milliseconds, it fails if the execution takes more than <num> milliseconds.\n";
|
buf << "- (try-for <tactic> <num>) excutes the given tactic for at most <num> milliseconds, it fails if the execution takes more than <num> milliseconds.\n";
|
||||||
buf << "- (if <probe> <tactic> <tactic>) if <probe> evaluates to true, then execute the first tactic. Otherwise execute the second.\n";
|
buf << "- (if <probe> <tactic> <tactic>) if <probe> evaluates to true, then execute the first tactic. Otherwise execute the second.\n";
|
||||||
|
|
|
@ -573,11 +573,10 @@ public:
|
||||||
|
|
||||||
try {
|
try {
|
||||||
t(in_copy, _result, _mc, _pc, _core);
|
t(in_copy, _result, _mc, _pc, _core);
|
||||||
bool successful = is_decided(_result);
|
|
||||||
bool first = false;
|
bool first = false;
|
||||||
#pragma omp critical (par_tactical)
|
#pragma omp critical (par_tactical)
|
||||||
{
|
{
|
||||||
if (successful && finished_id == UINT_MAX) {
|
if (finished_id == UINT_MAX) {
|
||||||
finished_id = i;
|
finished_id = i;
|
||||||
first = true;
|
first = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue