forked from scribble/scribble-java
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
103 lines (56 loc) · 2.35 KB
/
README
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
97
98
99
100
101
102
103
README for
scribble-dist-0.4-SNAPSHOT.zip
This distribution is built from the master branch
https://github.com/scribble/scribble-java/tree/master
by
mvn [clean] install
(Output written to dist/target)
Issue reporting
---
Bugs and issues can be reported via the github Issues facility.
Or email rhu1234 [at] doc.ic.ac.uk excluding the 1234.
Scribble distribution zip contents:
---
- lib jars needed to run the scribble-java tool
- scribblec.sh script for running the command line tool
Command line usage:
---
> List command line options.
./scribblec.sh --help
> Check well-formedness of global protocols in, e.g., Test.scr.
./scribblec.sh Test.scr
Notes:
- Use the -oldwf command line flag to use the simpler syntactic protocol
well-formedness from the previous version of Scribble.
- Use the -V command line flag to obtain full traces for errors according
to the new protocol validation (and other details).
> Project local protocol for role "C" of protocol "Proto" in Test.scr
./scribblec.sh Test.scr -project Proto C
> Print dot representation of Endpoint FSM for role "C" of protocol "Proto"
in Test.scr
./scribblec.sh Test.scr -fsm Proto C
> Generate Java Endpoint API for role "C" of protocol "Proto"
in Test.scr
./scribblec.sh -d . Test.scr -api Proto C
Examples:
---
> To make an HelloWorld test:
echo 'module Test; global protocol Proto(role C, role S) {
Hello() from C to S; }' > Test.scr
Further examples can be found in:
https://github.com/scribble/scribble-java/tree/master/modules/demos/scrib
The distribution zip does not include these examples. They can be obtained
as part of the source repository, or separately via the above link.
> E.g. To generate the Java Endpoint API for role "C" of the "Adder"
protocol from http://www.doc.ic.ac.uk/~rhu/scribble/fase16.pdf
./scribblec.sh -d modules/demos/scrib/fase16/src
modules/demos/scrib/fase16/src/fase16/adder/Adder.scr -api Adder C
Alternative command line usage:
---
To run the Scribble tool directly via java:
try scribblec.sh with the --verbose flag
to see the underlying java command with main class, classpath and other args.
Or try (from Nick Ng):
$ mvn dependency:build-classpath -Dmdep.outputFile=classpath
$ java -cp $(cat dist/classpath)
org.scribble.cli.CommandLine [args] MyModule.scr