Skip to content

Commit b81ab94

Browse files
pipeline with release mode (#4206)
* pipeline with release mode Signed-off-by: Nikolaj Bjorner <[email protected]> * na Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent be998c3 commit b81ab94

File tree

6 files changed

+148
-78
lines changed

6 files changed

+148
-78
lines changed

azure-pipelines.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11

22
variables:
3+
cmakeJulia: '-DZ3_BUILD_JULIA_BINDINGS=True'
4+
cmakeJava: '-DZ3_BUILD_JAVA_BINDINGS=True'
5+
cmakeNet: '-DZ3_BUILD_DOTNET_BINDINGS=True'
6+
cmakePy: '-DZ3_BUILD_PYTHON_BINDINGS=True'
37
cmakeStdArgs: '-DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
48
asanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=address -fno-omit-frame-pointer" CFLAGS="${CFLAGS} -fsanitize=address -fno-omit-frame-pointer"'
59
ubsanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=undefined" CFLAGS="${CFLAGS} -fsanitize=undefined"'
610
msanEnv: 'CC=clang LDFLAGS="-L../libcxx/libcxx_msan/lib -lc++abi -Wl,-rpath=../libcxx/libcxx_msan/lib" CXX=clang++ CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -fsanitize-memory-track-origins -fsanitize=memory -fPIE -fno-omit-frame-pointer -g -O2" CFLAGS="${CFLAGS} -stdlib=libc -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -g -O2"'
711

12+
13+
# TBD:
14+
# test python bindings
15+
# build documentation
16+
# Asan, ubsan, msan
17+
# Disabled pending clang dependencies for std::unordered_map
18+
819
jobs:
920

1021
- job: "LinuxPythonDebug"
@@ -30,10 +41,7 @@ jobs:
3041
- template: scripts/test-regressions.yml
3142
- template: scripts/generate-doc.yml
3243

33-
# ./cpp_example
34-
# ./c_example
35-
36-
- job: "Ubuntu18"
44+
- job: "Ubuntu18Python"
3745
displayName: "Ubuntu 18 with ocaml"
3846
pool:
3947
vmImage: "Ubuntu-18.04"
@@ -54,11 +62,6 @@ jobs:
5462
- template: scripts/test-z3.yml
5563
- template: scripts/test-regressions.yml
5664

57-
# TBD:
58-
# test python bindings
59-
# build documentation
60-
# Asan, ubsan, msan
61-
# Disabled pending clang dependencies for std::unordered_map
6265

6366
- job: "LinuxMSan"
6467
displayName: "Ubuntu build - cmake"
@@ -94,7 +97,7 @@ jobs:
9497
# - template: scripts/test-java-cmake.yml
9598
# - template: scripts/test-regressions.yml
9699

97-
- job: "LinuxCMake"
100+
- job: "Ubuntu16CMake"
98101
displayName: "Ubuntu build - cmake"
99102
pool:
100103
vmImage: "Ubuntu-16.04"
@@ -108,7 +111,7 @@ jobs:
108111
debugClang:
109112
setupCmd1: 'julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\", version=\"0.7.0\"))"'
110113
setupCmd2: 'JlCxxDir=$(julia -e "using libcxxwrap_julia_jll; print(dirname(libcxxwrap_julia_jll.libcxxwrap_julia_path))")'
111-
buildCmd: 'CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir/cmake/JlCxx -DZ3_BUILD_JULIA_BINDINGS=True $(cmakeStdArgs)'
114+
buildCmd: 'CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir/cmake/JlCxx $(cmakeJulia) $(cmakeStdArgs)'
112115
runTests: 'True'
113116
debugGcc:
114117
setupCmd1: ''
@@ -155,14 +158,14 @@ jobs:
155158
setupCmd1: ''
156159
setupCmd2: ''
157160
setupCmd3: ''
158-
bindings: '-DZ3_BUILD_PYTHON_BINDINGS=True'
161+
bindings: '$(cmakePy)'
159162
runTests: 'False'
160163
x64:
161164
arch: 'x64'
162165
setupCmd1: 'julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\", version=\"0.7.0\"))"'
163166
setupCmd2: 'julia -e "using libcxxwrap_julia_jll; print(dirname(libcxxwrap_julia_jll.libcxxwrap_julia_path))" > tmp.env'
164167
setupCmd3: 'set /P JlCxxDir=<tmp.env'
165-
bindings: '-DJlCxx_DIR=%JlCxxDir%\..\lib\cmake\JlCxx -DZ3_BUILD_JULIA_BINDINGS=True -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True'
168+
bindings: '-DJlCxx_DIR=%JlCxxDir%\..\lib\cmake\JlCxx $(cmakeJava) $(cmakeNet) $(cmakePy) -DCMAKE_BUILD_TYPE=RelWithDebInfo'
166169
runTests: 'True'
167170
arm64:
168171
arch: 'amd64_arm64'
@@ -205,7 +208,7 @@ jobs:
205208
condition: eq(variables['runTests'], 'True')
206209
207210
208-
- job: "MacOS"
211+
- job: "MacOSPython"
209212
displayName: "MacOS build"
210213
pool:
211214
vmImage: "macOS-10.14"
@@ -238,7 +241,7 @@ jobs:
238241
set -e
239242
mkdir build
240243
cd build
241-
CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir -DZ3_BUILD_JULIA_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -DZ3_BUILD_DOTNET_BINDINGS=False -G "Ninja" ../
244+
CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir $(cmakeJulia) $(cmakeJava) $(cmakePy) -DZ3_BUILD_DOTNET_BINDINGS=False -G "Ninja" ../
242245
ninja
243246
ninja test-z3
244247
cd ..

src/ast/ast.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Revision History:
3535
#include "util/small_object_allocator.h"
3636
#include "util/obj_ref.h"
3737
#include "util/ref_vector.h"
38+
#include "util/ref_pair_vector.h"
3839
#include "util/ref_buffer.h"
3940
#include "util/obj_mark.h"
4041
#include "util/obj_hashtable.h"
@@ -2467,6 +2468,9 @@ typedef ref_vector<var, ast_manager> var_ref_vector;
24672468
typedef ref_vector<quantifier, ast_manager> quantifier_ref_vector;
24682469
typedef app_ref_vector proof_ref_vector;
24692470

2471+
typedef ref_pair_vector<expr, ast_manager> expr_ref_pair_vector;
2472+
2473+
24702474
// -----------------------------------
24712475
//
24722476
// ast_buffer

src/ast/rewriter/seq_rewriter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ Module Name:
2323
#include "ast/ast_pp.h"
2424
#include "ast/arith_decl_plugin.h"
2525
#include "ast/rewriter/rewriter_types.h"
26-
#include "util/ref_pair_vector.h"
2726
#include "util/params.h"
2827
#include "util/lbool.h"
2928
#include "util/sign.h"
3029
#include "math/automata/automaton.h"
3130
#include "math/automata/symbolic_automata.h"
3231

33-
typedef ref_pair_vector<expr, ast_manager> expr_ref_pair_vector;
3432

3533
inline std::ostream& operator<<(std::ostream& out, expr_ref_pair_vector const& es) {
3634
for (auto const& p : es) {

src/sat/sat_local_search.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,10 +682,10 @@ namespace sat {
682682
bool tt = cur_solution(v);
683683
coeff_vector const& falsep = m_vars[v].m_watch[!tt];
684684
for (pbcoeff const& pbc : falsep) {
685-
auto slack = constraint_slack(pbc.m_constraint_id);
685+
int64_t slack = constraint_slack(pbc.m_constraint_id);
686686
if (slack < 0)
687687
++best_bsb;
688-
else if (slack < static_cast<int>(pbc.m_coeff))
688+
else if (slack < static_cast<int64_t>(pbc.m_coeff))
689689
best_bsb += num_unsat;
690690
}
691691
++cit;
@@ -697,7 +697,7 @@ namespace sat {
697697
coeff_vector const& falsep = m_vars[v].m_watch[!cur_solution(v)];
698698
auto it = falsep.begin(), end = falsep.end();
699699
for (; it != end; ++it) {
700-
auto slack = constraint_slack(it->m_constraint_id);
700+
int64_t slack = constraint_slack(it->m_constraint_id);
701701
if (slack < 0) {
702702
if (bsb == best_bsb) {
703703
break;
@@ -706,7 +706,7 @@ namespace sat {
706706
++bsb;
707707
}
708708
}
709-
else if (slack < static_cast<int>(it->m_coeff)) {
709+
else if (slack < static_cast<int64_t>(it->m_coeff)) {
710710
bsb += num_unsat;
711711
if (bsb > best_bsb) {
712712
break;

0 commit comments

Comments
 (0)