diff --git a/doc/mk_api_doc.py b/doc/mk_api_doc.py index 64d1f17c2..c74349d3f 100644 --- a/doc/mk_api_doc.py +++ b/doc/mk_api_doc.py @@ -326,7 +326,7 @@ try: if ML_ENABLED: ml_output_dir = os.path.join(OUTPUT_DIRECTORY, 'html', 'ml') mk_dir(ml_output_dir) - if subprocess.call(['ocamldoc', '-html', '-d', ml_output_dir, '-sort', '-hide', 'Z3', '-I', '+zarith', '-I', '%s/api/ml' % BUILD_DIR, '%s/api/ml/z3enums.mli' % BUILD_DIR, '%s/api/ml/z3.mli' % BUILD_DIR]) != 0: + if subprocess.call(['ocamldoc', '-html', '-d', ml_output_dir, '-sort', '-hide', 'Z3', '-I', '$(ocamlfind query zarith)', '-I', '%s/api/ml' % BUILD_DIR, '%s/api/ml/z3enums.mli' % BUILD_DIR, '%s/api/ml/z3.mli' % BUILD_DIR]) != 0: print("ERROR: ocamldoc failed.") exit(1) print("Generated ML/OCaml documentation.") diff --git a/scripts/nightly.yaml b/scripts/nightly.yaml index 2ff044cd7..e1045bd51 100644 --- a/scripts/nightly.yaml +++ b/scripts/nightly.yaml @@ -56,10 +56,11 @@ stages: - script: | set -e cd doc - python mk_api_doc.py --z3py-package-path=../build/python/z3 + python mk_api_doc.py --ml --z3py-package-path=../build/python/z3 eval `opam config env` - ocamldoc -html -d api/html/ml -sort -hide Z3 -I $( ocamlfind query zarith ) -I ../build/api/ml ../build/api/ml/z3enums.mli ../build/api/ml/z3.mli cd .. +# mkdir html/ml +# ocamldoc -html -d api/html/ml -sort -hide Z3 -I $( ocamlfind query zarith ) -I ../build/api/ml ../build/api/ml/z3enums.mli ../build/api/ml/z3.mli - script: zip -r api.zip doc/api - script: cp api.zip $(Build.ArtifactStagingDirectory)/. - task: PublishPipelineArtifact@0 diff --git a/src/sat/smt/q_ematch.cpp b/src/sat/smt/q_ematch.cpp index b22b01cc0..18fa566c4 100644 --- a/src/sat/smt/q_ematch.cpp +++ b/src/sat/smt/q_ematch.cpp @@ -229,6 +229,7 @@ namespace q { m_mam->on_merge(root, other); if (m_lazy_mam) m_lazy_mam->on_merge(root, other); + m_mam->relevant_eh(other, false); } // watch only nodes introduced in bindings or ground arguments of functions diff --git a/src/sat/smt/q_mam.cpp b/src/sat/smt/q_mam.cpp index f5030648b..e821a3f99 100644 --- a/src/sat/smt/q_mam.cpp +++ b/src/sat/smt/q_mam.cpp @@ -3102,10 +3102,10 @@ namespace q { void add_candidate(code_tree * t, enode * app) { if (t != nullptr) { TRACE("mam_candidate", tout << "adding candidate:\n" << mk_ll_pp(app->get_expr(), m);); - if (!t->has_candidates()) { + if (m_to_match.empty()) ctx.push(reset_to_match(*this)); - } - m_to_match.push_back(t); + if (!t->has_candidates()) + m_to_match.push_back(t); t->add_candidate(app); } } @@ -3783,6 +3783,7 @@ namespace q { void propagate() override { TRACE("trigger_bug", tout << "match\n"; display(tout);); for (code_tree* t : m_to_match) { + std::cout << t << "\n"; SASSERT(t->has_candidates()); m_interpreter.execute(t); t->reset_candidates(); @@ -3824,8 +3825,9 @@ namespace q { } // This method is invoked when n becomes relevant. - // If lazy == true, then n is not added to the list of candidate enodes for matching. That is, the method just updates the lbls. - void relevant_eh(enode * n, bool lazy) { + // If lazy == true, then n is not added to the list of + // candidate enodes for matching. That is, the method just updates the lbls. + void relevant_eh(enode * n, bool lazy) override { TRACE("trigger_bug", tout << "relevant_eh:\n" << mk_ismt2_pp(n->get_expr(), m) << "\n"; tout << "mam: " << this << "\n";); TRACE("mam", tout << "relevant_eh: #" << n->get_expr_id() << "\n";); diff --git a/src/sat/smt/q_mam.h b/src/sat/smt/q_mam.h index 194ce7b19..42de86773 100644 --- a/src/sat/smt/q_mam.h +++ b/src/sat/smt/q_mam.h @@ -49,6 +49,8 @@ namespace q { virtual void add_pattern(quantifier * q, app * mp) = 0; + virtual void relevant_eh(enode * n, bool lazy) = 0; + virtual void propagate() = 0; virtual bool can_propagate() const = 0;