~a-j-delaney/libamore/cunit-dev

« back to all changes in this revision

Viewing changes to src/libAMoRE/testUnary.h

  • Committer: buraq
  • Date: 2004-04-16 17:04:28 UTC
  • Revision ID: vcs-imports@canonical.com-20040416170428-ko6l3kyx1c5jyrll
initial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** \file
 
2
 *  \brief contains unary tests
 
3
 *  Copyright (c) ?    - 2000 Lehrstuhl fuer Informatik VII, RWTH Aachen
 
4
 *  Copyright (c) 2000 - 2002 Burak Emir
 
5
 *  This file is part of the libAMoRE library.
 
6
 *
 
7
 *  libAMoRE is  free software; you can redistribute it and/or
 
8
 *  modify it under the terms of the GNU Lesser General Public
 
9
 *  License as published by the Free Software Foundation; either
 
10
 *  version 2.1 of the License, or (at your option) any later version.
 
11
 *  You should have received a copy of the GNU Lesser General Public
 
12
 *  License along with the GNU C Library; if not, write to the Free
 
13
 *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
14
 *  02111-1307 USA.
 
15
 */
 
16
 
 
17
#ifndef _TESTUNA
 
18
#define _TESTUNA
 
19
 
 
20
#include "dfa.h"
 
21
#include "mon.h"
 
22
#include "language.h"
 
23
 
 
24
/** test whether indfa has dead states
 
25
 * @ingroup TEST_UNARY
 
26
 */
 
27
void deadsearch(dfa indfa,posint *deadpos, posint *deadneg, 
 
28
                boole *pos, boole *neg) ;
 
29
 
 
30
/** test whether language is in FOLU
 
31
 * @ingroup TEST_UNARY
 
32
 */
 
33
boole folutest(dfa indfa) ;
 
34
 
 
35
 
 
36
/** test whether lan is starfree.
 
37
 * @ingroup TEST_UNARY
 
38
 * a monoid M is aperiodic
 
39
 * <=> M is H-trivial
 
40
 * <=> M is groupfree (contains only trivial groups)
 
41
 *
 
42
 *     L is starfree
 
43
 * <=> the syntactical monoid of L is aperiodic
 
44
 */
 
45
boole sftest(monoid mon) ;
 
46
 
 
47
/** test membership of the syntactic semigroup in several +-Varieties
 
48
 * @ingroup TEST_UNARY
 
49
 *
 
50
 * L(S) is finite or cofinite   <=>  eS=Se=e for all idempotent e
 
51
 *         definite             <=>  Se  = e   for all idempotent e
 
52
 *         reverse definite     <=>  eS  = e   for all idempotent e
 
53
 *         generalized definite <=>  eSe = e   for all idempotent e
 
54
 *         local testable       <=>  eSe is idempotent and commutative
 
55
 *                                          for all idempotent e
 
56
 *
 
57
 *  nilpotent => definite,revdefinite,gendefinite,localtest
 
58
 *  definite or revdefinite => gendefinite => localtest
 
59
 *
 
60
 * if mon->mequals and mon->starfree then
 
61
 *   there is a letter whose transformation is the identity
 
62
 *   in this case L can`t be nilpotent,definite,revdefinite,gendefinite
 
63
 *
 
64
 * if stamon->mno==1 then L = A* or L = 0 
 
65
 */
 
66
void proptest(language lan,monoid mon) ;
 
67
 
 
68
/** test whether monoid is piecewise testable
 
69
 * @ingroup TEST_UNARY
 
70
 *
 
71
 * - Varieties
 
72
 *
 
73
 *      L is piecewiese testable
 
74
 *   <=>M(L) is D trivial (size of each dclass is 1)
 
75
 */
 
76
boole testpwt(monoid mon) ;
 
77
 
 
78
/** test whether monoid has dot depth <= 1
 
79
 * @ingroup TEST_UNARY
 
80
 * 
 
81
 *       + - V 
 
82
 *       L has dot depth <=1
 
83
 *  <=>
 
84
 *       for all idempotent elements e and id2
 
85
 *       and all elements i,j,k,l in S=S(L)
 
86
 *         (e*i*f*j)^g * e*i*f*l*e * (k*f*l*e)^g
 
87
 *       =
 
88
 *         (e*i*f*j)^g * e * (k*f*l*e)^g
 
89
 */
 
90
boole testdd1(monoid mon) ;
 
91
 
 
92
#endif