aGrUM 3.2.0
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
56
57#include <string_view>
58
59#ifndef GUM_PRM_O3PRM_ERRORS_H
60# define GUM_PRM_O3PRM_ERRORS_H
61
62# ifndef DOXYGEN_SHOULD_SKIP_THIS
63
64namespace gum {
65 namespace prm {
66 namespace o3prm {
67
68
69 void GUM_PUBLIC_PRM O3PRM_TYPE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
70
71 void GUM_PUBLIC_PRM O3PRM_TYPE_AMBIGUOUS(const O3Label& val,
72 const std::vector< std::string >& matches,
73 ErrorsContainer& errors);
74
75 void GUM_PUBLIC_PRM O3PRM_TYPE_RESERVED(const O3Label& val, ErrorsContainer& errors);
76
77 void GUM_PUBLIC_PRM O3PRM_TYPE_DUPPLICATE(const O3Label& val, ErrorsContainer& errors);
78
79 void GUM_PUBLIC_PRM O3PRM_TYPE_CYCLIC_INHERITANCE(const O3Label& sub_type,
80 const O3Label& super_type,
81 ErrorsContainer& errors);
82
83 void GUM_PUBLIC_PRM O3PRM_TYPE_UNKNOWN_LABEL(const O3Label& type,
84 const O3Label& l,
85 ErrorsContainer& errors);
86
87 void GUM_PUBLIC_PRM O3PRM_TYPE_INVALID_RANGE(const O3IntType& val, ErrorsContainer& errors);
88
89 void GUM_PUBLIC_PRM O3PRM_TYPE_INVALID_RANGE(const O3RealType& val, ErrorsContainer& errors);
90
91 void GUM_PUBLIC_PRM O3PRM_CLASS_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
92
93 void GUM_PUBLIC_PRM O3PRM_CLASS_AMBIGUOUS(const O3Label& val,
94 const std::vector< std::string >& matches,
95 ErrorsContainer& errors);
96
97 void GUM_PUBLIC_PRM O3PRM_CLASS_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
98
99 void GUM_PUBLIC_PRM O3PRM_CLASS_CYLIC_INHERITANCE(const O3Label& sub,
100 const O3Label& super,
101 ErrorsContainer& errors);
102
103 void GUM_PUBLIC_PRM O3PRM_CLASS_ATTR_IMPLEMENTATION(const O3Label& c,
104 const O3Label& i,
105 const O3Label& attr,
106 ErrorsContainer& errors);
107
108 void GUM_PUBLIC_PRM O3PRM_CLASS_AGG_IMPLEMENTATION(const O3Label& c,
109 const O3Label& i,
110 const O3Label& attr,
111 ErrorsContainer& errors);
112
113 void GUM_PUBLIC_PRM O3PRM_CLASS_REF_IMPLEMENTATION(const O3Label& c,
114 const O3Label& i,
115 const O3Label& ref,
116 ErrorsContainer& errors);
117
118 void GUM_PUBLIC_PRM O3PRM_CLASS_MISSING_ATTRIBUTES(const O3Label& c,
119 const O3Label& i,
120 ErrorsContainer& errors);
121
122 void GUM_PUBLIC_PRM O3PRM_CLASS_DUPLICATE_REFERENCE(const O3Label& ref,
123 ErrorsContainer& errors);
124
125 void GUM_PUBLIC_PRM O3PRM_CLASS_SELF_REFERENCE(const O3Label& c,
126 const O3Label& ref,
127 ErrorsContainer& errors);
128
129 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_SUB_REFERENCE(const O3Label& c,
130 const O3Label& sub,
131 ErrorsContainer& errors);
132
133 void GUM_PUBLIC_PRM O3PRM_CLASS_PARENT_NOT_FOUND(const O3Label& parent,
134 ErrorsContainer& errors);
135
136 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_PARENT(const O3Label& parent,
137 ErrorsContainer& errors);
138
139 void GUM_PUBLIC_PRM O3PRM_CLASS_LINK_NOT_FOUND(const O3Label& chain,
140 std::string_view s,
141 ErrorsContainer& errors);
142
143 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_CPT_SIZE(std::string_view c,
144 const O3Label& attr,
145 Size found,
146 Size expected,
147 ErrorsContainer& errors);
148
149 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_CPT_VALUE(std::string_view c,
150 const O3Label& attr,
151 const O3Formula& f,
152 ErrorsContainer& errors);
153
154 void GUM_PUBLIC_PRM O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1(std::string_view c,
155 const O3Label& attr,
156 float f,
157 ErrorsContainer& errors);
158
159 void GUM_PUBLIC_PRM O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1_WARNING(std::string_view c,
160 const O3Label& attr,
161 float f,
162 ErrorsContainer& errors);
163
164
165 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_RULE_SIZE(const O3RuleCPT::O3Rule& rule,
166 size_t found,
167 size_t expected,
168 ErrorsContainer& errors);
169
170 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_RULE_LABEL(const O3RuleCPT::O3Rule& rule,
171 const O3Label& label,
172 const O3Label& parent,
173 ErrorsContainer& errors);
174
175 void GUM_PUBLIC_PRM O3PRM_CLASS_WRONG_PARENT(const O3Label& prnt, ErrorsContainer& errors);
176
177 void GUM_PUBLIC_PRM O3PRM_CLASS_WRONG_PARENT_TYPE(const O3Label& prnt,
178 std::string_view expected,
179 std::string_view found,
180 ErrorsContainer& errors);
181
182 void GUM_PUBLIC_PRM O3PRM_CLASS_ILLEGAL_OVERLOAD(const O3Label& elt,
183 const O3Label& super,
184 ErrorsContainer& errors);
185
186 void GUM_PUBLIC_PRM O3PRM_CLASS_AGG_PARAMETERS(const O3Label& agg,
187 Size expected,
188 Size found,
189 ErrorsContainer& errors);
190
191 void GUM_PUBLIC_PRM O3PRM_CLASS_AGG_PARAMETER_NOT_FOUND(const O3Label& agg,
192 const O3Label& param,
193 ErrorsContainer& errors);
194
195 void GUM_PUBLIC_PRM O3PRM_INTERFACE_ILLEGAL_ARRAY(const O3Label& val,
196 ErrorsContainer& errors);
197
198 void GUM_PUBLIC_PRM O3PRM_INTERFACE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
199
200 void GUM_PUBLIC_PRM O3PRM_INTERFACE_AMBIGUOUS(const O3Label& val,
201 const std::vector< std::string >& matches,
202 ErrorsContainer& errors);
203
204 void GUM_PUBLIC_PRM O3PRM_INTERFACE_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
205
206 void GUM_PUBLIC_PRM O3PRM_INTERFACE_DUPLICATE_ELEMENT(const O3InterfaceElement& elt,
207 ErrorsContainer& errors);
208
209 void GUM_PUBLIC_PRM O3PRM_INTERFACE_CYCLIC_INHERITANCE(const O3Label& sub,
210 const O3Label& super,
211 ErrorsContainer& errors);
212
213 void GUM_PUBLIC_PRM O3PRM_INTERFACE_SELF_REFERENCE(const O3Interface& i,
214 const O3InterfaceElement& r,
215 ErrorsContainer& errors);
216
217 void GUM_PUBLIC_PRM O3PRM_INTERFACE_ILLEGAL_SUB_REFERENCE(const O3Interface& i,
218 const O3InterfaceElement& ref,
219 ErrorsContainer& errors);
220
221 void GUM_PUBLIC_PRM O3PRM_INTERFACE_ILLEGAL_OVERLOAD(const O3InterfaceElement& elt,
222 ErrorsContainer& errors);
223
224 void GUM_PUBLIC_PRM O3PRM_REFERENCE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
225
226 void GUM_PUBLIC_PRM O3PRM_REFERENCE_AMBIGUOUS(const O3Label& val,
227 const std::vector< std::string >& matches,
228 ErrorsContainer& errors);
229
230 void GUM_PUBLIC_PRM O3PRM_SYSTEM_INSTANTIATION_FAILED(const O3System& sys,
231 ErrorsContainer& errors);
232
233 void GUM_PUBLIC_PRM O3PRM_SYSTEM_NOT_A_CLASS(const O3Instance& i, ErrorsContainer& errors);
234
235 void GUM_PUBLIC_PRM O3PRM_SYSTEM_DUPLICATE_INSTANCE(const O3Instance& i,
236 ErrorsContainer& errors);
237
238 void GUM_PUBLIC_PRM O3PRM_SYSTEM_NOT_A_PARAMETER(const O3InstanceParameter& param,
239 ErrorsContainer& errors);
240
241 void GUM_PUBLIC_PRM O3PRM_SYSTEM_PARAMETER_NOT_FOUND(const O3InstanceParameter& param,
242 ErrorsContainer& errors);
243
244 void GUM_PUBLIC_PRM O3PRM_SYSTEM_PARAMETER_NOT_INT(const O3InstanceParameter& param,
245 ErrorsContainer& errors);
246
247 void GUM_PUBLIC_PRM O3PRM_SYSTEM_PARAMETER_NOT_FLOAT(const O3InstanceParameter& param,
248 ErrorsContainer& errors);
249
250 void GUM_PUBLIC_PRM O3PRM_SYSTEM_INVALID_LEFT_VALUE(const O3Label& val,
251 ErrorsContainer& errors);
252
253 void GUM_PUBLIC_PRM O3PRM_SYSTEM_INSTANCE_NOT_FOUND(const O3Label& i,
254 ErrorsContainer& errors);
255
256 void GUM_PUBLIC_PRM O3PRM_SYSTEM_REFERENCE_NOT_FOUND(const O3Label& ref,
257 std::string_view type,
258 ErrorsContainer& errors);
259
260 void GUM_PUBLIC_PRM O3PRM_SYSTEM_NOT_AN_ARRAY(const O3Label& val, ErrorsContainer& errors);
261
262 void GUM_PUBLIC_PRM O3PRM_DEPRECATED_TYPE_WARNING(const O3Label& type,
263 ErrorsContainer& errors);
264
265 } // namespace o3prm
266 } // namespace prm
267} // namespace gum
268
269# endif // DOXYGEN_SHOULD_SKIP_THIS
270
271#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.
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