-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
119 lines (90 loc) · 3.51 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
-*- outline -*-
rukia - Randon Uniform walK In Automata
A library to generate uniformly at random paths in automata.
Copyright (C) 2008, 2018 Johan Oudinet
* Building Rukia from a fresh git clone
* =====================================
** Bootstrap
** =========
Rukia's build system uses the Autotools. Starting from a newly cloned
git repository, the first step is to generate Makefile.am files and
configure script using the bootstrap script at the root of the source
tree:
$ ./bootstrap
One needs to call this script only once after git clone. Makefile.am
files and configure script then update automatically when needed. The
following builds do not need to call bootstrap.
This step needs Automake, Autoconf, and Libtool (Debian/Ubuntu
packages: automake, autoconf, autotools-dev, libtool, possibly
libltdl-dev. Be sure to check your alternatives regarding Autoconf
and Automake's versions. See the update-alternatives(8) man page and
use the last available versions). It also uses M4 macros provided by
the autoconf-archive project:
$ apt-get install autoconf-archive
Note, the AX_CXX_COMPILE_STDCXX_14 macro is defined in autoconf-archive
version 2017.09.28 or above.
** Build
** =====
A standard Autotools build sequence is then possible. We recommend
using separate source and build directories:
$ mkdir _build
$ cd _build
$ ../configure [OPTION]...
$ make
$ make install
The prerequisites for a full build are (Debian/Ubuntu packages):
libboost-graph-dev (>= 1.55)
libgmp-dev
If you've installed one of the required libraries in a non classical
path, you may need to tell to configure how to find it. For example,
assume BGL headers are in $HOME/include and BGL libraries are in
$HOME/lib, the following command tell to configure where they are :
$ ./configure --with-boost=$HOME
*** Tips on manual installation of Boost library
*** ============================================
extract boost archive then go in it and enter the two following
commands:
$ ./bootstrap.sh --prefix=$HOME
$ ./b2 install
$ sudo ldconfig $HOME/lib
Now Boost is correctly installed in your $HOME directory. You
just have to tell to configure where look for (as explained
previously).
* Examples
* ========
All the program examples, which use Rukia features, are in src/
directory.
You should start from draw_with_ctable.cc that produces the program
draw_exact_ctable. This program prints uniformly at random m paths of
length n from a graph described in GRAPHVIZ format (.dot). If not all
states are final state, you need to give an optional file that lists
every final states. The following commands show an example with a
graph that have 6 states but only state 5 is a final state. We draw 3
paths of length 7 in this automaton. Actually the first label 'i' is
here just to be able to draw paths of length <= 7. Hence, in this
particular execution, we got 2 paths of length 3 ('abc' and 'adg') and
1 path of length 5 ('adefg').
$ cat data/example.dot
digraph G {
0 -> 0 [label = "i"];
0 -> 1 [label = "a"];
1 -> 2 [label = "b"];
1 -> 3 [label = "d"];
2 -> 5 [label = "c"];
3 -> 4 [label = "e"];
3 -> 5 [label = "g"];
4 -> 3 [label = "f"];
}
$ cat data/example.fs
5
$ src/draw_exact_ctable data/example.dot 3 7 data/example.fs
5 is final.
i i a d e f g
i i i i a d g
i i i i a b c
* Comments are most welcome
* =========================
For issues, please report them on github:
https://github.com/joudinet/rukia
--
Johan Oudinet <[email protected]>