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