CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cprover.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: C library check
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
9#ifndef CPROVER_ANSI_C_LIBRARY_CPROVER_H
10#define CPROVER_ANSI_C_LIBRARY_CPROVER_H
11
15
16// NOLINTNEXTLINE(readability/identifiers)
17typedef __typeof__(sizeof(int)) __CPROVER_size_t;
18// NOLINTNEXTLINE(readability/identifiers)
19typedef signed long long __CPROVER_ssize_t;
20
21#define __CPROVER_constant_infinity_uint 1
22
24void __CPROVER_deallocate(void *);
25extern const void *__CPROVER_deallocated;
26extern const void *__CPROVER_memory_leak;
27
30// The maximum size of an object that we can handle under the object:offset
31// pointer encoding. Marked thread-local as it is a per-analysis constant that
32// can safely be constant-propagated even in concurrent execution.
34
35// malloc failure modes
38
45
46// __CPROVER_equal expects two arguments of the same type -- any type is
47// permitted, unsigned long long is just used for the benefit of running syntax
48// checks using system compilers
49__CPROVER_bool __CPROVER_equal(unsigned long long, unsigned long long);
50
51// The following built-ins are type checked by our C front-end and do not
52// require declarations. They work with any types as described below. unsigned
53// long long is just used to enable checks using system compilers.
54
55// detect overflow
56// the following expect two numeric arguments
57__CPROVER_bool __CPROVER_overflow_minus(unsigned long long, unsigned long long);
58__CPROVER_bool __CPROVER_overflow_mult(unsigned long long, unsigned long long);
59__CPROVER_bool __CPROVER_overflow_plus(unsigned long long, unsigned long long);
60__CPROVER_bool __CPROVER_overflow_shl(unsigned long long, unsigned long long);
61// expects one numeric argument
63
64// enumerations
65// expects one enum-typed argument
67
68// The following have an optional second parameter (the width), and are
69// polymorphic in the first parameter: if the second argument is omitted, then
70// the width of the subtype of the pointer-typed first argument is used.
71__CPROVER_bool __CPROVER_r_ok(const void *, ...);
72__CPROVER_bool __CPROVER_w_ok(const void *, ...);
74
75#include "../cprover_builtin_headers.h"
76
77#endif // CPROVER_ANSI_C_LIBRARY_CPROVER_H
__CPROVER_thread_local __CPROVER_size_t __CPROVER_max_malloc_size
int __CPROVER_malloc_failure_mode
int __CPROVER_malloc_failure_mode_return_null
typedef __typeof__(sizeof(int)) __CPROVER_size_t
__CPROVER_bool __CPROVER_overflow_mult(unsigned long long, unsigned long long)
void * __CPROVER_allocate(__CPROVER_size_t size, __CPROVER_bool zero)
__CPROVER_bool __CPROVER_w_ok(const void *,...)
void __CPROVER_deallocate(void *)
Definition stdlib.c:670
const void * __CPROVER_deallocated
__CPROVER_bool __CPROVER_enum_is_in_range(unsigned long long)
__CPROVER_bool __CPROVER_overflow_shl(unsigned long long, unsigned long long)
__CPROVER_bool __CPROVER_equal(unsigned long long, unsigned long long)
const void * __CPROVER_memory_leak
__CPROVER_bool __CPROVER_malloc_may_fail
int __CPROVER_malloc_failure_mode_assert_then_assume
__CPROVER_bool __CPROVER_rw_ok(const void *,...)
__CPROVER_bool __CPROVER_overflow_minus(unsigned long long, unsigned long long)
__CPROVER_bool __CPROVER_overflow_plus(unsigned long long, unsigned long long)
__CPROVER_bool __CPROVER_r_ok(const void *,...)
__CPROVER_bool __CPROVER_overflow_unary_minus(unsigned long long)
signed long long __CPROVER_ssize_t
Definition cprover.h:19
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
short next_unread
Definition cprover.h:43
short next_avail
Definition cprover.h:42
_Bool widowed
Definition cprover.h:40
char data[4]
Definition cprover.h:41