| 1 | /* |
| 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use |
| 5 | * this file except in compliance with the License. A copy of the License is |
| 6 | * located at |
| 7 | * |
| 8 | * http://aws.amazon.com/apache2.0/ |
| 9 | * |
| 10 | * or in the "license" file accompanying this file. This file is distributed on an |
| 11 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 12 | * implied. See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
| 16 | #pragma once |
| 17 | |
| 18 | #include <stdbool.h> |
| 19 | #include <stddef.h> |
| 20 | #include <stdint.h> |
| 21 | #include <sys/stat.h> |
| 22 | #include <sys/types.h> |
| 23 | |
| 24 | /** |
| 25 | * These functions provide a way to get unconstrained values of the correct types for use in CBMC proofs |
| 26 | * CBMC treats any function which does not have a body as returning an unconstrained value. |
| 27 | * For example, each call to nondet_uint8_t() will return a different unconstrained value which can be used |
| 28 | * in CBMC proofs. |
| 29 | */ |
| 30 | bool nondet_bool(); |
| 31 | int nondet_int(); |
| 32 | unsigned int nondet_unsigned_int(); |
| 33 | size_t nondet_size_t(); |
| 34 | long nondet_long(); |
| 35 | uint16_t nondet_uint16_t(); |
| 36 | uint32_t nondet_uint32_t(); |
| 37 | uint64_t nondet_uint64_t(); |
| 38 | uint8_t nondet_uint8_t(); |
| 39 | void * nondet_voidp(); |
| 40 | off_t nondet_off_t(); |
| 41 | ssize_t nondet_ssize_t(); |