/*
-** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
+** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
** See ../LICENSE for license information.
**
*/
# define BOOL_H
# ifndef FALSE
-# define FALSE 0
+/*@constant bool FALSE=false@*/
+# define FALSE false
# endif
# ifndef TRUE
-# define TRUE (! FALSE)
+/*@constant bool TRUE=true@*/
+# define TRUE true
# endif
extern /*@observer@*/ cstring bool_unparse (bool p_b) /*@*/ ;
extern bool bool_fromInt (int p_i) /*@*/ ;
extern int bool_toInt (bool p_b) /*@*/ ;
+extern bool bool_isReasonable (/*@sef@*/ bool p_b) /*@*/ ;
+/*@-boolcompare@*/
+# define bool_isReasonable(b) (((b) == TRUE) || ((b) == FALSE))
+/*@=boolcompare@*/
+
# define bool_unparse(b) (cstring_makeLiteralTemp ((b) ? "true" : "false" ))
# define bool_dump(b) (cstring_makeLiteralTemp ((b) ? "1" : "0" ))
# define bool_not(b) ((b) ? FALSE : TRUE)