Skip to content

Commit

Permalink
pipeline with release mode (#4206)
Browse files Browse the repository at this point in the history
* pipeline with release mode

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed May 4, 2020
1 parent be998c3 commit b81ab94
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 78 deletions.
33 changes: 18 additions & 15 deletions azure-pipelines.yml
@@ -1,10 +1,21 @@

variables:
cmakeJulia: '-DZ3_BUILD_JULIA_BINDINGS=True'
cmakeJava: '-DZ3_BUILD_JAVA_BINDINGS=True'
cmakeNet: '-DZ3_BUILD_DOTNET_BINDINGS=True'
cmakePy: '-DZ3_BUILD_PYTHON_BINDINGS=True'
cmakeStdArgs: '-DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
asanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=address -fno-omit-frame-pointer" CFLAGS="${CFLAGS} -fsanitize=address -fno-omit-frame-pointer"'
ubsanEnv: 'CXXFLAGS="${CXXFLAGS} -fsanitize=undefined" CFLAGS="${CFLAGS} -fsanitize=undefined"'
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"'


# TBD:
# test python bindings
# build documentation
# Asan, ubsan, msan
# Disabled pending clang dependencies for std::unordered_map

jobs:

- job: "LinuxPythonDebug"
Expand All @@ -30,10 +41,7 @@ jobs:
- template: scripts/test-regressions.yml
- template: scripts/generate-doc.yml

# ./cpp_example
# ./c_example

- job: "Ubuntu18"
- job: "Ubuntu18Python"
displayName: "Ubuntu 18 with ocaml"
pool:
vmImage: "Ubuntu-18.04"
Expand All @@ -54,11 +62,6 @@ jobs:
- template: scripts/test-z3.yml
- template: scripts/test-regressions.yml

# TBD:
# test python bindings
# build documentation
# Asan, ubsan, msan
# Disabled pending clang dependencies for std::unordered_map

- job: "LinuxMSan"
displayName: "Ubuntu build - cmake"
Expand Down Expand Up @@ -94,7 +97,7 @@ jobs:
# - template: scripts/test-java-cmake.yml
# - template: scripts/test-regressions.yml

- job: "LinuxCMake"
- job: "Ubuntu16CMake"
displayName: "Ubuntu build - cmake"
pool:
vmImage: "Ubuntu-16.04"
Expand All @@ -108,7 +111,7 @@ jobs:
debugClang:
setupCmd1: 'julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\", version=\"0.7.0\"))"'
setupCmd2: 'JlCxxDir=$(julia -e "using libcxxwrap_julia_jll; print(dirname(libcxxwrap_julia_jll.libcxxwrap_julia_path))")'
buildCmd: 'CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir/cmake/JlCxx -DZ3_BUILD_JULIA_BINDINGS=True $(cmakeStdArgs)'
buildCmd: 'CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir/cmake/JlCxx $(cmakeJulia) $(cmakeStdArgs)'
runTests: 'True'
debugGcc:
setupCmd1: ''
Expand Down Expand Up @@ -155,14 +158,14 @@ jobs:
setupCmd1: ''
setupCmd2: ''
setupCmd3: ''
bindings: '-DZ3_BUILD_PYTHON_BINDINGS=True'
bindings: '$(cmakePy)'
runTests: 'False'
x64:
arch: 'x64'
setupCmd1: 'julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\", version=\"0.7.0\"))"'
setupCmd2: 'julia -e "using libcxxwrap_julia_jll; print(dirname(libcxxwrap_julia_jll.libcxxwrap_julia_path))" > tmp.env'
setupCmd3: 'set /P JlCxxDir=<tmp.env'
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'
bindings: '-DJlCxx_DIR=%JlCxxDir%\..\lib\cmake\JlCxx $(cmakeJava) $(cmakeNet) $(cmakePy) -DCMAKE_BUILD_TYPE=RelWithDebInfo'
runTests: 'True'
arm64:
arch: 'amd64_arm64'
Expand Down Expand Up @@ -205,7 +208,7 @@ jobs:
condition: eq(variables['runTests'], 'True')
- job: "MacOS"
- job: "MacOSPython"
displayName: "MacOS build"
pool:
vmImage: "macOS-10.14"
Expand Down Expand Up @@ -238,7 +241,7 @@ jobs:
set -e
mkdir build
cd build
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" ../
CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir $(cmakeJulia) $(cmakeJava) $(cmakePy) -DZ3_BUILD_DOTNET_BINDINGS=False -G "Ninja" ../
ninja
ninja test-z3
cd ..
Expand Down
4 changes: 4 additions & 0 deletions src/ast/ast.h
Expand Up @@ -35,6 +35,7 @@ Revision History:
#include "util/small_object_allocator.h"
#include "util/obj_ref.h"
#include "util/ref_vector.h"
#include "util/ref_pair_vector.h"
#include "util/ref_buffer.h"
#include "util/obj_mark.h"
#include "util/obj_hashtable.h"
Expand Down Expand Up @@ -2467,6 +2468,9 @@ typedef ref_vector<var, ast_manager> var_ref_vector;
typedef ref_vector<quantifier, ast_manager> quantifier_ref_vector;
typedef app_ref_vector proof_ref_vector;

typedef ref_pair_vector<expr, ast_manager> expr_ref_pair_vector;


// -----------------------------------
//
// ast_buffer
Expand Down
2 changes: 0 additions & 2 deletions src/ast/rewriter/seq_rewriter.h
Expand Up @@ -23,14 +23,12 @@ Module Name:
#include "ast/ast_pp.h"
#include "ast/arith_decl_plugin.h"
#include "ast/rewriter/rewriter_types.h"
#include "util/ref_pair_vector.h"
#include "util/params.h"
#include "util/lbool.h"
#include "util/sign.h"
#include "math/automata/automaton.h"
#include "math/automata/symbolic_automata.h"

typedef ref_pair_vector<expr, ast_manager> expr_ref_pair_vector;

inline std::ostream& operator<<(std::ostream& out, expr_ref_pair_vector const& es) {
for (auto const& p : es) {
Expand Down
8 changes: 4 additions & 4 deletions src/sat/sat_local_search.cpp
Expand Up @@ -682,10 +682,10 @@ namespace sat {
bool tt = cur_solution(v);
coeff_vector const& falsep = m_vars[v].m_watch[!tt];
for (pbcoeff const& pbc : falsep) {
auto slack = constraint_slack(pbc.m_constraint_id);
int64_t slack = constraint_slack(pbc.m_constraint_id);
if (slack < 0)
++best_bsb;
else if (slack < static_cast<int>(pbc.m_coeff))
else if (slack < static_cast<int64_t>(pbc.m_coeff))
best_bsb += num_unsat;
}
++cit;
Expand All @@ -697,7 +697,7 @@ namespace sat {
coeff_vector const& falsep = m_vars[v].m_watch[!cur_solution(v)];
auto it = falsep.begin(), end = falsep.end();
for (; it != end; ++it) {
auto slack = constraint_slack(it->m_constraint_id);
int64_t slack = constraint_slack(it->m_constraint_id);
if (slack < 0) {
if (bsb == best_bsb) {
break;
Expand All @@ -706,7 +706,7 @@ namespace sat {
++bsb;
}
}
else if (slack < static_cast<int>(it->m_coeff)) {
else if (slack < static_cast<int64_t>(it->m_coeff)) {
bsb += num_unsat;
if (bsb > best_bsb) {
break;
Expand Down

0 comments on commit b81ab94

Please sign in to comment.