Commit 4410bba9 authored by Maurice Audin's avatar Maurice Audin
Browse files

Add two new TAF-Kits, char-zmin and char-zmax, with basic tests.

	* configure.ac: Add new files and wrappers.
	* taf-kit/src/Makefile.am: Add two new contexts.
	* taf-kit/tests/Makefile.am: Add tests for the new contexts.
	* taf-kit/tests/vcsn-char-zmax.test,
	* taf-kit/tests/vcsn-char-zmin.test: Add two basic tests (non-determinist automata include).
parent 5eebc564
2009-02-18 Maurice Audin <audin@lrde.epita.fr>
Add two new TAF-Kits, char-zmin and char-zmax, with basic tests.
* configure.ac: Add new files and wrappers.
* taf-kit/src/Makefile.am: Add two new contexts.
* taf-kit/tests/Makefile.am: Add tests for the new contexts.
* taf-kit/tests/vcsn-char-zmax.test,
* taf-kit/tests/vcsn-char-zmin.test: Add two basic tests (non-determinist automata include).
2009-02-13 Alexandre Duret-Lutz <adl@lrde.epita.fr>
 
* include/vaucanson/algorithms/aci_canonical.hh (canonical):
......
......@@ -234,7 +234,8 @@ VCSN_CONFIG_WRAPPER([vcsn-int-z])
VCSN_CONFIG_WRAPPER([vcsn-char-char-b])
VCSN_CONFIG_WRAPPER([vcsn-char-int-b])
VCSN_CONFIG_WRAPPER([vcsn-int-int-b])
VCSN_CONFIG_WRAPPER([vcsn-char-zmin])
VCSN_CONFIG_WRAPPER([vcsn-char-zmax])
## ------- ##
......
......@@ -17,11 +17,11 @@ include $(top_srcdir)/vaucanson.mk
AM_CPPFLAGS += $(CXXFLAGS_OPTIMIZE)
AM_LDFLAGS += $(TERMLIBS)
bin_PROGRAMS = vcsn-char-b vcsn-char-z vcsn-char-r vcsn-char-fmp-b \
vcsn-int-b vcsn-int-z vcsn-int-fmp-b \
vcsn-int-fmp-z vcsn-char-fmp-z \
vcsn-char-char-b vcsn-int-int-b \
vcsn-char-int-b
bin_PROGRAMS = vcsn-char-b vcsn-char-z vcsn-char-r vcsn-char-fmp-b \
vcsn-int-b vcsn-int-z vcsn-int-fmp-b \
vcsn-int-fmp-z vcsn-char-fmp-z \
vcsn-char-char-b vcsn-int-int-b \
vcsn-char-int-b vcsn-char-zmin vcsn-char-zmax
COMMON_SOURCES = commands.hh \
commands_macros.hh \
......@@ -188,5 +188,26 @@ vcsn_int_int_b_LDADD = $(LDADD) \
$(top_builddir)/lib/libvcsn-int-int-b.la
vcsn_char_zmin_SOURCES = $(COMMON_SOURCES) \
ratexp_commands.hh \
common_automaton_commands.hh \
b_commands.cc
vcsn_char_zmin_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=z_min_plus_automaton -DVCSN_USE_LIB
vcsn_char_zmin_LDADD = $(LDADD) \
$(top_builddir)/lib/libvcsn-z-min.la \
$(top_builddir)/lib/libkrat_exp.la
vcsn_char_zmax_SOURCES = $(COMMON_SOURCES) \
ratexp_commands.hh \
common_automaton_commands.hh \
b_commands.cc
vcsn_char_zmax_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=z_max_plus_automaton -DVCSN_USE_LIB
vcsn_char_zmax_LDADD = $(LDADD) \
$(top_builddir)/lib/libvcsn-z-max.la \
$(top_builddir)/lib/libkrat_exp.la
LDADD = $(top_builddir)/gnulib/libgnu.la
AM_CPPFLAGS += -I$(top_srcdir)/gnulib
......@@ -26,6 +26,8 @@ TESTS = \
vcsn-char-char-b.test \
vcsn-char-int-b.test \
vcsn-int-int-b.test \
vcsn-char-zmin.test \
vcsn-char-zmax.test \
completeness.test
XFAIL_TESTS = completeness.test
......@@ -52,6 +54,8 @@ EXTRA_DIST = $(TESTS) \
automata/int-b/int-b.xml \
automata/int-z/int-z.xml
# Each test case depends on defs.
check_SCRIPTS = \
defs \
......@@ -66,7 +70,9 @@ check_SCRIPTS = \
vcsn-int-z \
vcsn-char-char-b \
vcsn-char-int-b \
vcsn-int-int-b
vcsn-int-int-b \
vcsn-char-zmin \
vcsn-char-zmax
distclean-local:
-rm -rf $(TESTS:.test=.dir)
#! /bin/sh
# Vaucanson, a generic library for finite state machines.
# Copyright (C) 2006, 2007, 2008, 2009 The Vaucanson Group.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# The complete GNU General Public Licence Notice can be found as the
# `COPYING' file in the root directory.
#
# The Vaucanson Group consists of people listed in the `AUTHORS' file.
. ./defs || exit 1
set -e
VCSN=vcsn-char-zmax
# BEWARE: we are mixing the letters O/I with the digits 0/1 below.
sed '/^#/d' <<EOF | $VCSN --parser='ONE=I ZERO=O ALPHABET=01' edit-automaton oi.xml
# Add states
1
# Add five states
5
# Set a state to be initial.
5
# Which state
0
# Set a state to be final.
7
# Which state
3
# Set a state to be final.
7
# Which state
4
# Add transition
3
# From and to
0
1
# Label
{2} 0
# Add transition
3
# From and to
0
2
# Label
{5} 0
# Add transition
3
# From and to
1
3
# Label
{6} 1
# Add transition
3
# From and to
2
4
# Label
{1} 1
# Exit.
10
EOF
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' eval oi.xml '01' > out
test `cat out` = 8
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' standard '(I+O).1.(I+0)+O'
# Test on an empty automaton
echo 10 | $VCSN --alphabet=ab edit-automaton empty.xml
$VCSN eval empty.xml "ab" > out
test `cat out` = -oo
# BEWARE: we are mixing the letters O/I with the digits 0/1 below.
sed '/^#/d' <<EOF | $VCSN --parser='ONE=I ZERO=O ALPHABET=01' edit-automaton oi.xml
# Add states
1
# Add eleven states
11
# Set a state to be initial.
5
# Which state
0
# Set a state to be initial.
5
# Which state
2
# Set a state to be final.
7
# Which state
7
# Set a state to be final.
7
# Which state
9
# Set a state to be final.
7
# Which state
10
# Add transition
3
# From and to
0
1
# Label
{10} 1
# Add transition
3
# From and to
0
2
# Label
{72} 0
# Add transition
3
# From and to
0
3
# Label
{12} 1
# Add transition
3
# From and to
1
4
# Label
{20} 0
# Add transition
3
# From and to
2
5
# Label
{2} 1
# Add transition
3
# From and to
3
6
# Label
{1} 0
# Add transition
3
# From and to
4
7
# Label
{30} 1
# Add transition
3
# From and to
5
8
# Label
{42} 0
# Add transition
3
# From and to
6
9
# Label
{51} 1
# Add transition
3
# From and to
8
10
# Label
{7} 1
# Exit.
10
EOF
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' eval oi.xml '101' > out
test `cat out` = 64
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' standard '(I+O).1.(I+0)+O'
#! /bin/sh
# Vaucanson, a generic library for finite state machines.
# Copyright (C) 2006, 2007, 2008, 2009 The Vaucanson Group.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# The complete GNU General Public Licence Notice can be found as the
# `COPYING' file in the root directory.
#
# The Vaucanson Group consists of people listed in the `AUTHORS' file.
. ./defs || exit 1
set -e
VCSN=vcsn-char-zmin
# BEWARE: we are mixing the letters O/I with the digits 0/1 below.
sed '/^#/d' <<EOF | $VCSN --parser='ONE=I ZERO=O ALPHABET=01' edit-automaton oi.xml
# Add states
1
# Add five states
5
# Set a state to be initial.
5
# Which state
0
# Set a state to be final.
7
# Which state
3
# Set a state to be final.
7
# Which state
4
# Add transition
3
# From and to
0
1
# Label
{2} 0
# Add transition
3
# From and to
0
2
# Label
{5} 0
# Add transition
3
# From and to
1
3
# Label
{6} 1
# Add transition
3
# From and to
2
4
# Label
{1} 1
# Exit.
10
EOF
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' eval oi.xml '01' > out
test `cat out` = 6
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' standard '(I+O).1.(I+0)+O'
# Test on an empty automaton
echo 10 | $VCSN --alphabet=ab edit-automaton empty.xml
$VCSN eval empty.xml "ab" > out
test `cat out` = +oo
# BEWARE: we are mixing the letters O/I with the digits 0/1 below.
sed '/^#/d' <<EOF | $VCSN --parser='ONE=I ZERO=O ALPHABET=01' edit-automaton oi.xml
# Add states
1
# Add eleven states
11
# Set a state to be initial.
5
# Which state
0
# Set a state to be initial.
5
# Which state
2
# Set a state to be final.
7
# Which state
7
# Set a state to be final.
7
# Which state
9
# Set a state to be final.
7
# Which state
10
# Add transition
3
# From and to
0
1
# Label
{10} 1
# Add transition
3
# From and to
0
2
# Label
{72} 0
# Add transition
3
# From and to
0
3
# Label
{12} 1
# Add transition
3
# From and to
1
4
# Label
{20} 0
# Add transition
3
# From and to
2
5
# Label
{2} 1
# Add transition
3
# From and to
3
6
# Label
{1} 0
# Add transition
3
# From and to
4
7
# Label
{30} 1
# Add transition
3
# From and to
5
8
# Label
{42} 0
# Add transition
3
# From and to
6
9
# Label
{51} 1
# Add transition
3
# From and to
8
10
# Label
{7} 1
# Exit.
10
EOF
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' eval oi.xml '101' > out
test `cat out` = 51
$VCSN --parser='ONE=I ZERO=O ALPHABET=01' standard '(I+O).1.(I+0)+O'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment