]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/blob - www/index.mdwn
web: Update tested version
[boost-statechart-viewer.git] / www / index.mdwn
1 [[!meta title="Boost Statechart Viewer"]]
2
3 Overview
4 ---------
5
6 Boost-statechart-viewer is a program for visualization of state
7 machines written in C++ with [boost][boost]/[statechart][statechart]
8 library. The program itself is written in C++ and uses [clang][clang]
9 from [LLVM][llvm] project for analyzing the source code. This program
10 is released under the GNU GPL license.
11
12 [boost]: http://www.boost.org/
13 [statechart]: http://www.boost.org/doc/libs/1_46_1/libs/statechart/doc/index.html
14 [clang]: http://clang.llvm.org/
15 [llvm]: http://llvm.org/
16
17 NEWS
18 -----
19 - 2014-03-10 Updated to work with clang/llvm 3.3 and 3.4. Thanks Jan Rueegg.
20 - 2013-05-16 Script for generating is able to work with more source files and treat them as one state machine.
21 - 2013-04-05 The program is working with LLVM and Clang version 3.0 or higher
22 - 2012-07-11 We have got a new [mailing list][list].
23
24 Authors
25 --------
26
27 [list]: https://rtime.felk.cvut.cz/mailman/listinfo/boost-statechart-viewer
28
29 Petr Silhavik, Michal Sojka. You can contact us using a
30 [mailing list][list] at <boost-statechart-viewer@rtime.felk.cvut.cz>.
31
32 Status
33 -------
34
35 - The program can found states and transitions in the source code.
36 - The program understands all options and flags as the compilers (gcc, clang, ...). The syntax analysis is done by compiler clang.
37 - State machines can be defined in more than one file.
38 - All states and their implementations must be directly accesible from file that is used as input for viewer.
39 - Program provides diagnostics of state machines eg. event usage, missing typedefs for reactions.
40
41 For compiling and correctly working program it is necessary to have
42 LLVM and clang version 3.3 or higher.
43
44
45 Usage
46 ------
47
48 The program is plugin for compiler clang. The produced output file has the same name as the input file with source code.
49 It is also possible to use script that also produces the state diagram in format pdf. It can be also found in repository. 
50 This script is able to work with more C++ files and treat them as one state machine. This option can be accesed by using -link as first parameter. The other parameters should be all files that are used for compilation of state machines (e.g. *.cpp, *.cc). If this option is not used state diagram is generated for all files independently.
51
52 ####Example of command line invocation: 
53
54     clang++ -Xclang -load -Xclang visualizer.so -Xclang -plugin -Xclang visualize-statechart -c file.cpp
55
56 The output file can be transformed into the picture using classical
57 [dot][graphviz] commands (e.g. `dot -Tpng graph.dot -o graph.png`) . The initial
58 state is double outlined. Each transition has a label with the name of
59 the triggering event.
60
61 [graphviz]: http://www.graphviz.org/
62
63 Download:
64 ---------
65
66 Boost statechart viewer can be downloaded from GIT repository.
67
68     git clone git://rtime.felk.cvut.cz/boost-statechart-viewer.git
69
70 You can also browse the [repository online][1].
71
72
73 Gallery
74 -------
75
76 ### Small
77 [[small.png]]  
78 [[Source code|test.cpp]]
79
80 ### StopWatch
81 [[stopWatch.png]]  
82 [[Source code|StopWatch.cpp]]
83
84 ### Camera
85  - Camera example from boost statechart library
86  - State Storing is red because it has no typedef for reactions and it can be error produced by programmer
87
88 [[camera.png]]  
89 [[Source code|camera.tar.gz]]
90
91 ### Big
92 [[big.png]]  
93 [[Source code|big_sm.tar.gz]]
94
95   [1]: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git