aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
errors.h
Go to the documentation of this file.
1/****************************************************************************
2 * This file is part of the aGrUM/pyAgrum library. *
3 * *
4 * Copyright (c) 2005-2026 by *
5 * - Pierre-Henri WUILLEMIN(_at_LIP6) *
6 * - Christophe GONZALES(_at_AMU) *
7 * *
8 * The aGrUM/pyAgrum library is free software; you can redistribute it *
9 * and/or modify it under the terms of either : *
10 * *
11 * - the GNU Lesser General Public License as published by *
12 * the Free Software Foundation, either version 3 of the License, *
13 * or (at your option) any later version, *
14 * - the MIT license (MIT), *
15 * - or both in dual license, as here. *
16 * *
17 * (see https://agrum.gitlab.io/articles/dual-licenses-lgplv3mit.html) *
18 * *
19 * This aGrUM/pyAgrum library is distributed in the hope that it will be *
20 * useful, but WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
21 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
26 * OTHER DEALINGS IN THE SOFTWARE. *
27 * *
28 * See LICENCES for more details. *
29 * *
30 * SPDX-FileCopyrightText: Copyright 2005-2026 *
31 * - Pierre-Henri WUILLEMIN(_at_LIP6) *
32 * - Christophe GONZALES(_at_AMU) *
33 * SPDX-License-Identifier: LGPL-3.0-or-later OR MIT *
34 * *
35 * Contact : info_at_agrum_dot_org *
36 * homepage : http://agrum.gitlab.io *
37 * gitlab : https://gitlab.com/agrumery/agrum *
38 * *
39 ****************************************************************************/
40
41
49
50#include <sstream>
51#include <string>
52#include <vector>
53
57
58#include <string_view>
59
60#ifndef GUM_PRM_O3PRM_ERRORS_H
61# define GUM_PRM_O3PRM_ERRORS_H
62
63# ifndef DOXYGEN_SHOULD_SKIP_THIS
64
65namespace gum {
66 namespace prm {
67 namespace o3prm {
68
69
70 void GUM_PUBLIC_PRM O3PRM_TYPE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
71
72 void GUM_PUBLIC_PRM O3PRM_TYPE_AMBIGUOUS(const O3Label& val,
73 const std::vector< std::string >& matches,
74 ErrorsContainer& errors);
75
76 void GUM_PUBLIC_PRM O3PRM_TYPE_RESERVED(const O3Label& val, ErrorsContainer& errors);
77
78 void GUM_PUBLIC_PRM O3PRM_TYPE_DUPPLICATE(const O3Label& val, ErrorsContainer& errors);
79
80 void GUM_PUBLIC_PRM O3PRM_TYPE_CYCLIC_INHERITANCE(const O3Label& sub_type,
81 const O3Label& super_type,
82 ErrorsContainer& errors);
83
84 void GUM_PUBLIC_PRM O3PRM_TYPE_UNKNOWN_LABEL(const O3Label& type,
85 const O3Label& l,
86 ErrorsContainer& errors);
87
88 void GUM_PUBLIC_PRM O3PRM_TYPE_INVALID_RANGE(const O3IntType& val, ErrorsContainer& errors);
89
90 void GUM_PUBLIC_PRM O3PRM_TYPE_INVALID_RANGE(const O3RealType& val, ErrorsContainer& errors);
91
92 void GUM_PUBLIC_PRM O3PRM_CLASS_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
93
94 void GUM_PUBLIC_PRM O3PRM_CLASS_AMBIGUOUS(const O3Label& val,
95 const std::vector< std::string >& matches,
96 ErrorsContainer& errors);
97
98 void GUM_PUBLIC_PRM O3PRM_CLASS_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
99
100 void GUM_PUBLIC_PRM O3PRM_CLASS_CYLIC_INHERITANCE(const O3Label& sub,
101 const O3Label& super,
102 ErrorsContainer& errors);
103
104 void GUM_PUBLIC_PRM O3PRM_CLASS_ATTR_IMPLEMENTATION(const O3Label& c,
105 const O3Label& i,
106 const O3Label& attr,
107 ErrorsContainer& errors);
108
109 void GUM_PUBLIC_PRM O3PRM_CLASS_AGG_IMPLEMENTATION(const O3Label& c,
110 const O3Label& i,
111 const O3Label& attr,
112 ErrorsContainer& errors);
113
114 void GUM_PUBLIC_PRM O3PRM_CLASS_REF_IMPLEMENTATION(const O3Label& c,
115 const O3Label& i,
116 const O3Label& ref,
117 ErrorsContainer& errors);
118
119 void GUM_PUBLIC_PRM O3PRM_CLASS_MISSING_ATTRIBUTES(const O3Label& c,
120 const O3Label& i,
121 ErrorsContainer& errors);
122
123 void GUM_PUBLIC_PRM O3PRM_CLASS_DUPLICATE_REFERENCE(const O3Label& ref,
124 ErrorsContainer& errors);
125
126 void GUM_PUBLIC_PRM O3PRM_CLASS_SELF_REFERENCE(const O3Label& c,
127 const O3Label& ref,
128 ErrorsContainer& errors);
129
130 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_SUB_REFERENCE(const O3Label& c,
131 const O3Label& sub,
132 ErrorsContainer& errors);
133
134 void GUM_PUBLIC_PRM O3PRM_CLASS_PARENT_NOT_FOUND(const O3Label& parent,
135 ErrorsContainer& errors);
136
137 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_PARENT(const O3Label& parent,
138 ErrorsContainer& errors);
139
140 void GUM_PUBLIC_PRM O3PRM_CLASS_LINK_NOT_FOUND(const O3Label& chain,
141 std::string_view s,
142 ErrorsContainer& errors);
143
144 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_CPT_SIZE(std::string_view c,
145 const O3Label& attr,
146 Size found,
147 Size expected,
148 ErrorsContainer& errors);
149
150 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_CPT_VALUE(std::string_view c,
151 const O3Label& attr,
152 const O3Formula& f,
153 ErrorsContainer& errors);
154
155 void GUM_PUBLIC_PRM O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1(std::string_view c,
156 const O3Label& attr,
157 float f,
158 ErrorsContainer& errors);
159
160 void GUM_PUBLIC_PRM O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1_WARNING(std::string_view c,
161 const O3Label& attr,
162 float f,
163 ErrorsContainer& errors);
164
165
166 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_RULE_SIZE(const O3RuleCPT::O3Rule& rule,
167 size_t found,
168 size_t expected,
169 ErrorsContainer& errors);
170
171 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_RULE_LABEL(const O3RuleCPT::O3Rule& rule,
172 const O3Label& label,
173 const O3Label& parent,
174 ErrorsContainer& errors);
175
176 void GUM_PUBLIC_PRM O3PRM_CLASS_WRONG_PARENT(const O3Label& prnt, ErrorsContainer& errors);
177
178 void GUM_PUBLIC_PRM O3PRM_CLASS_WRONG_PARENT_TYPE(const O3Label& prnt,
179 std::string_view expected,
180 std::string_view found,
181 ErrorsContainer& errors);
182
183 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_OVERLOAD(const O3Label& elt,
184 const O3Label& super,
185 ErrorsContainer& errors);
186
187 void GUM_PUBLIC_PRM O3PRM_CLASS_AGG_PARAMETERS(const O3Label& agg,
188 Size expected,
189 Size found,
190 ErrorsContainer& errors);
191
192 void GUM_PUBLIC_PRM O3PRM_CLASS_AGG_PARAMETER_NOT_FOUND(const O3Label& agg,
193 const O3Label& param,
194 ErrorsContainer& errors);
195
196 void GUM_PUBLIC_PRM O3PRM_INTERFACE_ILLEGAL_ARRAY(const O3Label& val,
197 ErrorsContainer& errors);
198
199 void GUM_PUBLIC_PRM O3PRM_INTERFACE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
200
201 void GUM_PUBLIC_PRM O3PRM_INTERFACE_AMBIGUOUS(const O3Label& val,
202 const std::vector< std::string >& matches,
203 ErrorsContainer& errors);
204
205 void GUM_PUBLIC_PRM O3PRM_INTERFACE_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
206
207 void GUM_PUBLIC_PRM O3PRM_INTERFACE_DUPLICATE_ELEMENT(const O3InterfaceElement& elt,
208 ErrorsContainer& errors);
209
210 void GUM_PUBLIC_PRM O3PRM_INTERFACE_CYCLIC_INHERITANCE(const O3Label& sub,
211 const O3Label& super,
212 ErrorsContainer& errors);
213
214 void GUM_PUBLIC_PRM O3PRM_INTERFACE_SELF_REFERENCE(const O3Interface& i,
215 const O3InterfaceElement& r,
216 ErrorsContainer& errors);
217
218 void GUM_PUBLIC_PRM O3PRM_INTERFACE_ILLEGAL_SUB_REFERENCE(const O3Interface& i,
219 const O3InterfaceElement& ref,
220 ErrorsContainer& errors);
221
222 void GUM_PUBLIC_PRM O3PRM_INTERFACE_ILLEGAL_OVERLOAD(const O3InterfaceElement& elt,
223 ErrorsContainer& errors);
224
225 void GUM_PUBLIC_PRM O3PRM_REFERENCE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
226
227 void GUM_PUBLIC_PRM O3PRM_REFERENCE_AMBIGUOUS(const O3Label& val,
228 const std::vector< std::string >& matches,
229 ErrorsContainer& errors);
230
233 std::string GUM_PUBLIC_PRM O3PRM_EXCEPTION_MESSAGE(const Exception& e);
234
236 void GUM_PUBLIC_PRM O3PRM_SYSTEM_INSTANTIATION_FAILED(const O3System& sys,
237 std::string_view reason,
238 ErrorsContainer& errors);
239
240 void GUM_PUBLIC_PRM O3PRM_SYSTEM_NOT_A_CLASS(const O3Instance& i, ErrorsContainer& errors);
241
242 void GUM_PUBLIC_PRM O3PRM_SYSTEM_DUPLICATE_INSTANCE(const O3Instance& i,
243 ErrorsContainer& errors);
244
245 void GUM_PUBLIC_PRM O3PRM_SYSTEM_NOT_A_PARAMETER(const O3InstanceParameter& param,
246 ErrorsContainer& errors);
247
248 void GUM_PUBLIC_PRM O3PRM_SYSTEM_PARAMETER_NOT_FOUND(const O3InstanceParameter& param,
249 ErrorsContainer& errors);
250
251 void GUM_PUBLIC_PRM O3PRM_SYSTEM_PARAMETER_NOT_INT(const O3InstanceParameter& param,
252 ErrorsContainer& errors);
253
254 void GUM_PUBLIC_PRM O3PRM_SYSTEM_PARAMETER_NOT_FLOAT(const O3InstanceParameter& param,
255 ErrorsContainer& errors);
256
257 void GUM_PUBLIC_PRM O3PRM_SYSTEM_INVALID_LEFT_VALUE(const O3Label& val,
258 ErrorsContainer& errors);
259
260 void GUM_PUBLIC_PRM O3PRM_SYSTEM_INSTANCE_NOT_FOUND(const O3Label& i,
261 ErrorsContainer& errors);
262
263 void GUM_PUBLIC_PRM O3PRM_SYSTEM_REFERENCE_NOT_FOUND(const O3Label& ref,
264 std::string_view type,
265 ErrorsContainer& errors);
266
267 void GUM_PUBLIC_PRM O3PRM_SYSTEM_NOT_AN_ARRAY(const O3Label& val, ErrorsContainer& errors);
268
269 void GUM_PUBLIC_PRM O3PRM_DEPRECATED_TYPE_WARNING(const O3Label& type,
270 ErrorsContainer& errors);
271
272 } // namespace o3prm
273 } // namespace prm
274} // namespace gum
275
276# endif // DOXYGEN_SHOULD_SKIP_THIS
277
278#endif // GUM_PRM_O3PRM_ERRORS_H
Headers for the AST of the O3PRM language.
The O3Formula is part of the AST of the O3PRM language.
Definition O3prm.h:107
The O3InstanceParameter is part of the AST of the O3PRM language.
Definition O3prm.h:781
The O3Instance is part of the AST of the O3PRM language.
Definition O3prm.h:813
The O3IntType is part of the AST of the O3PRM language.
Definition O3prm.h:268
The O3InterfaceElement is part of the AST of the O3PRM language.
Definition O3prm.h:344
The O3Interface is part of the AST of the O3PRM language.
Definition O3prm.h:377
The O3Label is part of the AST of the O3PRM language.
Definition O3prm.h:194
The O3RealType is part of the AST of the O3PRM language.
Definition O3prm.h:308
std::pair< O3LabelList, O3FormulaList > O3Rule
Definition O3prm.h:565
The O3System is part of the AST of the O3PRM language.
Definition O3prm.h:851
Errors container (at least) for parser.
aGrUM's exceptions
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition types.h:74
namespace for all probabilistic relational models entities
Definition agrum.h:68
gum is the global namespace for all aGrUM entities
Definition agrum.h:46