-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.h
61 lines (51 loc) · 1.38 KB
/
action.h
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
#ifndef ACTION_H
#define ACTION_H
typedef int **matrix;
/*
requires: f!=NULL
assigns: nothing
ensures: returns int n = number of states of the automaton
*/
int print_states(FILE* f);
/*
requires: width line n>=0 & height column m>=0
assigns: n * sizeof(int) cases in width & m* sizeof(int) cases in height
ensures: returns a 2D array / matrix
*/
matrix create_matrix(int line,int column);
/*
@requires: mat has size m
@assigns: nothing
@ensures: frees memory allocated to mat*/
void free_matrix(matrix mat, int line);
/*
requires: matrix m
assigns: nothing
ensures: prints an extracted matrix of m with new width =n and height=m
*/
void print_matrix(matrix mat,int line, int column);
/*
requires:f!=NULL, n = number of states >=0
assigns: n * sizeof(int) cases in width & 128* sizeof(int) cases in height
ensures: returns m_action
*/
matrix get_action(FILE* f,int n);
/*
requires: file* f!=NULL, int n = number of states >=0
assigns: n * sizeof(int) cases in width
ensures: returns m_reduit
*/
matrix get_reduit(FILE* f,int n);
/*
requires: file* f!=NULL, int n = number of states >=0
assigns: at most n * sizeof(int) cases in width && 128 in height
ensures: returns m_decale
*/
matrix get_decale(FILE* f,int n);
/*
requires:f!=NULL, n = number of states >=0
assigns: at most n * sizeof(int) cases in width && 128 in height
ensures: returns branchement
*/
matrix get_branchement(FILE* f,int n);
#endif