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