All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.12.6.src.ast.scoped_proof.h Maven / Gradle / Ivy

There is a newer version: 4.13.0.1
Show newest version
/*++
Copyright (c) 2013 Microsoft Corporation

Module Name:

    scoped_proof.h

Abstract:

    Scoped proof environments. Toggles enabling proofs.

Author:

    Nikolaj Bjorner (nbjorner) 2013-08-28

Revision History:

--*/
#pragma once

#include "ast/ast.h"

class scoped_proof_mode {
    ast_manager&   m;
    proof_gen_mode m_mode;
public:
    scoped_proof_mode(ast_manager& m, proof_gen_mode mode): m(m) {
        m_mode = m.proof_mode();
        m.toggle_proof_mode(mode);
    }
    ~scoped_proof_mode() {
        m.toggle_proof_mode(m_mode);            
    }
    
};

class scoped_proof : public scoped_proof_mode {
public:
    scoped_proof(ast_manager& m): scoped_proof_mode(m, PGM_ENABLED) {}
};

class scoped_no_proof : public scoped_proof_mode {
public:
    scoped_no_proof(ast_manager& m): scoped_proof_mode(m, PGM_DISABLED) {}
};

class scoped_restore_proof : public scoped_proof_mode {
public:
    scoped_restore_proof(ast_manager& m): scoped_proof_mode(m, m.proof_mode()) {}
};







© 2015 - 2024 Weber Informatics LLC | Privacy Policy