NuSMV/code/nusmv/core/utils/defs.h File Reference

#include <assert.h>
#include "cudd/util.h"
#include <time.h>

Go to the source code of this file.

Defines

#define COMMA_OPERATOR   ,
#define ENUM_CHECK(value, first, last)   nusmv_assert(first < value && value < last)
#define FALLTHROUGH
 for switch cases without break
#define MACRO_STRINGIZE(x)   MACRO_STRINGIZE_2nd_LEVEL(x)
#define MACRO_STRINGIZE_2nd_LEVEL(x)   #x
#define max(_a_, _b_)   ((_a_ < _b_) ? _b_ : _a_)
#define min(_a_, _b_)   ((_a_ < _b_) ? _a_ : _b_)
#define NIL_PTR(ptr_type)   ((ptr_type) NULL)
#define NORETURN
 Some low-level definitions.
#define nusmv_assert(expr)   assert(expr)
#define PRIdMAX   "ld"
#define PRIdPTR   "d"
#define PRIoMAX   "lo"
#define PRIuMAX   "lu"
 Fallback definition of PRI...MAX in case of missing <inttypes.h>. To be used as format specifier when printing unsigned long long int.
#define PRIuPTR   "u"
 This is a portable prefix to print size_t valus with printf.
#define PRIXMAX   "lX"
#define PTR_FROM_INT(ptr, x)   ((ptr) (nusmv_ptrint) (x))
 Casts the given int to the given pointer type.
#define PTR_TO_INT(x)   ((int) (nusmv_ptrint) (x))
 Casts the given pointer (address) to an int.
#define THROWS_EXCEPTION
#define UNUSED_PARAM(x)   (void)(x)
#define UNUSED_VAR(x)   (void)(x)
#define utils_random()   rand()
#define utils_random_set_seed()   srand((unsigned int)time(NULL))
#define VOIDPTR_FROM_INT(x)   ((void *) (nusmv_ptrint) (x))
 Casts the given int to void *.

Typedefs

typedef util_ptrint nusmv_ptrint
typedef util_ptruint nusmv_ptruint
typedef int(* PFIVPVP )(const void *, const void *)
typedef void *(* PFVPVPVP )(void *, void *)

Enumerations

enum  boolean { false = 0, true = 1 }
enum  Outcome {
  OUTCOME_GENERIC_ERROR, OUTCOME_PARSER_ERROR, OUTCOME_SYNTAX_ERROR, OUTCOME_FILE_ERROR,
  OUTCOME_SUCCESS_REQUIRED_HELP, OUTCOME_SUCCESS
}

Define Documentation

#define COMMA_OPERATOR   ,
Todo:
Missing synopsis
Todo:
Missing description
#define ENUM_CHECK ( value,
first,
last   )     nusmv_assert(first < value && value < last)
Todo:
Missing synopsis
Todo:
Missing description
#define FALLTHROUGH

for switch cases without break

#define MACRO_STRINGIZE (  )     MACRO_STRINGIZE_2nd_LEVEL(x)
Todo:
Missing synopsis
Todo:
Missing description
#define MACRO_STRINGIZE_2nd_LEVEL (  )     #x
Todo:
Missing synopsis
Todo:
Missing description
#define max ( _a_,
_b_   )     ((_a_ < _b_) ? _b_ : _a_)
Todo:
Missing synopsis
Todo:
Missing description
#define min ( _a_,
_b_   )     ((_a_ < _b_) ? _a_ : _b_)
Todo:
Missing synopsis
Todo:
Missing description
#define NIL_PTR ( ptr_type   )     ((ptr_type) NULL)
Todo:
Missing synopsis
Todo:
Missing description
#define NORETURN

Some low-level definitions.

Author:
Roberto Cavada Some low-level definitions
#define nusmv_assert ( expr   )     assert(expr)
Todo:
Missing synopsis
Todo:
Missing description
#define PRIdMAX   "ld"
#define PRIdPTR   "d"
#define PRIoMAX   "lo"
#define PRIuMAX   "lu"

Fallback definition of PRI...MAX in case of missing <inttypes.h>. To be used as format specifier when printing unsigned long long int.

Todo:
Missing description
See also:
Documentation of <inttypes.h>
#define PRIuPTR   "u"

This is a portable prefix to print size_t valus with printf.

Use this prefix when printinf size_t values with printf. Warning! This macro is not prefixed with ''

#define PRIXMAX   "lX"
#define PTR_FROM_INT ( ptr,
 )     ((ptr) (nusmv_ptrint) (x))

Casts the given int to the given pointer type.

#define PTR_TO_INT (  )     ((int) (nusmv_ptrint) (x))

Casts the given pointer (address) to an int.

#define THROWS_EXCEPTION
Todo:
Missing synopsis
Todo:
Missing description
#define UNUSED_PARAM (  )     (void)(x)
Todo:
Missing synopsis
Todo:
Missing description
#define UNUSED_VAR (  )     (void)(x)
Todo:
Missing synopsis
Todo:
Missing description
 
#define utils_random (  )     rand()
 
#define utils_random_set_seed (  )     srand((unsigned int)time(NULL))
#define VOIDPTR_FROM_INT (  )     ((void *) (nusmv_ptrint) (x))

Casts the given int to void *.


Typedef Documentation

typedef util_ptrint nusmv_ptrint
Todo:
Missing synopsis
Todo:
Missing description
typedef util_ptruint nusmv_ptruint
Todo:
Missing synopsis
Todo:
Missing description
typedef int(* PFIVPVP)(const void *, const void *)
Todo:
Missing synopsis
Todo:
Missing description
typedef void*(* PFVPVPVP)(void *, void *)
Todo:
Missing synopsis
Todo:
Missing description

Enumeration Type Documentation

enum boolean
Enumerator:
false 
true 
enum Outcome
Enumerator:
OUTCOME_GENERIC_ERROR 
OUTCOME_PARSER_ERROR 
OUTCOME_SYNTAX_ERROR 
OUTCOME_FILE_ERROR 
OUTCOME_SUCCESS_REQUIRED_HELP 
OUTCOME_SUCCESS 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 14 Oct 2015 for NuSMV Developers Manual by  doxygen 1.6.1