| 1 |
############################################ |
| 2 |
# Copyright (c) 2012 Microsoft Corporation |
| 3 |
# |
| 4 |
# Z3 project configuration files |
| 5 |
# |
| 6 |
# Author: Leonardo de Moura (leonardo) |
| 7 |
############################################ |
| 8 |
from mk_util import * |
| 9 |
|
| 10 |
def init_version(): |
| 11 |
set_version(4, 13, 3, 0) # express a default build version or pick up ci build version |
| 12 |
|
| 13 |
# Z3 Project definition |
| 14 |
def init_project_def(): |
| 15 |
init_version() |
| 16 |
add_lib('util', [], includes2install = ['z3_version.h']) |
| 17 |
add_lib('polynomial', ['util'], 'math/polynomial') |
| 18 |
add_lib('interval', ['util'], 'math/interval') |
| 19 |
add_lib('dd', ['util', 'interval'], 'math/dd') |
| 20 |
add_lib('simplex', ['util'], 'math/simplex') |
| 21 |
add_lib('hilbert', ['util'], 'math/hilbert') |
| 22 |
add_lib('automata', ['util'], 'math/automata') |
| 23 |
add_lib('params', ['util']) |
| 24 |
add_lib('realclosure', ['interval'], 'math/realclosure') |
| 25 |
add_lib('subpaving', ['interval'], 'math/subpaving') |
| 26 |
add_lib('ast', ['util', 'polynomial']) |
| 27 |
add_lib('smt_params', ['ast', 'params'], 'smt/params') |
| 28 |
add_lib('parser_util', ['ast'], 'parsers/util') |
| 29 |
add_lib('euf', ['ast'], 'ast/euf') |
| 30 |
add_lib('grobner', ['ast', 'dd', 'simplex'], 'math/grobner') |
| 31 |
add_lib('sat', ['params', 'util', 'dd', 'grobner']) |
| 32 |
add_lib('nlsat', ['polynomial', 'sat']) |
| 33 |
add_lib('lp', ['util', 'nlsat', 'grobner', 'interval', 'smt_params'], 'math/lp') |
| 34 |
add_lib('rewriter', ['ast', 'polynomial', 'interval', 'automata', 'params'], 'ast/rewriter') |
| 35 |
add_lib('bit_blaster', ['rewriter'], 'ast/rewriter/bit_blaster') |
| 36 |
add_lib('normal_forms', ['rewriter'], 'ast/normal_forms') |
| 37 |
add_lib('substitution', ['rewriter'], 'ast/substitution') |
| 38 |
add_lib('proofs', ['rewriter'], 'ast/proofs') |
| 39 |
add_lib('macros', ['rewriter'], 'ast/macros') |
| 40 |
add_lib('model', ['macros']) |
| 41 |
add_lib('converters', ['model'], 'ast/converters') |
| 42 |
add_lib('simplifiers', ['euf', 'normal_forms', 'bit_blaster', 'converters', 'substitution'], 'ast/simplifiers') |
| 43 |
add_lib('ast_sls', ['ast','normal_forms','converters'], 'ast/sls') |
| 44 |
add_lib('tactic', ['simplifiers']) |
| 45 |
add_lib('mbp', ['model', 'simplex'], 'qe/mbp') |
| 46 |
add_lib('qe_lite', ['tactic', 'mbp'], 'qe/lite') |
| 47 |
add_lib('solver', ['params', 'smt_params', 'model', 'tactic', 'qe_lite', 'proofs']) |
| 48 |
add_lib('cmd_context', ['solver', 'rewriter', 'params']) |
| 49 |
add_lib('smt2parser', ['cmd_context', 'parser_util'], 'parsers/smt2') |
| 50 |
add_lib('pattern', ['normal_forms', 'smt2parser', 'rewriter'], 'ast/pattern') |
| 51 |
add_lib('aig_tactic', ['tactic'], 'tactic/aig') |
| 52 |
add_lib('ackermannization', ['model', 'rewriter', 'ast', 'solver', 'tactic'], 'ackermannization') |
| 53 |
add_lib('fpa', ['ast', 'util', 'rewriter', 'model'], 'ast/fpa') |
| 54 |
add_lib('core_tactics', ['tactic', 'macros', 'normal_forms', 'rewriter', 'pattern'], 'tactic/core') |
| 55 |
add_lib('arith_tactics', ['core_tactics', 'sat'], 'tactic/arith') |
| 56 |
add_lib('solver_assertions', ['pattern','smt_params','cmd_context','qe_lite'], 'solver/assertions') |
| 57 |
add_lib('subpaving_tactic', ['core_tactics', 'subpaving'], 'math/subpaving/tactic') |
| 58 |
|
| 59 |
add_lib('proto_model', ['model', 'rewriter', 'smt_params'], 'smt/proto_model') |
| 60 |
add_lib('smt', ['bit_blaster', 'macros', 'normal_forms', 'cmd_context', 'proto_model', 'solver_assertions', |
| 61 |
'substitution', 'grobner', 'simplex', 'proofs', 'pattern', 'parser_util', 'fpa', 'lp']) |
| 62 |
add_lib('sat_smt', ['sat', 'ast_sls', 'euf', 'smt', 'tactic', 'solver', 'smt_params', 'bit_blaster', 'fpa', 'mbp', 'normal_forms', 'lp', 'pattern', 'qe_lite'], 'sat/smt') |
| 63 |
add_lib('sat_tactic', ['tactic', 'sat', 'solver', 'sat_smt'], 'sat/tactic') |
| 64 |
add_lib('nlsat_tactic', ['nlsat', 'sat_tactic', 'arith_tactics'], 'nlsat/tactic') |
| 65 |
add_lib('bv_tactics', ['tactic', 'bit_blaster', 'core_tactics'], 'tactic/bv') |
| 66 |
add_lib('fuzzing', ['ast'], 'test/fuzzing') |
| 67 |
add_lib('smt_tactic', ['smt'], 'smt/tactic') |
| 68 |
add_lib('sls_tactic', ['tactic', 'normal_forms', 'core_tactics', 'bv_tactics', 'ast_sls'], 'tactic/sls') |
| 69 |
add_lib('qe', ['smt', 'mbp', 'qe_lite', 'nlsat', 'tactic', 'nlsat_tactic'], 'qe') |
| 70 |
add_lib('sat_solver', ['solver', 'core_tactics', 'aig_tactic', 'bv_tactics', 'arith_tactics', 'sat_tactic'], 'sat/sat_solver') |
| 71 |
add_lib('fd_solver', ['core_tactics', 'arith_tactics', 'sat_solver', 'smt'], 'tactic/fd_solver') |
| 72 |
add_lib('muz', ['smt', 'sat', 'smt2parser', 'aig_tactic', 'qe'], 'muz/base') |
| 73 |
add_lib('dataflow', ['muz'], 'muz/dataflow') |
| 74 |
add_lib('transforms', ['muz', 'hilbert', 'dataflow'], 'muz/transforms') |
| 75 |
add_lib('rel', ['muz', 'transforms'], 'muz/rel') |
| 76 |
add_lib('spacer', ['muz', 'transforms', 'arith_tactics', 'smt_tactic'], 'muz/spacer') |
| 77 |
add_lib('clp', ['muz', 'transforms'], 'muz/clp') |
| 78 |
add_lib('tab', ['muz', 'transforms'], 'muz/tab') |
| 79 |
add_lib('ddnf', ['muz', 'transforms', 'rel'], 'muz/ddnf') |
| 80 |
add_lib('bmc', ['muz', 'transforms', 'fd_solver'], 'muz/bmc') |
| 81 |
add_lib('fp', ['muz', 'clp', 'tab', 'rel', 'bmc', 'ddnf', 'spacer'], 'muz/fp') |
| 82 |
add_lib('smtlogic_tactics', ['ackermannization', 'sat_solver', 'arith_tactics', 'bv_tactics', 'nlsat_tactic', 'smt_tactic', 'aig_tactic', 'fp', 'muz', 'qe'], 'tactic/smtlogics') |
| 83 |
add_lib('ufbv_tactic', ['normal_forms', 'core_tactics', 'macros', 'smt_tactic', 'rewriter', 'smtlogic_tactics'], 'tactic/ufbv') |
| 84 |
add_lib('fpa_tactics', ['fpa', 'core_tactics', 'bv_tactics', 'sat_tactic', 'smt_tactic', 'arith_tactics', 'smtlogic_tactics'], 'tactic/fpa') |
| 85 |
add_lib('portfolio', ['smtlogic_tactics', 'sat_solver', 'ufbv_tactic', 'fpa_tactics', 'aig_tactic', 'fp', 'fd_solver', 'qe', 'sls_tactic', 'subpaving_tactic'], 'tactic/portfolio') |
| 86 |
add_lib('opt', ['smt', 'smtlogic_tactics', 'sls_tactic', 'sat_solver'], 'opt') |
| 87 |
API_files = ['z3_api.h', 'z3_ast_containers.h', 'z3_algebraic.h', 'z3_polynomial.h', 'z3_rcf.h', 'z3_fixedpoint.h', 'z3_optimization.h', 'z3_fpa.h', 'z3_spacer.h'] |
| 88 |
add_lib('extra_cmds', ['cmd_context', 'subpaving_tactic', 'qe', 'euf', 'arith_tactics'], 'cmd_context/extra_cmds') |
| 89 |
add_lib('api', ['portfolio', 'realclosure', 'opt', 'extra_cmds'], |
| 90 |
includes2install=['z3.h', 'z3_v1.h', 'z3_macros.h'] + API_files) |
| 91 |
add_exe('shell', ['api', 'sat', 'extra_cmds', 'opt'], exe_name='z3') |
| 92 |
add_exe('test', ['api', 'fuzzing', 'simplex', 'sat_smt'], exe_name='test-z3', install=False) |
| 93 |
_libz3Component = add_dll('api_dll', ['api', 'sat', 'extra_cmds'], 'api/dll', |
| 94 |
reexports=['api'], |
| 95 |
dll_name='libz3', |
| 96 |
static=build_static_lib(), |
| 97 |
export_files=API_files, |
| 98 |
staging_link='python') |
| 99 |
add_dot_net_core_dll('dotnet', ['api_dll'], 'api/dotnet', dll_name='Microsoft.Z3', default_key_file='src/api/dotnet/Microsoft.Z3.snk') |
| 100 |
add_java_dll('java', ['api_dll'], 'api/java', dll_name='libz3java', package_name="com.microsoft.z3", manifest_file='manifest') |
| 101 |
add_ml_lib('ml', ['api_dll'], 'api/ml', lib_name='libz3ml') |
| 102 |
add_hlib('cpp', 'api/c++', includes2install=['z3++.h']) |
| 103 |
set_z3py_dir('api/python') |
| 104 |
add_python(_libz3Component) |
| 105 |
add_python_install(_libz3Component) |
| 106 |
add_js() |
| 107 |
# Examples |
| 108 |
add_cpp_example('cpp_example', 'c++') |
| 109 |
add_cpp_example('z3_tptp', 'tptp') |
| 110 |
add_c_example('c_example', 'c') |
| 111 |
add_c_example('maxsat') |
| 112 |
add_dotnet_example('dotnet_example', 'dotnet') |
| 113 |
add_java_example('java_example', 'java') |
| 114 |
add_ml_example('ml_example', 'ml') |
| 115 |
add_z3py_example('py_example', 'python') |
| 116 |
return API_files |
| 117 |
|
| 118 |
|