cfl_conflequiv.h
Go to the documentation of this file.
1 /* FAU Discrete Event Systems Library (libfaudes)
2 
3  Copyright (C) 2015 Michael Meyer and Thomnas Moor.
4  Copyright (C) 2021,2023 Yiheng Tang, Thomas Moor.
5  Exclusive copyright is granted to Klaus Schmidt
6 
7  This library 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 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
20 
21 #ifndef FAUDES_CONFLEQUIV_H
22 #define FAUDES_CONFLEQUIV_H
23 
24 #include "cfl_generator.h"
25 #include "cfl_basevector.h"
26 
27 namespace faudes {
28 
29 /**
30  * Test for conflicts
31  *
32  * A family of generators is non-blocking, if their parallel composition
33  * is non-blocking (all accessible states are co-accessible).
34  *
35  * This implementation applies a number of conflict equivalent
36  * simplifications before finally testing for conflicts in the
37  * parallel composition;
38  * This approach has been originally proposed by R. Malik and H. Flordal
39  * in "Compositional verification in supervisory
40  * control", SIAM Journal of Control and Optimization, 2009.
41  *
42  * The current implementation is based on Michael Meyer's
43  * BSc Thesis and repaired/optimized by Yiheng Tang
44  *
45  *
46  * @param rGenVec
47  * Vector of input generators
48  * @return res
49  * true if there are no conflicts
50  *
51  * @ingroup GeneratorFunctions
52  */
53 
54 extern FAUDES_API bool IsNonconflicting(const GeneratorVector& rGenVec);
55 extern FAUDES_API bool IsNonblocking(const GeneratorVector& rGvec);
56 
57 /**
58  * Conflict equivalent abstraction.
59  *
60  * Two generators are conflict equivalent w.r.t. a set of silent events,
61  * if, for any test generator defined over the not-silent events, either
62  * both or non are conflicting. This functions implements a selection of
63  * conflict equivalent transformations proposed by R. Malik and H. Flordal
64  * in "Compositional verification in supervisory control", SIAM Journal of
65  * Control and Optimization, 2009.
66  *
67  * The current implementation is experimental with code based on Michael Meyer's
68  * BSc Thesis.
69  *
70  * @param rGen
71  * Input generator
72  * @param rSilentEvents
73  * Set of silent events, i.e., events not shared
74  * with any other generator to compose with.
75  *
76  * @ingroup GeneratorFunctions
77  */
78 extern FAUDES_API void ConflictEquivalentAbstraction(vGenerator& rGen, EventSet& rSilentEvents);
79 
80 
81 
82 /**
83  * Remove all silent loops in a given automaton. This function is considered as an
84  * API not only for its general operational meaning, but most importantly due to the prerequisite for
85  * topological sort.
86  * @param rGen
87  * input generator
88  * @param silent
89  * silent alphabet, contains at most one event
90  */
91 extern FAUDES_API void RemoveTauLoops(Generator& rGen, const EventSet& silent);
92 
93 /**
94  * Remove outgoing transitions from blocking states.
95  * This is the certain conflicts rule proposed by R. Malik and H. Flordal in "Compositional
96  * verification in supervisory control", SIAM Journal of Control and Optimization, 2009.
97  *
98  * @param rGen
99  * input/output generator
100  */
101 extern FAUDES_API void RemoveNonCoaccessibleOut(vGenerator& rGen);
102 
103 
104 
105 } // namespace
106 #endif // FAUDES_CONFLEQUIV_H
Class TBaseVector.
#define FAUDES_API
Definition: cfl_platform.h:80
NameSet EventSet
Definition: cfl_nameset.h:533
vGenerator Generator
TBaseVector< Generator > GeneratorVector
void ConflictEquivalentAbstraction(vGenerator &rGen, EventSet &rSilentEvents)
bool IsNonconflicting(const GeneratorVector &rGvec)
void RemoveNonCoaccessibleOut(Generator &g)
bool IsNonblocking(const GeneratorVector &rGvec)
void RemoveTauLoops(Generator &rGen, const EventSet &silent)

libFAUDES 2.33c --- 2025.05.15 --- c++ api documentaion by doxygen