Generated on for Gecode by doxygen 1.17.0
arithmetic.cpp
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Christian Schulte <schulte@gecode.dev>
5 *
6 * Copyright:
7 * Christian Schulte, 2002
8 *
9 * This file is part of Gecode, the generic constraint
10 * development environment:
11 * http://www.gecode.dev
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining
14 * a copy of this software and associated documentation files (the
15 * "Software"), to deal in the Software without restriction, including
16 * without limitation the rights to use, copy, modify, merge, publish,
17 * distribute, sublicense, and/or sell copies of the Software, and to
18 * permit persons to whom the Software is furnished to do so, subject to
19 * the following conditions:
20 *
21 * The above copyright notice and this permission notice shall be
22 * included in all copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 *
32 */
33
35
36namespace Gecode {
37
38 void
39 abs(Home home, IntVar x0, IntVar x1, IntPropLevel ipl) {
40 using namespace Int;
42 if (vbd(ipl) == IPL_DOM) {
44 } else {
46 }
47 }
48
49
50 void
51 max(Home home, IntVar x0, IntVar x1, IntVar x2,
52 IntPropLevel ipl) {
53 using namespace Int;
55 if (vbd(ipl) == IPL_DOM) {
57 } else {
59 }
60 }
61
62 void
63 max(Home home, const IntVarArgs& x, IntVar y,
64 IntPropLevel ipl) {
65 using namespace Int;
66 if (x.size() == 0)
67 throw TooFewArguments("Int::max");
69 ViewArray<IntView> xv(home,x);
70 if (vbd(ipl) == IPL_DOM) {
72 } else {
74 }
75 }
76
77 void
78 min(Home home, IntVar x0, IntVar x1, IntVar x2,
79 IntPropLevel ipl) {
80 using namespace Int;
82 MinusView m0(x0); MinusView m1(x1); MinusView m2(x2);
83 if (vbd(ipl) == IPL_DOM) {
85 } else {
87 }
88 }
89
90 void
91 min(Home home, const IntVarArgs& x, IntVar y,
92 IntPropLevel ipl) {
93 using namespace Int;
94 if (x.size() == 0)
95 throw TooFewArguments("Int::min");
97 ViewArray<MinusView> m(home,x.size());
98 for (int i=0; i<x.size(); i++)
99 m[i] = MinusView(x[i]);
100 MinusView my(y);
101 if (vbd(ipl) == IPL_DOM) {
103 } else {
105 }
106 }
107
108
109 void
110 argmax(Home home, const IntVarArgs& x, IntVar y, bool tiebreak,
111 IntPropLevel) {
112 using namespace Int;
113 if (x.size() == 0)
114 throw TooFewArguments("Int::argmax");
115 if (same(x,y))
116 throw ArgumentSame("Int::argmax");
118 // Constrain y properly
119 IntView yv(y);
120 GECODE_ME_FAIL(yv.gq(home,0));
121 GECODE_ME_FAIL(yv.le(home,x.size()));
122 // Construct index view array
123 IdxViewArray<IntView> ix(home,x.size());
124 for (int i=0; i<x.size(); i++) {
125 ix[i].idx=i; ix[i].view=x[i];
126 }
127 if (tiebreak)
129 ::post(home,ix,yv)));
130 else
132 ::post(home,ix,yv)));
133 }
134
135 void
136 argmax(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak,
137 IntPropLevel) {
138 using namespace Int;
139 Limits::nonnegative(o,"Int::argmax");
140 if (x.size() == 0)
141 throw TooFewArguments("Int::argmax");
142 if (same(x,y))
143 throw ArgumentSame("Int::argmax");
145 // Constrain y properly
146 OffsetView yv(y,-o);
147 GECODE_ME_FAIL(yv.gq(home,0));
148 GECODE_ME_FAIL(yv.le(home,x.size()));
149 // Construct index view array
150 IdxViewArray<IntView> ix(home,x.size());
151 for (int i=0; i<x.size(); i++) {
152 ix[i].idx=i; ix[i].view=x[i];
153 }
154 if (tiebreak)
156 ::post(home,ix,yv)));
157 else
159 ::post(home,ix,yv)));
160 }
161
162 void
163 argmin(Home home, const IntVarArgs& x, IntVar y, bool tiebreak,
164 IntPropLevel) {
165 using namespace Int;
166 if (x.size() == 0)
167 throw TooFewArguments("Int::argmin");
168 if (same(x,y))
169 throw ArgumentSame("Int::argmin");
171 // Constrain y properly
172 IntView yv(y);
173 GECODE_ME_FAIL(yv.gq(home,0));
174 GECODE_ME_FAIL(yv.le(home,x.size()));
175 // Construct index view array
176 IdxViewArray<MinusView> ix(home,x.size());
177 for (int i=0; i<x.size(); i++) {
178 ix[i].idx=i; ix[i].view=MinusView(x[i]);
179 }
180 if (tiebreak)
182 ::post(home,ix,yv)));
183 else
185 ::post(home,ix,yv)));
186 }
187
188 void
189 argmin(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak,
190 IntPropLevel) {
191 using namespace Int;
192 Limits::nonnegative(o,"Int::argmin");
193 if (x.size() == 0)
194 throw TooFewArguments("Int::argmin");
195 if (same(x,y))
196 throw ArgumentSame("Int::argmin");
198 // Constrain y properly
199 OffsetView yv(y,-o);
200 GECODE_ME_FAIL(yv.gq(home,0));
201 GECODE_ME_FAIL(yv.le(home,x.size()));
202 // Construct index view array
203 IdxViewArray<MinusView> ix(home,x.size());
204 for (int i=0; i<x.size(); i++) {
205 ix[i].idx=i; ix[i].view=MinusView(x[i]);
206 }
207 if (tiebreak)
209 ::post(home,ix,yv)));
210 else
212 ::post(home,ix,yv)));
213 }
214
215 void
216 argmax(Home home, const BoolVarArgs& x, IntVar y, bool tiebreak,
217 IntPropLevel) {
218 using namespace Int;
219 if (x.size() == 0)
220 throw TooFewArguments("Int::argmax");
222 // Constrain y properly
223 IntView yv(y);
224 GECODE_ME_FAIL(yv.gq(home,0));
225 GECODE_ME_FAIL(yv.le(home,x.size()));
226 // Construct index view array
227 IdxViewArray<BoolView> ix(home,x.size());
228 for (int i=x.size(); i--; ) {
229 ix[i].idx=i; ix[i].view=x[i];
230 }
231 if (tiebreak)
233 ::post(home,ix,yv)));
234 else
236 ::post(home,ix,yv)));
237 }
238
239 void
240 argmax(Home home, const BoolVarArgs& x, int o, IntVar y, bool tiebreak,
241 IntPropLevel) {
242 using namespace Int;
243 Limits::nonnegative(o,"Int::argmax");
244 if (x.size() == 0)
245 throw TooFewArguments("Int::argmax");
247 // Constrain y properly
248 OffsetView yv(y,-o);
249 GECODE_ME_FAIL(yv.gq(home,0));
250 GECODE_ME_FAIL(yv.le(home,x.size()));
251 // Construct index view array
252 IdxViewArray<BoolView> ix(home,x.size());
253 for (int i=x.size(); i--; ) {
254 ix[i].idx=i; ix[i].view=x[i];
255 }
256 if (tiebreak)
258 ::post(home,ix,yv)));
259 else
261 ::post(home,ix,yv)));
262 }
263
264 void
265 argmin(Home home, const BoolVarArgs& x, IntVar y, bool tiebreak,
266 IntPropLevel) {
267 using namespace Int;
268 if (x.size() == 0)
269 throw TooFewArguments("Int::argmin");
271 // Constrain y properly
272 IntView yv(y);
273 GECODE_ME_FAIL(yv.gq(home,0));
274 GECODE_ME_FAIL(yv.le(home,x.size()));
275 // Construct index view array
276 IdxViewArray<NegBoolView> ix(home,x.size());
277 for (int i=x.size(); i--; ) {
278 ix[i].idx=i; ix[i].view=NegBoolView(x[i]);
279 }
280 if (tiebreak)
282 ::post(home,ix,yv)));
283 else
285 ::post(home,ix,yv)));
286 }
287
288 void
289 argmin(Home home, const BoolVarArgs& x, int o, IntVar y, bool tiebreak,
290 IntPropLevel) {
291 using namespace Int;
292 Limits::nonnegative(o,"Int::argmin");
293 if (x.size() == 0)
294 throw TooFewArguments("Int::argmin");
296 // Constrain y properly
297 OffsetView yv(y,-o);
298 GECODE_ME_FAIL(yv.gq(home,0));
299 GECODE_ME_FAIL(yv.le(home,x.size()));
300 // Construct index view array
301 IdxViewArray<NegBoolView> ix(home,x.size());
302 for (int i=x.size(); i--; ) {
303 ix[i].idx=i; ix[i].view=NegBoolView(x[i]);
304 }
305 if (tiebreak)
307 ::post(home,ix,yv)));
308 else
310 ::post(home,ix,yv)));
311 }
312
313 void
314 mult(Home home, IntVar x0, IntVar x1, IntVar x2,
315 IntPropLevel ipl) {
316 using namespace Int;
318 if (vbd(ipl) == IPL_DOM) {
320 } else {
322 }
323 }
324
325 void
327 using namespace Int;
330 }
331
332 void
333 gcd(Home home, IntVar x0, IntVar x1, IntVar x2, Reify r,
334 IntPropLevel) {
335 using namespace Int;
337 switch (r.mode()) {
338 case RM_EQV:
340 ::post(home,x0,x1,x2,r.var())));
341 break;
342 case RM_IMP:
344 ::post(home,x0,x1,x2,r.var())));
345 break;
346 case RM_PMI:
348 ::post(home,x0,x1,x2,r.var())));
349 break;
350 default: GECODE_NEVER;
351 }
352 }
353
354 void
355 divides(Home home, IntVar divisor, IntVar dividend, Reify r,
356 IntPropLevel) {
357 using namespace Int;
359 switch (r.mode()) {
360 case RM_EQV:
362 ::post(home,divisor,dividend,r.var())));
363 break;
364 case RM_IMP:
366 ::post(home,divisor,dividend,r.var())));
367 break;
368 case RM_PMI:
370 ::post(home,divisor,dividend,r.var())));
371 break;
372 default: GECODE_NEVER;
373 }
374 }
375
376 void
378 using namespace Int;
380 ViewArray<IntView> xv(home,x);
382 }
383
384 void
385 product(Home home, const IntVarArgs& x, IntVar y, Reify r,
386 IntPropLevel) {
387 using namespace Int;
389 ViewArray<IntView> xv(home,x);
390 switch (r.mode()) {
391 case RM_EQV:
393 ::post(home,xv,y,r.var())));
394 break;
395 case RM_IMP:
397 ::post(home,xv,y,r.var())));
398 break;
399 case RM_PMI:
401 ::post(home,xv,y,r.var())));
402 break;
403 default: GECODE_NEVER;
404 }
405 }
406
407 void
408 product_mod(Home home, const IntVarArgs& x, int m, IntVar y,
409 IntPropLevel) {
410 using namespace Int;
411 Limits::positive(m,"Int::product_mod");
413 IntView yv(y);
414 ViewArray<IntView> xv(home,x);
416 }
417
418 void
419 product_mod(Home home, const IntVarArgs& x, int m, IntVar y, Reify r,
420 IntPropLevel) {
421 using namespace Int;
422 Limits::positive(m,"Int::product_mod");
424 IntView yv(y);
425 ViewArray<IntView> xv(home,x);
426 switch (r.mode()) {
427 case RM_EQV:
429 ::post(home,xv,m,yv,r.var())));
430 break;
431 case RM_IMP:
433 ::post(home,xv,m,yv,r.var())));
434 break;
435 case RM_PMI:
437 ::post(home,xv,m,yv,r.var())));
438 break;
439 default: GECODE_NEVER;
440 }
441 }
442
443 void
445 IntPropLevel) {
446 using namespace Int;
448 ViewArray<IntView> xv(home,x);
450 }
451
452 void
453 product_mod(Home home, const IntVarArgs& x, IntVar m, IntVar y, Reify r,
454 IntPropLevel) {
455 using namespace Int;
457 ViewArray<IntView> xv(home,x);
458 switch (r.mode()) {
459 case RM_EQV:
461 ::post(home,xv,m,y,r.var())));
462 break;
463 case RM_IMP:
465 ::post(home,xv,m,y,r.var())));
466 break;
467 case RM_PMI:
469 ::post(home,xv,m,y,r.var())));
470 break;
471 default: GECODE_NEVER;
472 }
473 }
474
475
476 void
477 divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
478 IntPropLevel) {
479 using namespace Int;
480 IntVarArgs allvars = {x0, x1, x2, x3};
481 if (same(allvars))
482 throw ArgumentSame("Int::divmod");
484
488 t[0].a = 1; t[0].x = prod;
489 t[1].a = 1; t[1].x = x3;
490 int min, max;
491 Linear::estimate(t,2,0,min,max);
492 IntView x0v(x0);
493 GECODE_ME_FAIL(x0v.gq(home,min));
494 GECODE_ME_FAIL(x0v.lq(home,max));
495 t[2].a=-1; t[2].x=x0;
496 Linear::post(home,t,3,IRT_EQ,0,IPL_BND);
497 if (home.failed()) return;
498 IntView x1v(x1);
500 Arithmetic::DivMod<IntView>::post(home,x0,x1,x3));
501 }
502
503 void
504 div(Home home, IntVar x0, IntVar x1, IntVar x2,
505 IntPropLevel) {
506 using namespace Int;
509 (Arithmetic::DivBnd<IntView>::post(home,x0,x1,x2)));
510 }
511
512 void
513 mod(Home home, IntVar x0, IntVar x1, IntVar x2,
514 IntPropLevel ipl) {
515 using namespace Int;
518 divmod(home, x0, x1, _div, x2, ipl);
519 }
520
521 void
522 sqr(Home home, IntVar x0, IntVar x1, IntPropLevel ipl) {
523 using namespace Int;
526 if (vbd(ipl) == IPL_DOM) {
528 ::post(home,x0,x1,ops));
529 } else {
531 ::post(home,x0,x1,ops));
532 }
533 }
534
535 void
536 sqrt(Home home, IntVar x0, IntVar x1, IntPropLevel ipl) {
537 using namespace Int;
540 if (vbd(ipl) == IPL_DOM) {
542 ::post(home,x0,x1,ops));
543 } else {
545 ::post(home,x0,x1,ops));
546 }
547 }
548
549 void
550 pow(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl) {
551 using namespace Int;
552 Limits::nonnegative(n,"Int::pow");
554 if (n == 2) {
555 sqr(home, x0, x1, ipl);
556 return;
557 }
558 Arithmetic::PowOps ops(n);
559 if (vbd(ipl) == IPL_DOM) {
561 ::post(home,x0,x1,ops));
562 } else {
564 ::post(home,x0,x1,ops));
565 }
566 }
567
568 void
569 nroot(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl) {
570 using namespace Int;
571 Limits::positive(n,"Int::nroot");
573 if (n == 2) {
574 sqrt(home, x0, x1, ipl);
575 return;
576 }
577 Arithmetic::PowOps ops(n);
578 if (vbd(ipl) == IPL_DOM) {
580 ::post(home,x0,x1,ops));
581 } else {
583 ::post(home,x0,x1,ops));
584 }
585 }
586
587 void
595
596 void
603
604}
605
606// STATISTICS: int-post
int size(void) const
Return size of array (number of elements).
Definition array.hpp:1606
Passing Boolean variables.
Definition int.hh:739
Home class for posting propagators
Definition core.hpp:863
bool failed(void) const
Check whether corresponding space is failed.
Definition core.hpp:4293
Passing integer variables.
Definition int.hh:681
Integer variables.
Definition int.hh:390
Exception: Arguments contain same variable multiply
Definition exception.hpp:80
static ExecStatus post(Home home, View x0, View x1)
Post bounds consistent propagator .
Definition abs.hpp:93
static ExecStatus post(Home home, View x0, View x1)
Post domain consistent propagator .
Definition abs.hpp:148
Argument maximum propagator.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator (rounding towards 0).
Definition divmod.hpp:235
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition divmod.hpp:280
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator.
Definition gcd.hpp:208
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition max.hpp:80
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition max.hpp:242
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
Definition mult.cpp:144
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
Definition mult.cpp:311
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Definition max.hpp:134
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Definition max.hpp:318
Bounds consistent n-th root propagator.
Domain consistent n-th root propagator.
static void post(Home home, OpenViewList< View > list, View result, IntPropLevel ipl)
Definition open.hpp:177
Bounds consistent power propagator.
Domain consistent power propagator.
Operations for power and nroot propagators.
static ExecStatus post(Home home, ViewArray< IntView > &x, IntView m, IntView y)
Post propagator.
static ExecStatus post(Home home, ViewArray< IntView > &x, int m, IntView y)
Post propagator.
static ExecStatus post(Home home, ViewArray< IntView > &x, IntView y, bool neg=false)
Post propagator.
Definition product.hpp:290
Reified bounds propagator for divisibility.
Reified bounds propagator for .
Reified bounds propagator for a variable-modulus product.
Reified bounds propagator for a fixed-modulus n-ary product.
Reified bounds propagator for an exact n-ary product.
Operations for square and square-root propagators.
An array of IdxView pairs.
Definition idx-view.hh:67
Integer view for integer variables.
Definition view.hpp:129
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition int.hpp:121
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition int.hpp:130
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition int.hpp:139
Class for describing linear term .
Definition linear.hh:1336
int a
Coefficient.
Definition linear.hh:1339
Minus integer view.
Definition view.hpp:282
Negated Boolean view.
Definition view.hpp:1572
Offset integer view.
Definition view.hpp:443
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition offset.hpp:145
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition offset.hpp:136
Exception: Too few arguments available in argument array
Definition exception.hpp:66
Open list of integer variables.
Definition int.hh:1076
View interface to a space-local list with an open length.
Definition int.hh:1044
Reification specification.
Definition int.hh:1176
View arrays.
Definition array.hpp:255
void post(Home home, Term< IntView > *t, int n, IntRelType irt, int c, IntPropLevel ipl=IPL_DEF)
Post propagator for linear constraint over integers.
Definition int-post.cpp:219
#define GECODE_POST
Check for failure in a constraint post function.
Definition macros.hpp:40
#define GECODE_ES_FAIL(es)
Check whether execution status es is failed, and fail space home.
Definition macros.hpp:103
#define GECODE_ME_FAIL(me)
Check whether modification event me is failed, and fail space home.
Definition macros.hpp:77
void product(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl=IPL_DEF)
Constrain y to the exact product of the variables in x.
void product_mod(Home home, const IntVarArgs &x, int m, IntVar y, IntPropLevel ipl=IPL_DEF)
Constrain y to the product of x modulo m.
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:1274
@ IRT_EQ
Equality ( ).
Definition int.hh:1226
@ RM_IMP
Implication for reification.
Definition int.hh:1162
@ RM_PMI
Inverse implication for reification.
Definition int.hh:1169
@ RM_EQV
Equivalence for reification (default).
Definition int.hh:1155
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
Definition int.hh:1279
@ IPL_BND
Bounds propagation.
Definition int.hh:1278
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l.
Definition limits.hpp:57
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l.
Definition limits.hpp:68
const int min
Smallest allowed integer value.
Definition int.hh:123
const int max
Largest allowed integer value.
Definition int.hh:121
void estimate(Term< View > *t, int n, int c, int &l, int &u)
Estimate lower and upper bounds.
Definition post.hpp:41
Finite domain integers.
Definition lastval.hh:52
Gecode toplevel namespace
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
Definition tiebreak.hpp:80
void divides(Home home, IntVar divisor, IntVar dividend, Reify r, IntPropLevel ipl=IPL_DEF)
Reify whether divisor divides dividend.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Definition ipl.hpp:37
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
bool same(VarArgArray< Var > x, VarArgArray< Var > y)
Definition array.hpp:1936
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
Definition filter.cpp:138
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
void gcd(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
#define GECODE_NEVER
Assert that this command is never executed.
Definition macros.hpp:56