-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollatz.h
More file actions
96 lines (63 loc) · 1.54 KB
/
Collatz.h
File metadata and controls
96 lines (63 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// The template for class header
#ifndef CLASSES_Collatz_H_
#define CLASSES_Collatz_H_
#define VDM_CG
#include "Vdm.h"
//include types used in the class
#include "Collatz.h"
/* -------------------------------
*
* Quotes
*
--------------------------------- */
/* -------------------------------
*
* values / global const
*
--------------------------------- */
extern TVP numFields_1;
/* -------------------------------
*
* The class
*
--------------------------------- */
//class id
#define CLASS_ID_Collatz_ID 0
#define CollatzCLASS struct Collatz*
// The vtable ids
#define CLASS_Collatz__Z7CollatzEI 0
#define CLASS_Collatz__Z3runEV 1
#define CLASS_Collatz__Z7CollatzEV 2
struct Collatz
{
/* Definition of Class: 'Collatz' */
VDM_CLASS_BASE_DEFINITIONS(Collatz);
VDM_CLASS_FIELD_DEFINITION(Collatz,val);
VDM_CLASS_FIELD_DEFINITION(Collatz,numFields);
};
/* -------------------------------
*
* Constructors
*
--------------------------------- */
/* A.vdmrt 6:8 */
TVP _Z7CollatzEI(CollatzCLASS this_, TVP v);
/* A.vdmrt 1:7 */
TVP _Z7CollatzEV(CollatzCLASS this_);
/* -------------------------------
*
* public access functions
*
--------------------------------- */
void Collatz_const_init();
void Collatz_const_shutdown();
void Collatz_static_init();
void Collatz_static_shutdown();
/* -------------------------------
*
* Internal
*
--------------------------------- */
void Collatz_free_fields(CollatzCLASS);
CollatzCLASS Collatz_Constructor(CollatzCLASS);
#endif /* CLASSES_Collatz_H_ */