mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
checkpoint
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
1d795e9a5e
commit
c4898a67e3
|
@ -75,7 +75,7 @@ add_lib('portfolio', ['smtlogic_tactics', 'ufbv_strategy', 'fpa', 'aig', 'muz_qe
|
||||||
add_lib('api', ['portfolio', 'user_plugin'])
|
add_lib('api', ['portfolio', 'user_plugin'])
|
||||||
add_lib('array_property', ['ast', 'rewriter'])
|
add_lib('array_property', ['ast', 'rewriter'])
|
||||||
add_exe('shell', ['api', 'sat', 'extra_cmds'], exe_name='z3')
|
add_exe('shell', ['api', 'sat', 'extra_cmds'], exe_name='z3')
|
||||||
add_exe('test', ['api', 'fuzzing', 'array_property'])
|
add_exe('test', ['api', 'fuzzing', 'array_property'], exe_name='test-z3')
|
||||||
|
|
||||||
# mk_vs_solution()
|
# mk_vs_solution()
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,9 @@ _ComponentNames = sets.Set()
|
||||||
_Name2Component = {}
|
_Name2Component = {}
|
||||||
_Processed_Headers = sets.Set()
|
_Processed_Headers = sets.Set()
|
||||||
|
|
||||||
|
def get_cpp_files(path):
|
||||||
|
return filter(lambda f: f.endswith('.cpp'), os.listdir(path))
|
||||||
|
|
||||||
def find_all_deps(name, deps):
|
def find_all_deps(name, deps):
|
||||||
new_deps = []
|
new_deps = []
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
|
@ -154,8 +157,7 @@ class Component:
|
||||||
out.write(' -I%s' % _Name2Component[dep].to_src_dir)
|
out.write(' -I%s' % _Name2Component[dep].to_src_dir)
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
mk_dir('%s/%s' % (BUILD_DIR, self.build_dir))
|
mk_dir('%s/%s' % (BUILD_DIR, self.build_dir))
|
||||||
for cppfile in glob.glob(os.path.join(self.src_dir, '*.cpp')):
|
for cppfile in get_cpp_files(self.src_dir):
|
||||||
cppfile = os.path.basename(cppfile)
|
|
||||||
self.add_cpp_rules(out, include_defs, cppfile)
|
self.add_cpp_rules(out, include_defs, cppfile)
|
||||||
|
|
||||||
class LibComponent(Component):
|
class LibComponent(Component):
|
||||||
|
@ -166,8 +168,7 @@ class LibComponent(Component):
|
||||||
Component.mk_makefile(self, out)
|
Component.mk_makefile(self, out)
|
||||||
# generate rule for lib
|
# generate rule for lib
|
||||||
objs = []
|
objs = []
|
||||||
for cppfile in glob.glob(os.path.join(self.src_dir, '*.cpp')):
|
for cppfile in get_cpp_files(self.src_dir):
|
||||||
cppfile = os.path.basename(cppfile)
|
|
||||||
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
|
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
|
||||||
objs.append(objfile)
|
objs.append(objfile)
|
||||||
|
|
||||||
|
@ -184,14 +185,13 @@ class LibComponent(Component):
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
out.write('%s: %s\n\n' % (self.name, libfile))
|
out.write('%s: %s\n\n' % (self.name, libfile))
|
||||||
|
|
||||||
|
# Auxiliary function for sort_components
|
||||||
def comp_components(c1, c2):
|
def comp_components(c1, c2):
|
||||||
id1 = _Name2Component[c1].id
|
id1 = _Name2Component[c1].id
|
||||||
id2 = _Name2Component[c2].id
|
id2 = _Name2Component[c2].id
|
||||||
if id1 < id2: return -1
|
return id2 - id1
|
||||||
if id2 > id1: return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
# Sort components based on definition time
|
# Sort components based on (reverse) definition time
|
||||||
def sort_components(cnames):
|
def sort_components(cnames):
|
||||||
return sorted(cnames, cmp=comp_components)
|
return sorted(cnames, cmp=comp_components)
|
||||||
|
|
||||||
|
@ -210,17 +210,16 @@ class ExeComponent(Component):
|
||||||
exefile = '%s$(EXE_EXT)' % self.exe_name
|
exefile = '%s$(EXE_EXT)' % self.exe_name
|
||||||
out.write('%s:' % exefile)
|
out.write('%s:' % exefile)
|
||||||
deps = sort_components(self.deps)
|
deps = sort_components(self.deps)
|
||||||
for dep in deps:
|
|
||||||
c_dep = _Name2Component[dep]
|
|
||||||
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
|
|
||||||
objs = []
|
objs = []
|
||||||
for cppfile in glob.glob(os.path.join(self.src_dir, '*.cpp')):
|
for cppfile in get_cpp_files(self.src_dir):
|
||||||
cppfile = os.path.basename(cppfile)
|
|
||||||
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
|
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
|
||||||
objs.append(objfile)
|
objs.append(objfile)
|
||||||
for obj in objs:
|
for obj in objs:
|
||||||
out.write(' ')
|
out.write(' ')
|
||||||
out.write(obj)
|
out.write(obj)
|
||||||
|
for dep in deps:
|
||||||
|
c_dep = _Name2Component[dep]
|
||||||
|
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
out.write('\t$(LINK) $(LINK_OUT_FLAG)%s $(LINK_FLAGS)' % exefile)
|
out.write('\t$(LINK) $(LINK_OUT_FLAG)%s $(LINK_FLAGS)' % exefile)
|
||||||
for obj in objs:
|
for obj in objs:
|
||||||
|
|
|
@ -167,7 +167,6 @@ int main(int argc, char ** argv) {
|
||||||
TST(interval_skip_list);
|
TST(interval_skip_list);
|
||||||
TST(no_overflow);
|
TST(no_overflow);
|
||||||
TST(memory);
|
TST(memory);
|
||||||
TST(parallel);
|
|
||||||
TST(get_implied_equalities);
|
TST(get_implied_equalities);
|
||||||
TST(arith_simplifier_plugin);
|
TST(arith_simplifier_plugin);
|
||||||
TST(quant_elim);
|
TST(quant_elim);
|
||||||
|
|
Loading…
Reference in a new issue