Skip to content

Commit cc08f01

Browse files
committed
package: version 2.1
* NEWS.txt, TODO.txt: Update.
1 parent 9ddc139 commit cc08f01

File tree

3 files changed

+100
-27
lines changed

3 files changed

+100
-27
lines changed

NEWS.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ the internal API may also be documented.
77

88
# Vcsn 2.1
99

10-
## 2015-10-06
10+
## 2015-10-11
1111

1212
About 10,000 hours (on the calendar, not of work!) after its first public
13-
release, the Vcsn team is very happy to announce the release of Vcsn 2!
13+
release, the Vcsn team is very happy to announce the release of Vcsn 2.1!
1414

1515
It is quite hard to cherry-pick a few new features that have been added in
1616
Vcsn 2.1, as shown by the 4k+ lines of messages below since 2.0. However,
@@ -53,7 +53,7 @@ People who worked on this release:
5353
- Valentin Tolmer
5454
- Yann Bourgeois--Copigny
5555

56-
People who influenced this release:
56+
People who have influenced this release:
5757

5858
- Alexandre Duret-Lutz
5959
- Jacques Sakarovitch

TODO.txt

Lines changed: 95 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ We need more tests. In particular something that checks:
8888
* vcsn/algos/synchronize.hh: Here.
8989

9090
* Bugs
91-
** subprograms
91+
** subprograms (AP)
9292
We don't kill our children when we are killed. For instance, if the user
9393
asked for the graphical rendering of a huge automaton, and decides to kill
9494
vcsn realizing her error, the dot process will continue to waste cpu.
@@ -113,7 +113,7 @@ from the caller, which is the one which knows the identities to use!
113113
As a matter of fact, we need to revise the propagation of the identities
114114
everywhere.
115115

116-
** Incorrect context
116+
** Incorrect context (SP)
117117
When trie(istream) adds words to the trie, the context used to parse the
118118
stream is not the one of the automaton we are buildding. As a result, we
119119
have a stupid context:
@@ -173,10 +173,6 @@ In the case of RW, check that the expression is valid.
173173
** debug compilation mode
174174
crange should not feature size and empty if !VCSN_DEBUG.
175175

176-
** check dubious const& members
177-
Having a member of type automaton_t (or similarly, a shared_ptr) as a const& is
178-
suspicious, and it should be checked in every class.
179-
180176
* Improvements
181177
** are-equivalent
182178
V1 was calling letterize and proper, so it was more general than we are now.
@@ -205,12 +201,45 @@ non-commutativity: as is, (a, b) can work, but not (b, a).
205201
But anyway: does it really mean something to compare a B-automaton with a Z
206202
one?
207203

208-
** dot
204+
** dot (SP)
209205
Let's try a means to improve our rendering of decorated automaton (typically
210206
derived-term) with MathJax rendering. Stackoverflow has hints on how we can
211207
do that for SVG, but so far, I failed to adjust the output of dot.
212208

213-
** efsm
209+
** dot
210+
At least under IPython we would like to have cuter automata. I don't like
211+
the fact that the size of the states depends on the number of digits for
212+
instance. Larger than 999 hardly makes sense, so let's try to fix it for 1
213+
or 2 digits.
214+
215+
Here was an attempt:
216+
217+
diff --git a/python/vcsn/dot.py b/python/vcsn/dot.py
218+
index 72fddc2..055f85b 100644
219+
--- a/python/vcsn/dot.py
220+
+++ b/python/vcsn/dot.py
221+
@@ -11,7 +11,7 @@ from vcsn import _tmp_file, _popen, _check_call
222+
# Default style for real states as issued by vcsn::dot.
223+
state_style = 'node [shape = circle, style = rounded, width = 0.5]'
224+
# IPython style for real states.
225+
-state_colored = 'node [fillcolor = cadetblue1, shape = circle, style = "filled,rounded", width = 0.5]'
226+
+state_colored = 'node [fillcolor = cadetblue1, shape = circle, style = "filled,rounded", height = 0.4]'
227+
# Style for pre and post states, or when rendering transitions only.
228+
state_point = 'node [shape = point, width = 0]'
229+
230+
** efsm: single-pass reading (SP)
231+
Currently when we load an EFSM file, we use the lazy-automaton-editor, which
232+
stores transitions as a list of strings, checks these strings to see what
233+
kind of labels and weights are used, and then reads the transition list to
234+
really create the automaton.
235+
236+
We should rather improve efstdecompile so that it inserts in the EFSM file a
237+
context string, and we should directly load the automaton in a single pass,
238+
using automaton_editor, not lazy_automaton_editor.
239+
240+
It sounds reasonable to rewrite efstdecompile into Python.
241+
242+
** efsm (SP)
214243
When passing a LAW, maybe we should letterize it transparently? Currently,
215244
we treat it as if it were lan<string> instead of law<char>.
216245

@@ -258,8 +287,10 @@ Those two should really be the same algorithm, it's the signatures that
258287
change. And rather than having two implementations, we should have a single
259288
implementation of the algorithm, but better data structures for signatures.
260289

261-
** multiply
262-
The repeated multiplication of automata does not check that min <= max.
290+
** multiply (SP)
291+
The repeated multiplication of automata does not check that min <= max. See
292+
if there are other such errors. This is probably checked in the case of
293+
expressions.
263294

264295
** normalize
265296
I'm a bit lost in polynomialset::normalize: how come in
@@ -273,6 +304,43 @@ for i in range(10):
273304
it manages to factor out the '<2>x' bits? Reading the code, I fail to see
274305
where the common 'xx' are removed.
275306

307+
** Extending classes in Python (AD, AP, SP)
308+
In Python, we augment the classes built by Boost.Python, but Python is messy
309+
to do that: we have to create a function, and then to bind it as a method.
310+
Yet the function stays there, it's ugly.
311+
312+
See the following commit (currently in their branch `next`) in Spot:
313+
314+
commit e8ce08a98958d30ed15c443d960fa226650ddfb3
315+
Author: Alexandre Duret-Lutz <[email protected]>
316+
Date: Wed Oct 7 19:42:51 2015 +0200
317+
318+
python: better way to extend existing classes
319+
320+
* wrap/python/spot.py: Use a decorator to extend classes.
321+
* wrap/python/tests/formulas.ipynb: Adjust expected help text.
322+
323+
+def _extend(*classes):
324+
+ """
325+
+ Decorator that extends all the given classes with the contents
326+
+ of the class currently being defined.
327+
+ """
328+
+ def wrap(this):
329+
+ for cls in classes:
330+
+ for (name, val) in this.__dict__.items():
331+
+ if name not in ('__dict__', '__weakref__') \
332+
+ and not (name == '__doc__' and val is None):
333+
+ setattr(cls, name, val)
334+
+ return classes[0]
335+
+ return wrap
336+
+
337+
338+
And use it to extend our classes in Python.
339+
340+
** Python: __format__ (AD, AP, SP)
341+
I just discovered that Python feature, which is nicely used in Spot, and I
342+
think we should have something like it. See the s
343+
276344
** rat: parse
277345

278346
v score-compare --only 'b.expression\(e\)' +scores/36s/v2.0-0931-gd70d722 \
@@ -307,10 +375,11 @@ Fix this. Ask other members of the project what they think about that
307375
** products: lazyness
308376
We need a lazy implementation of product.
309377

310-
** product: is_idempotent
311-
We don't need to insplit in the case of idempotent semirings.
378+
** product: is_idempotent (VT)
379+
We don't need to insplit in the case of idempotent semirings, not just in
380+
the case of B.
312381

313-
** product: lazy insplit
382+
** product: lazy insplit (VT)
314383
Explore the possibility to apply insplitting lazily.
315384

316385
** products: a function on top of all the products?
@@ -320,6 +389,15 @@ in our API.
320389
Also, it would be nice to have variadic versions of these products for
321390
expressions, just as we have it for automata.
322391

392+
** ps (SP)
393+
vcsn-ps is currently written in sh + perl. Rewrite in Python, using the
394+
psutil to gain portability. Display the duration in a first column, then
395+
use something equivalent to what vcsn-compile does with the sugar function
396+
to improve the display of what is being compiled.
397+
398+
Of course there should be no code duplication: ask Antoine where the common
399+
code should be put.
400+
323401
** scc
324402
Dijkstra is often more efficient than Tarjan, so we should have an
325403
implementation too. See
@@ -391,7 +469,7 @@ Boost.Optional 1.56 moves from opt.get_value_or to opt.value_or. However,
391469
moving to C++17 should suffice: use std::optional.
392470

393471
** Copy
394-
There are numerous opportunities for an improve copy. For instance when
472+
There are numerous opportunities for an improved copy. For instance when
395473
computing the square automaton (see has_twins_property), we would like to
396474
call copy with a lambda that transforms the weights: \w.w -> (w, 1) and
397475
likewise for the other tape. If we can do that on-the-fly, then the
@@ -408,7 +486,7 @@ because sometimes we need to escape the output (e.g., label = "\\langle 1
408486
\\rangle" in dot), and sometimes not (e.g., "\langle 1 \rangle" in TikZ).
409487
Find something more elegant to address this issue. See what was done in tc?
410488

411-
** Beware of our use of subprocess
489+
** Beware of our use of subprocess (AP)
412490
I think my code is really wrong.
413491
http://stackoverflow.com/questions/6341451/piping-together-several-subprocesses
414492

@@ -529,11 +607,11 @@ the accessible parts.
529607

530608
** ambiguous_word
531609
We are clearly traversing the automaton too many times: once to find a pair
532-
of "ambiguous states", then another time to compute am ambiguous word. If
610+
of "ambiguous states", then another time to compute an ambiguous word. If
533611
speed were an issue, we should do it another way.
534612

535613
In particular, it might be a good idea to use a distance map to ensure that
536-
we good (one of the) shortest ambiguous word.
614+
we found (one of) the shortest ambiguous word.
537615

538616
** bool is true
539617
In automata, false never appears for both b and f2. mutable_automaton takes
@@ -646,11 +724,6 @@ The core issue is really that we build a monster: 6'119'750 transitions for
646724
the latter, and 17'480 for the former. The ratio, 355, is still smaller
647725
than that of timings: 2750.
648726

649-
* to-expression
650-
** Incremental
651-
Transform the current implementation of the "naive" heuristics into
652-
something incremental. See what TAF-Kit.pdf B.1.4.1 says about it.
653-
654727
* dyn::
655728
** Implement implicit conversions
656729
So that, for instance, we can run is-derministic on a proper lan.

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Vcsn 2, a generic library for finite state machines.
2-
# Copyright (C) 2012-2014 Vaucanson Group.
2+
# Copyright (C) 2012-2015 Vaucanson Group.
33
#
44
# This program is free software; you can redistribute it and/or
55
# modify it under the terms of the GNU General Public License
@@ -15,7 +15,7 @@ m4_pattern_forbid([^(AX|BOOST|TC|URBI|VCSN)_])
1515

1616
AC_PREREQ([2.69])
1717

18-
AC_INIT([Vcsn], [2.0a],
18+
AC_INIT([Vcsn], [2.1],
1919
2020
[http://vcsn.lrde.epita.fr/])
2121
AC_CONFIG_AUX_DIR([build-aux/bin])

0 commit comments

Comments
 (0)