Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
HanielB committed Feb 26, 2024
1 parent e33a21b commit 01ca065
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/proof/alethe/alethe_post_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2511,6 +2511,12 @@ bool AletheProofPostprocess::process(std::shared_ptr<ProofNode> pf,
ProofNodeUpdater updater(d_env, d_cb, false, false);
updater.process(internalProof);

if (!d_reasonForConversionFailure.empty())
{
reasonForConversionFailure = d_reasonForConversionFailure;
return false;
}

// In the Alethe proof format the final step has to be (cl). However, after
// the translation it might be (cl false). In that case additional steps are
// required.
Expand All @@ -2536,11 +2542,6 @@ bool AletheProofPostprocess::process(std::shared_ptr<ProofNode> pf,
d_env.getProofNodeManager()->updateNode(pf.get(), npn.get());
Trace("pf-process-debug") << "...update node finished." << std::endl;
}
if (!d_reasonForConversionFailure.empty())
{
reasonForConversionFailure = d_reasonForConversionFailure;
return false;
}
return true;
}

Expand Down
5 changes: 5 additions & 0 deletions src/proof/proof_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ Node ProofChecker::checkDebug(ProofRule id,
return res;
}

void ProofChecker::setProofCheckMode(options::ProofCheckMode pcMode)
{
d_pcMode = pcMode;
}

Node ProofChecker::checkInternal(ProofRule id,
const std::vector<Node>& cchildren,
const std::vector<Node>& args,
Expand Down
3 changes: 3 additions & 0 deletions src/proof/proof_checker.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ class ProofChecker
*/
bool isPedanticFailure(ProofRule id, std::ostream* out) const;

/** Assigns argument pcMode to d_pcMode. */
void setProofCheckMode(options::ProofCheckMode pcMode);

private:
/** statistics class */
ProofCheckerStatistics d_stats;
Expand Down
4 changes: 4 additions & 0 deletions src/smt/proof_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "options/base_options.h"
#include "options/main_options.h"
#include "options/proof_options.h"
#include "options/smt_options.h"
#include "proof/alethe/alethe_node_converter.h"
#include "proof/alethe/alethe_post_processor.h"
Expand Down Expand Up @@ -286,6 +287,8 @@ void PfManager::printProof(std::ostream& out,
}
else if (mode == options::ProofFormatMode::ALETHE)
{
options::ProofCheckMode oldMode =options().proof.proofCheck;
d_pnm->getChecker()->setProofCheckMode(options::ProofCheckMode::NONE);
std::string reasonForConversionFailure;
proof::AletheNodeConverter anc;
proof::AletheProofPostprocess vpfpp(
Expand All @@ -299,6 +302,7 @@ void PfManager::printProof(std::ostream& out,
{
out << "(error " << reasonForConversionFailure << ")";
}
d_pnm->getChecker()->setProofCheckMode(oldMode);
}
else if (mode == options::ProofFormatMode::LFSC)
{
Expand Down
2 changes: 2 additions & 0 deletions test/regress/cli/regress0/proofs/open-pf-datatypes.smt2
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
; EXPECT: unsat
;; Datatypes are not supported in Alethe
; DISABLE-TESTER: alethe
(set-logic ALL)
(declare-datatypes ((C 0)) (((r) (b))))
(declare-datatypes ((P 0)) (((a (f C) (s C)))))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; Logic not supported in Alethe
; DISABLE-TESTER: alethe
(set-logic QF_ALL)
(set-info :status unsat)
(set-option :check-proofs true)
Expand Down
2 changes: 2 additions & 0 deletions test/regress/cli/regress0/proofs/proj-issue554.smt2
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
; EXPECT: unsat
;; Logic not supported in Alethe
; DISABLE-TESTER: alethe
(set-logic ALL)
(set-option :proof-check eager)
(set-option :unsat-cores-mode sat-proof)
Expand Down

0 comments on commit 01ca065

Please sign in to comment.