3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-17 14:25:35 +00:00
z3/src/util/lbool.h
Nikolaj Bjorner 4bc044c982 update header guards to be C++ style. Fixes issue #9
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-08 23:18:40 -07:00

43 lines
688 B
C++

/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
lbool.h
Abstract:
Lifted boolean
Author:
Leonardo de Moura (leonardo) 2008-02-08.
Revision History:
--*/
#ifndef LBOOL_H_
#define LBOOL_H_
#include"util.h"
typedef enum { l_false = -1, l_undef, l_true } lbool;
inline lbool operator~(lbool lb) {
return static_cast<lbool>(-static_cast<int>(lb));
}
inline lbool to_lbool(bool b) {
return static_cast<lbool>(static_cast<int>(b)*2-1);
}
std::ostream & operator<<(std::ostream & out, lbool b);
/**
\brief Convert l_true -> satisfiable, l_false -> unsatisfiable, and l_undef -> unknown.
*/
char const * to_sat_str(lbool l);
#endif /* LBOOL_H_ */