You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
64 lines
2.0 KiB
10 years ago
|
/*
|
||
|
* Copyright (c) 2009-2013 Monoidics ltd.
|
||
|
* Copyright (c) 2013- Facebook.
|
||
|
* All rights reserved.
|
||
|
*/
|
||
|
|
||
|
// builtins to be used to model library functions
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) short
|
||
|
short __infer_nondet_short();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) int
|
||
|
int __infer_nondet_int();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) long int
|
||
|
long int __infer_nondet_long_int();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) long long int
|
||
|
long long int __infer_nondet_long_long_int();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) unsigned long int
|
||
|
unsigned long int __infer_nondet_unsigned_long_int();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) pointer
|
||
|
void *__infer_nondet_ptr();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) float
|
||
|
float __infer_nondet_float();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) double
|
||
|
double __infer_nondet_double();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) long double
|
||
|
long double __infer_nondet_long_double();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) size_t
|
||
|
size_t __infer_nondet_size_t();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) time_t
|
||
|
time_t __infer_nondet_time_t();
|
||
|
|
||
|
// model returning an arbitrary (nondeterministic) clock_t
|
||
|
clock_t __infer_nondet_clock_t();
|
||
|
|
||
|
// assume that the cond is false
|
||
|
// and add any constraints to the precondition so that cond is false, if possible
|
||
|
#define INFER_EXCLUDE_CONDITION(cond) if (cond) while(1)
|
||
|
|
||
|
// builtin: force arr to be an array and return the size
|
||
|
extern size_t __get_array_size(const void *arr);
|
||
|
|
||
|
// builtin: change the attribute of ret to a file attribute
|
||
|
extern void __set_file_attribute(void *ret);
|
||
|
|
||
|
// builtin: change the size of the array to size
|
||
|
extern void __set_array_size(void *ptr, size_t size);
|
||
|
|
||
|
// builtin: set the flag to the given value for the procedure where this call appears
|
||
|
extern void __infer_set_flag(char *flag, char *value);
|