-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLTS.h
66 lines (48 loc) · 1.15 KB
/
LTS.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
62
63
64
65
66
#ifndef LTS_H
#define LTS_H
#include <bits/stdc++.h>
#include <unordered_map>
#include <fstream>
#include "utility.h"
#include "preprocess_partition.h"
#include "preprocess.h"
using namespace std;
enum Example {example1, example2, example3};
class LTS{
public:
int N; // Number of states
int M; // Number of transitions
int L; // Number of different label
int* source;
int* target;
int* label;
unordered_map<string, int> label_map;
unordered_map<int, string> reverse_label_map;
//These values will come on the device
int* source_d;
int* target_d;
int* label_d;
int* order_d;
int* block_d;
int* nr_mark_d;
int* marks_offset_d;
int marks_length;
LTS();
LTS(string file);
LTS(Example ex);
void Init(string file);
void Init(Example ex);
~LTS();
void init_device();
void to_device();
void to_host();
void preprocess();
void free_device();
void print_transitions(int max = -1);
void print_states(int max = -1);
private:
void processHeader(istream* stream);
void processLine(istream* stream, int i);
bool device_initialized = false;
};
#endif