Changeset cefb126 in mainline for tools/checkers/vcc.h


Ignore:
Timestamp:
2010-07-02T14:19:30Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
89c57b6
Parents:
fe7abd0 (diff), e3ee9b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • tools/checkers/vcc.h

    rfe7abd0 rcefb126  
    11/*
    2  * Copyright (c) 2006 Josef Cejka
     2 * Copyright (c) 2010 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libcamd64
    30  * @{
    31  */
    3229/** @file
     30 *
     31 * VCC specifications tight to the HelenOS-specific annotations.
     32 *
    3333 */
    3434
    35 #ifndef LIBC_amd64_LIMITS_H_
    36 #define LIBC_amd64_LIMITS_H_
     35#ifndef HELENOS_VCC_H_
     36#define HELENOS_VCC_H_
    3737
    38 #define LONG_MIN MIN_INT64
    39 #define LONG_MAX MAX_INT64
    40 #define ULONG_MIN MIN_UINT64
    41 #define ULONG_MAX MAX_UINT64
     38typedef _Bool bool;
    4239
    43 #define SIZE_MIN MIN_UINT64
    44 #define SIZE_MAX MAX_UINT64
    45 #define SSIZE_MIN MIN_INT64
    46 #define SSIZE_MAX MAX_INT64
     40#define __concat_identifiers_str(a, b)  a ## b
     41#define __concat_identifiers(a, b)      __concat_identifiers_str(a, b)
     42
     43#define __specification_attr(key, value) \
     44        __declspec(System.Diagnostics.Contracts.CodeContract.StringVccAttr, \
     45            key, value)
     46
     47#define __specification_type(name) \
     48        __specification( \
     49                typedef struct __concat_identifiers(_vcc_math_type_, name) { \
     50                        char _vcc_marker_for_math_type; \
     51                } __concat_identifiers(\, name); \
     52        )
     53
     54__specification(typedef void * \object;)
     55__specification(typedef __int64 \integer;)
     56__specification(typedef unsigned __int64 \size_t;)
     57
     58__specification_type(objset)
     59
     60__specification(struct \TypeState {
     61        __specification(ghost \integer \claim_count;)
     62        __specification(ghost bool \consistent;)
     63        __specification(ghost \objset \owns;)
     64        __specification(ghost \object \owner;)
     65        __specification(ghost bool \valid;)
     66};)
     67
     68__specification(bool \extent_mutable(\object);)
     69__specification(\objset \extent(\object);)
     70__specification(\objset \array_range(\object, \size_t);)
     71__specification(bool \mutable_array(\object, \size_t);)
    4772
    4873#endif
Note: See TracChangeset for help on using the changeset viewer.