You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jacodb-ets/ARKANALYZER.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,13 @@ npm run build
14
14
15
15
The `npm run build` command will generate the `out` directory, which contains the compiled code.
16
16
17
+
### Usage of forked ArkAnalyzer
18
+
19
+
Most probably, you will have to use our fork of ArkAnalyzer (https://gitee.com/Lipenx/arkanalyzer) and checkout a specific branch that is consistent with the current state of jacodb.
20
+
For this, replace the repo url in the commands above and use `git switch <branch>` to checkout the desired branch.
21
+
22
+
> Latest supported AA branch is `neo/2025-02-13`.
23
+
17
24
## Serialize TS to JSON
18
25
19
26
To serialize ArkIR to JSON for TypeScript files/projects, use the `serializeArkIR.ts` script:
@@ -35,11 +42,34 @@ Options:
35
42
-h, --help display helpforcommand
36
43
```
37
44
38
-
You can also use `node <out>/serializeArkIR.js` directly (note the `.js` extension here!) instead of `npx`. Remember to run `npm run build` beforehand.
45
+
You can also use `node <out>/serializeArkIR.js` directly (note the `.js` extension here!) instead of `npx ts-node`.
46
+
Remember to run `npm run build` beforehand.
39
47
40
48
For example, to serialize ArkIR for all TS files in `resources/ts/` into the corresponding JSON files in `resources/ir/`, run:
41
49
42
50
```shell
43
51
cd .../resources
44
52
npx ts-node ~/dev/arkanalyzer/out/src/save/serializeArkIR.ts -m ts ir
45
53
```
54
+
55
+
## Serialize sample projects and test the deserialization
56
+
57
+
To test the serialization/deserialization pipeline in jacodb, first prepare and serialize the projects using `prepare_repos.sh` (pulls repos with sources) and `prepare_projects.sh` (serializes all projects) scripts:
58
+
59
+
```shell
60
+
cd jacodb-ets/src/test/resources
61
+
bash prepare_repos.sh
62
+
bash prepare_projects.sh
63
+
```
64
+
65
+
(Use `-f` flag for `prepare_projects.sh` to force re-serialization, that is, override already existing folders.)
66
+
67
+
Then, to test the serialization, run jacodb tests devoted to the serialization:
68
+
69
+
```shell
70
+
71
+
The, run jacodb tests devoted to the deserialization:
0 commit comments