Commit 98ba8306 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Create vcsn-int-z.

parent ca15e2bd
2008-08-01 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Create vcsn-int-z.
* configure.ac: Output taf-kit/tests/vcsn-int-z.
* taf-kit/src/Makefile.am: Build vcsn-int-z.
* taf-kit/tests/vcsn-int-z.test,
taf-kit/tests/automata/int-z/int-z.xml: New files.
* taf-kit/tests/Makefile.am: Adjust.
* taf-kit/tests/defs.in (int_z): New variable.
2008-08-01 Jerome Galtier <jerome.galtier@lrde.epita.fr>
Update ignores on sanity tests.
......@@ -159,7 +170,7 @@
* taf-kit/src/getters.hh, taf-kit/src/getters.hxx (get_word): New
function.
* taf-kit/src/common_automaton_commands.hh (eval): Use it.
* configure.ac: Output taf-kit/tests/.
* configure.ac: Output taf-kit/tests/vcsn-int-b.
2008-07-31 Alexandre Duret-Lutz <adl@lrde.epita.fr>
......
......@@ -211,6 +211,7 @@ VCSN_CONFIG_WRAPPER([vcsn-char-b])
VCSN_CONFIG_WRAPPER([vcsn-char-fmp])
VCSN_CONFIG_WRAPPER([vcsn-char-z])
VCSN_CONFIG_WRAPPER([vcsn-int-b])
VCSN_CONFIG_WRAPPER([vcsn-int-z])
......
......@@ -17,7 +17,7 @@ AM_CPPFLAGS += $(CXXFLAGS_OPTIMIZE)
AM_LDFLAGS = $(TERMLIBS)
bin_PROGRAMS = vcsn-char-b vcsn-char-z vcsn-char-fmp \
vcsn-int-b
vcsn-int-b vcsn-int-z
COMMON_SOURCES = commands.hh \
commands_macros.hh \
......@@ -80,6 +80,15 @@ vcsn_int_b_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=int_boolean_automaton \
vcsn_int_b_LDADD = $(LDADD) \
$(top_builddir)/lib/libkrat_exp.la
vcsn_int_z_SOURCES = $(COMMON_SOURCES) \
ratexp_commands.hh \
common_automaton_commands.hh \
z_commands.cc
vcsn_int_z_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=int_z_automaton \
-DNO_PREDEF_ALPHABETS
vcsn_int_z_LDADD = $(LDADD) \
$(top_builddir)/lib/libkrat_exp.la
## ------ ##
## argp. ##
......
......@@ -17,8 +17,9 @@ TESTS = \
vcsn-char-b.test \
vcsn-char-z.test \
vcsn-char-fmp.test \
completeness.test \
vcsn-int-b.test
vcsn-int-b.test \
vcsn-int-z.test \
completeness.test
XFAIL_TESTS = completeness.test
......@@ -36,7 +37,8 @@ EXTRA_DIST = $(TESTS) \
automata/char-fmp/u2.xml \
automata/char-z/standard_c1.xml \
automata/char-z/void_z_automaton.xml \
automata/int-b/int-b.xml
automata/int-b/int-b.xml \
automata/int-z/int-z.xml
# Each test case depends on defs.
check_SCRIPTS = \
......@@ -44,7 +46,8 @@ check_SCRIPTS = \
vcsn-char-b \
vcsn-char-fmp \
vcsn-char-z \
vcsn-int-b
vcsn-int-b \
vcsn-int-z
distclean-local:
-rm -rf $(TESTS:.test=.dir)
<fsmxml xmlns="http://vaucanson.lrde.epita.fr" version="1.0">
<automaton name="integer_based_boolean_automaton">
<valueType>
<semiring operations="classical" set="Z" type="numerical"/>
<monoid genDescrip="enum" genKind="simple" genSort="integers" type="free">
<monGen value="10"/>
<monGen value="11"/>
</monoid>
</valueType>
<automatonStruct>
<states>
<state id="s0"/>
<state id="s1"/>
<state id="s2"/>
</states>
<transitions>
<transition src="s0" target="s1">
<label>
<sum>
<leftExtMul>
<weight value="2"/>
<one/>
</leftExtMul>
<monElmt>
<monGen value="10"/>
</monElmt>
</sum>
</label>
</transition>
<transition src="s1" target="s2">
<label>
<leftExtMul>
<weight value="3"/>
<monElmt>
<monGen value="11"/>
</monElmt>
</leftExtMul>
</label>
</transition>
<initial state="s0"/>
<final state="s2"/>
</transitions>
</automatonStruct>
</automaton>
</fsmxml>
......@@ -197,6 +197,7 @@ u2=$automata_tests_dir/char-fmp/u2.xml
t2_ucompose_u2=$automata_tests_dir/char-fmp/t2_u-compose_u2.xml
inverted_t1=$automata_tests_dir/char-fmp/inverted_t1.xml
int_b=$automata_tests_dir/int-b/int-b.xml
int_z=$automata_tests_dir/int-z/int-z.xml
## ---------- ##
......
#! /bin/sh
# Vaucanson, a generic library for finite state machines.
# Copyright (C) 2008 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-int-z
$VCSN identity $int_z
# Make sure dot understands the output.
$VCSN dot-dump $int_z | dot
test `$VCSN eval $int_z "10#11"` = 3
test `$VCSN eval $int_z "10#12"` = 0
test `$VCSN eval $int_z "11"` = 6
$VCSN eval $int_z "1" 2> stderr && exit 1
grep 'Cannot parse' stderr
sed '/^#/d' <<EOF | $VCSN --alphabet words:32,33,34 define-automaton 33.xml
# Add states
1
# Add one state
2
# Set a state to be initial.
5
# Which state
0
# Set a state to be final.
7
# Which state
1
# Add transition
3
# From and to
0
1
# Label
{5} 32
# Add transition
3
# From and to
1
0
# Label
33 {7}
# Exit.
10
EOF
fail1 $VCSN is-complete 33.xml
$VCSN complete 33.xml \| is-complete -
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