Skip to content

Commit 4867073

Browse files
remove windowsArm64 from nightly
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
1 parent d0a59f3 commit 4867073

File tree

6 files changed

+47
-74
lines changed

6 files changed

+47
-74
lines changed

scripts/nightly.yaml

-45
Original file line numberDiff line numberDiff line change
@@ -233,46 +233,6 @@ stages:
233233
symbolServerType: TeamServices
234234
detailedLog: true
235235

236-
- job: "WindowsArm64"
237-
displayName: "WindowsArm64"
238-
pool:
239-
vmImage: "windows-latest"
240-
variables:
241-
arch: "amd64_arm64"
242-
bindings: "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
243-
steps:
244-
- script: md build
245-
- script: |
246-
cd build
247-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(arch)
248-
cmake $(bindings) -G "NMake Makefiles" ../
249-
nmake
250-
cd ..
251-
- task: CopyFiles@2
252-
inputs:
253-
sourceFolder: build
254-
contents: '*z3*.*'
255-
targetFolder: $(Build.ArtifactStagingDirectory)
256-
- task: PublishPipelineArtifact@1
257-
inputs:
258-
targetPath: $(Build.ArtifactStagingDirectory)
259-
artifactName: 'WindowsArm64'
260-
- task: CopyFiles@2
261-
displayName: 'Collect Symbols'
262-
inputs:
263-
sourceFolder: build
264-
contents: '**/*.pdb'
265-
targetFolder: '$(Build.ArtifactStagingDirectory)/symbols'
266-
# Publish symbol archive to match nuget package
267-
# Index your source code and publish symbols to a file share or Azure Artifacts symbol server
268-
- task: PublishSymbols@2
269-
inputs:
270-
symbolsFolder: '$(Build.ArtifactStagingDirectory)/symbols'
271-
searchPattern: '**/*.pdb'
272-
indexSources: false # Github not supported
273-
publishSymbols: true
274-
symbolServerType: TeamServices
275-
detailedLog: true
276236

277237

278238
- stage: Package
@@ -576,11 +536,6 @@ stages:
576536
inputs:
577537
artifactName: 'Windows32'
578538
targetPath: tmp
579-
- task: DownloadPipelineArtifact@2
580-
displayName: "Download windowsArm64"
581-
inputs:
582-
artifactName: 'WindowsArm64'
583-
targetPath: tmp
584539
- task: DownloadPipelineArtifact@2
585540
displayName: "Download windows64"
586541
inputs:

src/ast/rewriter/arith_rewriter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ br_status arith_rewriter::mk_lshr_core(unsigned sz, expr* arg1, expr* arg2, expr
14351435
}
14361436
if (is_num_x && is_num_y) {
14371437
if (y >= sz)
1438-
result = m_util.mk_int(N-1);
1438+
result = m_util.mk_int(0);
14391439
else {
14401440
rational d = div(x, rational::power_of_two(y.get_unsigned()));
14411441
result = m_util.mk_int(d);

src/sat/smt/arith_axioms.cpp

+15-2
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ namespace arith {
260260
if (valy >= sz || valy == 0)
261261
return true;
262262
unsigned k = valy.get_unsigned();
263+
rational r = mod(valx * rational::power_of_two(k), N);
264+
if (r == valn)
265+
return true;
263266
sat::literal eq = eq_internalize(n, a.mk_mod(a.mk_mul(_x, a.mk_int(rational::power_of_two(k))), a.mk_int(N)));
264267
if (s().value(eq) == l_true)
265268
return true;
@@ -272,6 +275,9 @@ namespace arith {
272275
if (valy >= sz || valy == 0)
273276
return true;
274277
unsigned k = valy.get_unsigned();
278+
rational r = mod(div(valx, rational::power_of_two(k)), N);
279+
if (r == valn)
280+
return true;
275281
sat::literal eq = eq_internalize(n, a.mk_idiv(x, a.mk_int(rational::power_of_two(k))));
276282
if (s().value(eq) == l_true)
277283
return true;
@@ -284,6 +290,12 @@ namespace arith {
284290
if (valy >= sz || valy == 0)
285291
return true;
286292
unsigned k = valy.get_unsigned();
293+
bool signvalx = x >= N/2;
294+
rational valxdiv2k = div(valx, rational::power_of_two(k));
295+
if (signvalx)
296+
valxdiv2k = mod(valxdiv2k - rational::power_of_two(sz - k), N);
297+
if (valn == valxdiv2k)
298+
return true;
287299
sat::literal signx = mk_literal(a.mk_ge(x, a.mk_int(N/2)));
288300
sat::literal eq;
289301
expr* xdiv2k;
@@ -335,9 +347,10 @@ namespace arith {
335347
expr_ref x(a.mk_mod(_x, a.mk_int(N)), m);
336348
expr_ref y(a.mk_mod(_y, a.mk_int(N)), m);
337349

350+
add_clause(mk_literal(a.mk_ge(n, a.mk_int(0))));
351+
add_clause(mk_literal(a.mk_le(n, a.mk_int(N - 1))));
352+
338353
if (a.is_band(n)) {
339-
add_clause(mk_literal(a.mk_ge(n, a.mk_int(0))));
340-
add_clause(mk_literal(a.mk_le(n, a.mk_int(N - 1))));
341354
add_clause(mk_literal(a.mk_le(n, x)));
342355
add_clause(mk_literal(a.mk_le(n, y)));
343356
}

src/sat/smt/euf_model.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ namespace euf {
282282
}
283283

284284
void solver::display_validation_failure(std::ostream& out, model& mdl, enode* n) {
285-
out << "Failed to validate " << n->bool_var() << " " << bpp(n) << " " << mdl(n->get_expr()) << "\n";
285+
out << "Failed to validate b" << n->bool_var() << " " << bpp(n) << " " << mdl(n->get_expr()) << "\n";
286286
s().display(out);
287287
euf::enode_vector nodes;
288288
nodes.push_back(n);

src/sat/smt/intblast_solver.cpp

+28-25
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ namespace intblast {
148148
auto a = expr2literal(e);
149149
auto b = mk_literal(r);
150150
ctx.mark_relevant(b);
151-
// verbose_stream() << "add-predicate-axiom: " << mk_pp(e, m) << " == " << r << "\n";
151+
// verbose_stream() << "add-predicate-axiom: " << mk_pp(e, m) << " == " << r << "\n";
152152
add_equiv(a, b);
153153
}
154154
return true;
@@ -305,28 +305,6 @@ namespace intblast {
305305
sorted.push_back(arg);
306306
}
307307
}
308-
309-
//
310-
// Add ground equalities to ensure the model is valid with respect to the current case splits.
311-
// This may cause more conflicts than necessary. Instead could use intblast on the base level, but using literal
312-
// assignment from complete level.
313-
// E.g., force the solver to completely backtrack, check satisfiability using the assignment obtained under a complete assignment.
314-
// If intblast is SAT, then force the model and literal assignment on the rest of the literals.
315-
//
316-
if (!is_ground(e))
317-
continue;
318-
euf::enode* n = ctx.get_enode(e);
319-
if (!n)
320-
continue;
321-
if (n == n->get_root())
322-
continue;
323-
expr* r = n->get_root()->get_expr();
324-
es.push_back(m.mk_eq(e, r));
325-
r = es.back();
326-
if (!visited.is_marked(r) && !is_translated(r)) {
327-
visited.mark(r);
328-
sorted.push_back(r);
329-
}
330308
}
331309
else if (is_quantifier(e)) {
332310
quantifier* q = to_quantifier(e);
@@ -646,7 +624,7 @@ namespace intblast {
646624
}
647625
case OP_BUDIV:
648626
case OP_BUDIV_I: {
649-
expr* x = arg(0), * y = umod(e, 1);
627+
expr* x = umod(e, 0), * y = umod(e, 1);
650628
r = m.mk_ite(m.mk_eq(y, a.mk_int(0)), a.mk_int(-1), a.mk_idiv(x, y));
651629
break;
652630
}
@@ -978,13 +956,38 @@ namespace intblast {
978956
arith::arith_value av(ctx);
979957
rational r;
980958
VERIFY(av.get_value(b2i->get_expr(), r));
981-
verbose_stream() << ctx.bpp(n) << " := " << r << "\n";
982959
value = bv.mk_numeral(r, bv.get_bv_size(n->get_expr()));
960+
verbose_stream() << ctx.bpp(n) << " := " << value << "\n";
983961
}
984962
values.set(n->get_root_id(), value);
985963
TRACE("model", tout << "add_value " << ctx.bpp(n) << " := " << value << "\n");
986964
}
987965

966+
void solver::finalize_model(model& mdl) {
967+
for (auto n : ctx.get_egraph().nodes()) {
968+
expr* e = n->get_expr();
969+
if (!bv.is_bv(e))
970+
continue;
971+
if (!is_translated(e))
972+
continue;
973+
expr* f = translated(e);
974+
rational r1, r2;
975+
expr_ref val1 = mdl(e);
976+
expr_ref val2 = mdl(f);
977+
if (bv.is_numeral(val1, r1) && a.is_numeral(val2, r2) && r1 != r2) {
978+
rational N = rational::power_of_two(bv.get_bv_size(e));
979+
r2 = mod(r2, N);
980+
if (r1 == r2)
981+
continue;
982+
verbose_stream() << "value mismatch : " << mk_bounded_pp(e, m) << " := " << val1 << "\n";
983+
verbose_stream() << mk_bounded_pp(f, m) << " := " << r2 << "\n";
984+
for (expr* arg : *to_app(e)) {
985+
verbose_stream() << mk_bounded_pp(arg, m) << " := " << mdl(arg) << "\n";
986+
}
987+
}
988+
}
989+
}
990+
988991
sat::literal_vector const& solver::unsat_core() {
989992
return m_core;
990993
}

src/sat/smt/intblast_solver.h

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ namespace intblast {
108108

109109
bool add_dep(euf::enode* n, top_sort<euf::enode>& dep) override;
110110

111+
void finalize_model(model& mdl) override;
112+
111113
std::ostream& display(std::ostream& out) const override;
112114

113115
void collect_statistics(statistics& st) const override;

0 commit comments

Comments
 (0)