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

#include "nusmv/core/utils/utils.h"

Go to the source code of this file.

Defines

#define WORD_NUMBER(x)   ((WordNumber_ptr) (x))
#define WORD_NUMBER_CHECK_INSTANCE(x)   (nusmv_assert(WORD_NUMBER(x) != WORD_NUMBER(NULL)))

Typedefs

typedef struct WordNumber_TAG * WordNumber_ptr
typedef unsigned long long WordNumberValue
 WordNumber integer value.

Functions

int WordNumber_based_print (FILE *output_stream, WordNumber_ptr self, int base, boolean isSigned)
 prints a Word constant in a provided base.
boolean WordNumber_equal (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if operands are equal
void WordNumber_init (NuSMVEnv_ptr env)
 initialiser of the class
boolean WordNumber_is_zero (WordNumber_ptr v)
 Checks wether the word is the constant word of all bit set to zero.
WordNumber_ptr WordNumber_max (WordNumber_ptr v1, WordNumber_ptr v2, boolean isSigned)
int WordNumber_max_width (void)
 The functions returns the maximal width a Word constant can have. This is implemenatation-dependent limit.
WordNumber_ptr WordNumber_min (WordNumber_ptr v1, WordNumber_ptr v2, boolean isSigned)
boolean WordNumber_not_equal (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if operands are NOT equal
void WordNumber_quit (NuSMVEnv_ptr env)
 deinitialiser of the class
boolean WordNumber_signed_greater (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is signed greater than the right one (numbers are considered as signed)
boolean WordNumber_signed_greater_or_equal (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is signed greate than, or eqaul to, the right one (numbers are considered as signed)
boolean WordNumber_signed_less (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is signed less than the right one (numbers are considered as signed)
boolean WordNumber_signed_less_or_equal (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is signed less than, or equal to, the right one (numbers are considered as signed)
boolean WordNumber_unsigned_greater (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is greater than the right one (numbers are considered as unsigned)
boolean WordNumber_unsigned_greater_or_equal (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is greate than, or eqaul to, the right one (numbers are considered as unsigned)
boolean WordNumber_unsigned_less (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is less than the right one (numbers are considered as unsigned)
boolean WordNumber_unsigned_less_or_equal (WordNumber_ptr v1, WordNumber_ptr v2)
 returns TRUE if left operand is less than, or equal to, the right one (numbers are considered as unsigned)

Define Documentation

#define WORD_NUMBER (  )     ((WordNumber_ptr) (x))
Todo:
Missing synopsis
Todo:
Missing description
#define WORD_NUMBER_CHECK_INSTANCE (  )     (nusmv_assert(WORD_NUMBER(x) != WORD_NUMBER(NULL)))
Todo:
Missing synopsis
Todo:
Missing description

Typedef Documentation

typedef struct WordNumber_TAG* WordNumber_ptr
typedef unsigned long long WordNumberValue

WordNumber integer value.


Function Documentation

int WordNumber_based_print ( FILE *  output_stream,
WordNumber_ptr  self,
int  base,
boolean  isSigned 
)

prints a Word constant in a provided base.

returns negative value in a case of error. Only 2, 8, 10, 16 bits bases are allowed. If base is 10 then isSigned is taken into account, i.e. if it is true then the number is ouput as signed word, and as unsigned word otherwise.

See also:
WordNumber_print
boolean WordNumber_equal ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if operands are equal

the width of operands should be equal

void WordNumber_init ( NuSMVEnv_ptr  env  ) 

initialiser of the class

boolean WordNumber_is_zero ( WordNumber_ptr  v  ) 

Checks wether the word is the constant word of all bit set to zero.

WordNumber_ptr WordNumber_max ( WordNumber_ptr  v1,
WordNumber_ptr  v2,
boolean  isSigned 
)
int WordNumber_max_width ( void   ) 

The functions returns the maximal width a Word constant can have. This is implemenatation-dependent limit.

WordNumber_ptr WordNumber_min ( WordNumber_ptr  v1,
WordNumber_ptr  v2,
boolean  isSigned 
)
boolean WordNumber_not_equal ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if operands are NOT equal

the width of operands should be equal

void WordNumber_quit ( NuSMVEnv_ptr  env  ) 

deinitialiser of the class

boolean WordNumber_signed_greater ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is signed greater than the right one (numbers are considered as signed)

the width of operands should be equal

boolean WordNumber_signed_greater_or_equal ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is signed greate than, or eqaul to, the right one (numbers are considered as signed)

the width of operands should be equal

boolean WordNumber_signed_less ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is signed less than the right one (numbers are considered as signed)

the width of operands should be equal

boolean WordNumber_signed_less_or_equal ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is signed less than, or equal to, the right one (numbers are considered as signed)

the width of operands should be equal

boolean WordNumber_unsigned_greater ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is greater than the right one (numbers are considered as unsigned)

the width of operands should be equal

boolean WordNumber_unsigned_greater_or_equal ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is greate than, or eqaul to, the right one (numbers are considered as unsigned)

the width of operands should be equal

boolean WordNumber_unsigned_less ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is less than the right one (numbers are considered as unsigned)

the width of operands should be equal

boolean WordNumber_unsigned_less_or_equal ( WordNumber_ptr  v1,
WordNumber_ptr  v2 
)

returns TRUE if left operand is less than, or equal to, the right one (numbers are considered as unsigned)

the width of operands should be equal

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

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