diff --git a/regression/smt2_solver/deep-nesting/deep-let.desc b/regression/smt2_solver/deep-nesting/deep-let.desc new file mode 100644 index 00000000000..fccd032565d --- /dev/null +++ b/regression/smt2_solver/deep-nesting/deep-let.desc @@ -0,0 +1,13 @@ +CORE +deep-let.smt2 + +^EXIT=0$ +^SIGNAL=0$ +^unsat$ +-- +^\(error +-- +Regression test for the iterative SMT2 parser. A deeply-nested chain of +`(let ((xN xN-1)) ...)` of depth 3500 parses and solves without overflowing +the default 8 MB C++ stack. The recursive parser that preceded this change +segfaults on the same input. diff --git a/regression/smt2_solver/deep-nesting/deep-let.smt2 b/regression/smt2_solver/deep-nesting/deep-let.smt2 new file mode 100644 index 00000000000..6804d472fb3 --- /dev/null +++ b/regression/smt2_solver/deep-nesting/deep-let.smt2 @@ -0,0 +1,3512 @@ +; Deeply-nested (let ((xN xN-1)) ...) of depth 3500. +; +; Regression test for the iterative SMT2 parser. +; A recursive parser hits the default 8 MB C++ stack around depth 2500-3000 +; on this input; the iterative parser handles the full depth without stack growth. +; The chain resolves to the constant 'true', so the assertion is unsat. +(set-logic QF_BV) +(define-fun f () Bool + (let ((x1 true)) + (let ((x2 x1)) + (let ((x3 x2)) + (let ((x4 x3)) + (let ((x5 x4)) + (let ((x6 x5)) + (let ((x7 x6)) + (let ((x8 x7)) + (let ((x9 x8)) + (let ((x10 x9)) + (let ((x11 x10)) + (let ((x12 x11)) + (let ((x13 x12)) + (let ((x14 x13)) + (let ((x15 x14)) + (let ((x16 x15)) + (let ((x17 x16)) + (let ((x18 x17)) + (let ((x19 x18)) + (let ((x20 x19)) + (let ((x21 x20)) + (let ((x22 x21)) + (let ((x23 x22)) + (let ((x24 x23)) + (let ((x25 x24)) + (let ((x26 x25)) + (let ((x27 x26)) + (let ((x28 x27)) + (let ((x29 x28)) + (let ((x30 x29)) + (let ((x31 x30)) + (let ((x32 x31)) + (let ((x33 x32)) + (let ((x34 x33)) + (let ((x35 x34)) + (let ((x36 x35)) + (let ((x37 x36)) + (let ((x38 x37)) + (let ((x39 x38)) + (let ((x40 x39)) + (let ((x41 x40)) + (let ((x42 x41)) + (let ((x43 x42)) + (let ((x44 x43)) + (let ((x45 x44)) + (let ((x46 x45)) + (let ((x47 x46)) + (let ((x48 x47)) + (let ((x49 x48)) + (let ((x50 x49)) + (let ((x51 x50)) + (let ((x52 x51)) + (let ((x53 x52)) + (let ((x54 x53)) + (let ((x55 x54)) + (let ((x56 x55)) + (let ((x57 x56)) + (let ((x58 x57)) + (let ((x59 x58)) + (let ((x60 x59)) + (let ((x61 x60)) + (let ((x62 x61)) + (let ((x63 x62)) + (let ((x64 x63)) + (let ((x65 x64)) + (let ((x66 x65)) + (let ((x67 x66)) + (let ((x68 x67)) + (let ((x69 x68)) + (let ((x70 x69)) + (let ((x71 x70)) + (let ((x72 x71)) + (let ((x73 x72)) + (let ((x74 x73)) + (let ((x75 x74)) + (let ((x76 x75)) + (let ((x77 x76)) + (let ((x78 x77)) + (let ((x79 x78)) + (let ((x80 x79)) + (let ((x81 x80)) + (let ((x82 x81)) + (let ((x83 x82)) + (let ((x84 x83)) + (let ((x85 x84)) + (let ((x86 x85)) + (let ((x87 x86)) + (let ((x88 x87)) + (let ((x89 x88)) + (let ((x90 x89)) + (let ((x91 x90)) + (let ((x92 x91)) + (let ((x93 x92)) + (let ((x94 x93)) + (let ((x95 x94)) + (let ((x96 x95)) + (let ((x97 x96)) + (let ((x98 x97)) + (let ((x99 x98)) + (let ((x100 x99)) + (let ((x101 x100)) + (let ((x102 x101)) + (let ((x103 x102)) + (let ((x104 x103)) + (let ((x105 x104)) + (let ((x106 x105)) + (let ((x107 x106)) + (let ((x108 x107)) + (let ((x109 x108)) + (let ((x110 x109)) + (let ((x111 x110)) + (let ((x112 x111)) + (let ((x113 x112)) + (let ((x114 x113)) + (let ((x115 x114)) + (let ((x116 x115)) + (let ((x117 x116)) + (let ((x118 x117)) + (let ((x119 x118)) + (let ((x120 x119)) + (let ((x121 x120)) + (let ((x122 x121)) + (let ((x123 x122)) + (let ((x124 x123)) + (let ((x125 x124)) + (let ((x126 x125)) + (let ((x127 x126)) + (let ((x128 x127)) + (let ((x129 x128)) + (let ((x130 x129)) + (let ((x131 x130)) + (let ((x132 x131)) + (let ((x133 x132)) + (let ((x134 x133)) + (let ((x135 x134)) + (let ((x136 x135)) + (let ((x137 x136)) + (let ((x138 x137)) + (let ((x139 x138)) + (let ((x140 x139)) + (let ((x141 x140)) + (let ((x142 x141)) + (let ((x143 x142)) + (let ((x144 x143)) + (let ((x145 x144)) + (let ((x146 x145)) + (let ((x147 x146)) + (let ((x148 x147)) + (let ((x149 x148)) + (let ((x150 x149)) + (let ((x151 x150)) + (let ((x152 x151)) + (let ((x153 x152)) + (let ((x154 x153)) + (let ((x155 x154)) + (let ((x156 x155)) + (let ((x157 x156)) + (let ((x158 x157)) + (let ((x159 x158)) + (let ((x160 x159)) + (let ((x161 x160)) + (let ((x162 x161)) + (let ((x163 x162)) + (let ((x164 x163)) + (let ((x165 x164)) + (let ((x166 x165)) + (let ((x167 x166)) + (let ((x168 x167)) + (let ((x169 x168)) + (let ((x170 x169)) + (let ((x171 x170)) + (let ((x172 x171)) + (let ((x173 x172)) + (let ((x174 x173)) + (let ((x175 x174)) + (let ((x176 x175)) + (let ((x177 x176)) + (let ((x178 x177)) + (let ((x179 x178)) + (let ((x180 x179)) + (let ((x181 x180)) + (let ((x182 x181)) + (let ((x183 x182)) + (let ((x184 x183)) + (let ((x185 x184)) + (let ((x186 x185)) + (let ((x187 x186)) + (let ((x188 x187)) + (let ((x189 x188)) + (let ((x190 x189)) + (let ((x191 x190)) + (let ((x192 x191)) + (let ((x193 x192)) + (let ((x194 x193)) + (let ((x195 x194)) + (let ((x196 x195)) + (let ((x197 x196)) + (let ((x198 x197)) + (let ((x199 x198)) + (let ((x200 x199)) + (let ((x201 x200)) + (let ((x202 x201)) + (let ((x203 x202)) + (let ((x204 x203)) + (let ((x205 x204)) + (let ((x206 x205)) + (let ((x207 x206)) + (let ((x208 x207)) + (let ((x209 x208)) + (let ((x210 x209)) + (let ((x211 x210)) + (let ((x212 x211)) + (let ((x213 x212)) + (let ((x214 x213)) + (let ((x215 x214)) + (let ((x216 x215)) + (let ((x217 x216)) + (let ((x218 x217)) + (let ((x219 x218)) + (let ((x220 x219)) + (let ((x221 x220)) + (let ((x222 x221)) + (let ((x223 x222)) + (let ((x224 x223)) + (let ((x225 x224)) + (let ((x226 x225)) + (let ((x227 x226)) + (let ((x228 x227)) + (let ((x229 x228)) + (let ((x230 x229)) + (let ((x231 x230)) + (let ((x232 x231)) + (let ((x233 x232)) + (let ((x234 x233)) + (let ((x235 x234)) + (let ((x236 x235)) + (let ((x237 x236)) + (let ((x238 x237)) + (let ((x239 x238)) + (let ((x240 x239)) + (let ((x241 x240)) + (let ((x242 x241)) + (let ((x243 x242)) + (let ((x244 x243)) + (let ((x245 x244)) + (let ((x246 x245)) + (let ((x247 x246)) + (let ((x248 x247)) + (let ((x249 x248)) + (let ((x250 x249)) + (let ((x251 x250)) + (let ((x252 x251)) + (let ((x253 x252)) + (let ((x254 x253)) + (let ((x255 x254)) + (let ((x256 x255)) + (let ((x257 x256)) + (let ((x258 x257)) + (let ((x259 x258)) + (let ((x260 x259)) + (let ((x261 x260)) + (let ((x262 x261)) + (let ((x263 x262)) + (let ((x264 x263)) + (let ((x265 x264)) + (let ((x266 x265)) + (let ((x267 x266)) + (let ((x268 x267)) + (let ((x269 x268)) + (let ((x270 x269)) + (let ((x271 x270)) + (let ((x272 x271)) + (let ((x273 x272)) + (let ((x274 x273)) + (let ((x275 x274)) + (let ((x276 x275)) + (let ((x277 x276)) + (let ((x278 x277)) + (let ((x279 x278)) + (let ((x280 x279)) + (let ((x281 x280)) + (let ((x282 x281)) + (let ((x283 x282)) + (let ((x284 x283)) + (let ((x285 x284)) + (let ((x286 x285)) + (let ((x287 x286)) + (let ((x288 x287)) + (let ((x289 x288)) + (let ((x290 x289)) + (let ((x291 x290)) + (let ((x292 x291)) + (let ((x293 x292)) + (let ((x294 x293)) + (let ((x295 x294)) + (let ((x296 x295)) + (let ((x297 x296)) + (let ((x298 x297)) + (let ((x299 x298)) + (let ((x300 x299)) + (let ((x301 x300)) + (let ((x302 x301)) + (let ((x303 x302)) + (let ((x304 x303)) + (let ((x305 x304)) + (let ((x306 x305)) + (let ((x307 x306)) + (let ((x308 x307)) + (let ((x309 x308)) + (let ((x310 x309)) + (let ((x311 x310)) + (let ((x312 x311)) + (let ((x313 x312)) + (let ((x314 x313)) + (let ((x315 x314)) + (let ((x316 x315)) + (let ((x317 x316)) + (let ((x318 x317)) + (let ((x319 x318)) + (let ((x320 x319)) + (let ((x321 x320)) + (let ((x322 x321)) + (let ((x323 x322)) + (let ((x324 x323)) + (let ((x325 x324)) + (let ((x326 x325)) + (let ((x327 x326)) + (let ((x328 x327)) + (let ((x329 x328)) + (let ((x330 x329)) + (let ((x331 x330)) + (let ((x332 x331)) + (let ((x333 x332)) + (let ((x334 x333)) + (let ((x335 x334)) + (let ((x336 x335)) + (let ((x337 x336)) + (let ((x338 x337)) + (let ((x339 x338)) + (let ((x340 x339)) + (let ((x341 x340)) + (let ((x342 x341)) + (let ((x343 x342)) + (let ((x344 x343)) + (let ((x345 x344)) + (let ((x346 x345)) + (let ((x347 x346)) + (let ((x348 x347)) + (let ((x349 x348)) + (let ((x350 x349)) + (let ((x351 x350)) + (let ((x352 x351)) + (let ((x353 x352)) + (let ((x354 x353)) + (let ((x355 x354)) + (let ((x356 x355)) + (let ((x357 x356)) + (let ((x358 x357)) + (let ((x359 x358)) + (let ((x360 x359)) + (let ((x361 x360)) + (let ((x362 x361)) + (let ((x363 x362)) + (let ((x364 x363)) + (let ((x365 x364)) + (let ((x366 x365)) + (let ((x367 x366)) + (let ((x368 x367)) + (let ((x369 x368)) + (let ((x370 x369)) + (let ((x371 x370)) + (let ((x372 x371)) + (let ((x373 x372)) + (let ((x374 x373)) + (let ((x375 x374)) + (let ((x376 x375)) + (let ((x377 x376)) + (let ((x378 x377)) + (let ((x379 x378)) + (let ((x380 x379)) + (let ((x381 x380)) + (let ((x382 x381)) + (let ((x383 x382)) + (let ((x384 x383)) + (let ((x385 x384)) + (let ((x386 x385)) + (let ((x387 x386)) + (let ((x388 x387)) + (let ((x389 x388)) + (let ((x390 x389)) + (let ((x391 x390)) + (let ((x392 x391)) + (let ((x393 x392)) + (let ((x394 x393)) + (let ((x395 x394)) + (let ((x396 x395)) + (let ((x397 x396)) + (let ((x398 x397)) + (let ((x399 x398)) + (let ((x400 x399)) + (let ((x401 x400)) + (let ((x402 x401)) + (let ((x403 x402)) + (let ((x404 x403)) + (let ((x405 x404)) + (let ((x406 x405)) + (let ((x407 x406)) + (let ((x408 x407)) + (let ((x409 x408)) + (let ((x410 x409)) + (let ((x411 x410)) + (let ((x412 x411)) + (let ((x413 x412)) + (let ((x414 x413)) + (let ((x415 x414)) + (let ((x416 x415)) + (let ((x417 x416)) + (let ((x418 x417)) + (let ((x419 x418)) + (let ((x420 x419)) + (let ((x421 x420)) + (let ((x422 x421)) + (let ((x423 x422)) + (let ((x424 x423)) + (let ((x425 x424)) + (let ((x426 x425)) + (let ((x427 x426)) + (let ((x428 x427)) + (let ((x429 x428)) + (let ((x430 x429)) + (let ((x431 x430)) + (let ((x432 x431)) + (let ((x433 x432)) + (let ((x434 x433)) + (let ((x435 x434)) + (let ((x436 x435)) + (let ((x437 x436)) + (let ((x438 x437)) + (let ((x439 x438)) + (let ((x440 x439)) + (let ((x441 x440)) + (let ((x442 x441)) + (let ((x443 x442)) + (let ((x444 x443)) + (let ((x445 x444)) + (let ((x446 x445)) + (let ((x447 x446)) + (let ((x448 x447)) + (let ((x449 x448)) + (let ((x450 x449)) + (let ((x451 x450)) + (let ((x452 x451)) + (let ((x453 x452)) + (let ((x454 x453)) + (let ((x455 x454)) + (let ((x456 x455)) + (let ((x457 x456)) + (let ((x458 x457)) + (let ((x459 x458)) + (let ((x460 x459)) + (let ((x461 x460)) + (let ((x462 x461)) + (let ((x463 x462)) + (let ((x464 x463)) + (let ((x465 x464)) + (let ((x466 x465)) + (let ((x467 x466)) + (let ((x468 x467)) + (let ((x469 x468)) + (let ((x470 x469)) + (let ((x471 x470)) + (let ((x472 x471)) + (let ((x473 x472)) + (let ((x474 x473)) + (let ((x475 x474)) + (let ((x476 x475)) + (let ((x477 x476)) + (let ((x478 x477)) + (let ((x479 x478)) + (let ((x480 x479)) + (let ((x481 x480)) + (let ((x482 x481)) + (let ((x483 x482)) + (let ((x484 x483)) + (let ((x485 x484)) + (let ((x486 x485)) + (let ((x487 x486)) + (let ((x488 x487)) + (let ((x489 x488)) + (let ((x490 x489)) + (let ((x491 x490)) + (let ((x492 x491)) + (let ((x493 x492)) + (let ((x494 x493)) + (let ((x495 x494)) + (let ((x496 x495)) + (let ((x497 x496)) + (let ((x498 x497)) + (let ((x499 x498)) + (let ((x500 x499)) + (let ((x501 x500)) + (let ((x502 x501)) + (let ((x503 x502)) + (let ((x504 x503)) + (let ((x505 x504)) + (let ((x506 x505)) + (let ((x507 x506)) + (let ((x508 x507)) + (let ((x509 x508)) + (let ((x510 x509)) + (let ((x511 x510)) + (let ((x512 x511)) + (let ((x513 x512)) + (let ((x514 x513)) + (let ((x515 x514)) + (let ((x516 x515)) + (let ((x517 x516)) + (let ((x518 x517)) + (let ((x519 x518)) + (let ((x520 x519)) + (let ((x521 x520)) + (let ((x522 x521)) + (let ((x523 x522)) + (let ((x524 x523)) + (let ((x525 x524)) + (let ((x526 x525)) + (let ((x527 x526)) + (let ((x528 x527)) + (let ((x529 x528)) + (let ((x530 x529)) + (let ((x531 x530)) + (let ((x532 x531)) + (let ((x533 x532)) + (let ((x534 x533)) + (let ((x535 x534)) + (let ((x536 x535)) + (let ((x537 x536)) + (let ((x538 x537)) + (let ((x539 x538)) + (let ((x540 x539)) + (let ((x541 x540)) + (let ((x542 x541)) + (let ((x543 x542)) + (let ((x544 x543)) + (let ((x545 x544)) + (let ((x546 x545)) + (let ((x547 x546)) + (let ((x548 x547)) + (let ((x549 x548)) + (let ((x550 x549)) + (let ((x551 x550)) + (let ((x552 x551)) + (let ((x553 x552)) + (let ((x554 x553)) + (let ((x555 x554)) + (let ((x556 x555)) + (let ((x557 x556)) + (let ((x558 x557)) + (let ((x559 x558)) + (let ((x560 x559)) + (let ((x561 x560)) + (let ((x562 x561)) + (let ((x563 x562)) + (let ((x564 x563)) + (let ((x565 x564)) + (let ((x566 x565)) + (let ((x567 x566)) + (let ((x568 x567)) + (let ((x569 x568)) + (let ((x570 x569)) + (let ((x571 x570)) + (let ((x572 x571)) + (let ((x573 x572)) + (let ((x574 x573)) + (let ((x575 x574)) + (let ((x576 x575)) + (let ((x577 x576)) + (let ((x578 x577)) + (let ((x579 x578)) + (let ((x580 x579)) + (let ((x581 x580)) + (let ((x582 x581)) + (let ((x583 x582)) + (let ((x584 x583)) + (let ((x585 x584)) + (let ((x586 x585)) + (let ((x587 x586)) + (let ((x588 x587)) + (let ((x589 x588)) + (let ((x590 x589)) + (let ((x591 x590)) + (let ((x592 x591)) + (let ((x593 x592)) + (let ((x594 x593)) + (let ((x595 x594)) + (let ((x596 x595)) + (let ((x597 x596)) + (let ((x598 x597)) + (let ((x599 x598)) + (let ((x600 x599)) + (let ((x601 x600)) + (let ((x602 x601)) + (let ((x603 x602)) + (let ((x604 x603)) + (let ((x605 x604)) + (let ((x606 x605)) + (let ((x607 x606)) + (let ((x608 x607)) + (let ((x609 x608)) + (let ((x610 x609)) + (let ((x611 x610)) + (let ((x612 x611)) + (let ((x613 x612)) + (let ((x614 x613)) + (let ((x615 x614)) + (let ((x616 x615)) + (let ((x617 x616)) + (let ((x618 x617)) + (let ((x619 x618)) + (let ((x620 x619)) + (let ((x621 x620)) + (let ((x622 x621)) + (let ((x623 x622)) + (let ((x624 x623)) + (let ((x625 x624)) + (let ((x626 x625)) + (let ((x627 x626)) + (let ((x628 x627)) + (let ((x629 x628)) + (let ((x630 x629)) + (let ((x631 x630)) + (let ((x632 x631)) + (let ((x633 x632)) + (let ((x634 x633)) + (let ((x635 x634)) + (let ((x636 x635)) + (let ((x637 x636)) + (let ((x638 x637)) + (let ((x639 x638)) + (let ((x640 x639)) + (let ((x641 x640)) + (let ((x642 x641)) + (let ((x643 x642)) + (let ((x644 x643)) + (let ((x645 x644)) + (let ((x646 x645)) + (let ((x647 x646)) + (let ((x648 x647)) + (let ((x649 x648)) + (let ((x650 x649)) + (let ((x651 x650)) + (let ((x652 x651)) + (let ((x653 x652)) + (let ((x654 x653)) + (let ((x655 x654)) + (let ((x656 x655)) + (let ((x657 x656)) + (let ((x658 x657)) + (let ((x659 x658)) + (let ((x660 x659)) + (let ((x661 x660)) + (let ((x662 x661)) + (let ((x663 x662)) + (let ((x664 x663)) + (let ((x665 x664)) + (let ((x666 x665)) + (let ((x667 x666)) + (let ((x668 x667)) + (let ((x669 x668)) + (let ((x670 x669)) + (let ((x671 x670)) + (let ((x672 x671)) + (let ((x673 x672)) + (let ((x674 x673)) + (let ((x675 x674)) + (let ((x676 x675)) + (let ((x677 x676)) + (let ((x678 x677)) + (let ((x679 x678)) + (let ((x680 x679)) + (let ((x681 x680)) + (let ((x682 x681)) + (let ((x683 x682)) + (let ((x684 x683)) + (let ((x685 x684)) + (let ((x686 x685)) + (let ((x687 x686)) + (let ((x688 x687)) + (let ((x689 x688)) + (let ((x690 x689)) + (let ((x691 x690)) + (let ((x692 x691)) + (let ((x693 x692)) + (let ((x694 x693)) + (let ((x695 x694)) + (let ((x696 x695)) + (let ((x697 x696)) + (let ((x698 x697)) + (let ((x699 x698)) + (let ((x700 x699)) + (let ((x701 x700)) + (let ((x702 x701)) + (let ((x703 x702)) + (let ((x704 x703)) + (let ((x705 x704)) + (let ((x706 x705)) + (let ((x707 x706)) + (let ((x708 x707)) + (let ((x709 x708)) + (let ((x710 x709)) + (let ((x711 x710)) + (let ((x712 x711)) + (let ((x713 x712)) + (let ((x714 x713)) + (let ((x715 x714)) + (let ((x716 x715)) + (let ((x717 x716)) + (let ((x718 x717)) + (let ((x719 x718)) + (let ((x720 x719)) + (let ((x721 x720)) + (let ((x722 x721)) + (let ((x723 x722)) + (let ((x724 x723)) + (let ((x725 x724)) + (let ((x726 x725)) + (let ((x727 x726)) + (let ((x728 x727)) + (let ((x729 x728)) + (let ((x730 x729)) + (let ((x731 x730)) + (let ((x732 x731)) + (let ((x733 x732)) + (let ((x734 x733)) + (let ((x735 x734)) + (let ((x736 x735)) + (let ((x737 x736)) + (let ((x738 x737)) + (let ((x739 x738)) + (let ((x740 x739)) + (let ((x741 x740)) + (let ((x742 x741)) + (let ((x743 x742)) + (let ((x744 x743)) + (let ((x745 x744)) + (let ((x746 x745)) + (let ((x747 x746)) + (let ((x748 x747)) + (let ((x749 x748)) + (let ((x750 x749)) + (let ((x751 x750)) + (let ((x752 x751)) + (let ((x753 x752)) + (let ((x754 x753)) + (let ((x755 x754)) + (let ((x756 x755)) + (let ((x757 x756)) + (let ((x758 x757)) + (let ((x759 x758)) + (let ((x760 x759)) + (let ((x761 x760)) + (let ((x762 x761)) + (let ((x763 x762)) + (let ((x764 x763)) + (let ((x765 x764)) + (let ((x766 x765)) + (let ((x767 x766)) + (let ((x768 x767)) + (let ((x769 x768)) + (let ((x770 x769)) + (let ((x771 x770)) + (let ((x772 x771)) + (let ((x773 x772)) + (let ((x774 x773)) + (let ((x775 x774)) + (let ((x776 x775)) + (let ((x777 x776)) + (let ((x778 x777)) + (let ((x779 x778)) + (let ((x780 x779)) + (let ((x781 x780)) + (let ((x782 x781)) + (let ((x783 x782)) + (let ((x784 x783)) + (let ((x785 x784)) + (let ((x786 x785)) + (let ((x787 x786)) + (let ((x788 x787)) + (let ((x789 x788)) + (let ((x790 x789)) + (let ((x791 x790)) + (let ((x792 x791)) + (let ((x793 x792)) + (let ((x794 x793)) + (let ((x795 x794)) + (let ((x796 x795)) + (let ((x797 x796)) + (let ((x798 x797)) + (let ((x799 x798)) + (let ((x800 x799)) + (let ((x801 x800)) + (let ((x802 x801)) + (let ((x803 x802)) + (let ((x804 x803)) + (let ((x805 x804)) + (let ((x806 x805)) + (let ((x807 x806)) + (let ((x808 x807)) + (let ((x809 x808)) + (let ((x810 x809)) + (let ((x811 x810)) + (let ((x812 x811)) + (let ((x813 x812)) + (let ((x814 x813)) + (let ((x815 x814)) + (let ((x816 x815)) + (let ((x817 x816)) + (let ((x818 x817)) + (let ((x819 x818)) + (let ((x820 x819)) + (let ((x821 x820)) + (let ((x822 x821)) + (let ((x823 x822)) + (let ((x824 x823)) + (let ((x825 x824)) + (let ((x826 x825)) + (let ((x827 x826)) + (let ((x828 x827)) + (let ((x829 x828)) + (let ((x830 x829)) + (let ((x831 x830)) + (let ((x832 x831)) + (let ((x833 x832)) + (let ((x834 x833)) + (let ((x835 x834)) + (let ((x836 x835)) + (let ((x837 x836)) + (let ((x838 x837)) + (let ((x839 x838)) + (let ((x840 x839)) + (let ((x841 x840)) + (let ((x842 x841)) + (let ((x843 x842)) + (let ((x844 x843)) + (let ((x845 x844)) + (let ((x846 x845)) + (let ((x847 x846)) + (let ((x848 x847)) + (let ((x849 x848)) + (let ((x850 x849)) + (let ((x851 x850)) + (let ((x852 x851)) + (let ((x853 x852)) + (let ((x854 x853)) + (let ((x855 x854)) + (let ((x856 x855)) + (let ((x857 x856)) + (let ((x858 x857)) + (let ((x859 x858)) + (let ((x860 x859)) + (let ((x861 x860)) + (let ((x862 x861)) + (let ((x863 x862)) + (let ((x864 x863)) + (let ((x865 x864)) + (let ((x866 x865)) + (let ((x867 x866)) + (let ((x868 x867)) + (let ((x869 x868)) + (let ((x870 x869)) + (let ((x871 x870)) + (let ((x872 x871)) + (let ((x873 x872)) + (let ((x874 x873)) + (let ((x875 x874)) + (let ((x876 x875)) + (let ((x877 x876)) + (let ((x878 x877)) + (let ((x879 x878)) + (let ((x880 x879)) + (let ((x881 x880)) + (let ((x882 x881)) + (let ((x883 x882)) + (let ((x884 x883)) + (let ((x885 x884)) + (let ((x886 x885)) + (let ((x887 x886)) + (let ((x888 x887)) + (let ((x889 x888)) + (let ((x890 x889)) + (let ((x891 x890)) + (let ((x892 x891)) + (let ((x893 x892)) + (let ((x894 x893)) + (let ((x895 x894)) + (let ((x896 x895)) + (let ((x897 x896)) + (let ((x898 x897)) + (let ((x899 x898)) + (let ((x900 x899)) + (let ((x901 x900)) + (let ((x902 x901)) + (let ((x903 x902)) + (let ((x904 x903)) + (let ((x905 x904)) + (let ((x906 x905)) + (let ((x907 x906)) + (let ((x908 x907)) + (let ((x909 x908)) + (let ((x910 x909)) + (let ((x911 x910)) + (let ((x912 x911)) + (let ((x913 x912)) + (let ((x914 x913)) + (let ((x915 x914)) + (let ((x916 x915)) + (let ((x917 x916)) + (let ((x918 x917)) + (let ((x919 x918)) + (let ((x920 x919)) + (let ((x921 x920)) + (let ((x922 x921)) + (let ((x923 x922)) + (let ((x924 x923)) + (let ((x925 x924)) + (let ((x926 x925)) + (let ((x927 x926)) + (let ((x928 x927)) + (let ((x929 x928)) + (let ((x930 x929)) + (let ((x931 x930)) + (let ((x932 x931)) + (let ((x933 x932)) + (let ((x934 x933)) + (let ((x935 x934)) + (let ((x936 x935)) + (let ((x937 x936)) + (let ((x938 x937)) + (let ((x939 x938)) + (let ((x940 x939)) + (let ((x941 x940)) + (let ((x942 x941)) + (let ((x943 x942)) + (let ((x944 x943)) + (let ((x945 x944)) + (let ((x946 x945)) + (let ((x947 x946)) + (let ((x948 x947)) + (let ((x949 x948)) + (let ((x950 x949)) + (let ((x951 x950)) + (let ((x952 x951)) + (let ((x953 x952)) + (let ((x954 x953)) + (let ((x955 x954)) + (let ((x956 x955)) + (let ((x957 x956)) + (let ((x958 x957)) + (let ((x959 x958)) + (let ((x960 x959)) + (let ((x961 x960)) + (let ((x962 x961)) + (let ((x963 x962)) + (let ((x964 x963)) + (let ((x965 x964)) + (let ((x966 x965)) + (let ((x967 x966)) + (let ((x968 x967)) + (let ((x969 x968)) + (let ((x970 x969)) + (let ((x971 x970)) + (let ((x972 x971)) + (let ((x973 x972)) + (let ((x974 x973)) + (let ((x975 x974)) + (let ((x976 x975)) + (let ((x977 x976)) + (let ((x978 x977)) + (let ((x979 x978)) + (let ((x980 x979)) + (let ((x981 x980)) + (let ((x982 x981)) + (let ((x983 x982)) + (let ((x984 x983)) + (let ((x985 x984)) + (let ((x986 x985)) + (let ((x987 x986)) + (let ((x988 x987)) + (let ((x989 x988)) + (let ((x990 x989)) + (let ((x991 x990)) + (let ((x992 x991)) + (let ((x993 x992)) + (let ((x994 x993)) + (let ((x995 x994)) + (let ((x996 x995)) + (let ((x997 x996)) + (let ((x998 x997)) + (let ((x999 x998)) + (let ((x1000 x999)) + (let ((x1001 x1000)) + (let ((x1002 x1001)) + (let ((x1003 x1002)) + (let ((x1004 x1003)) + (let ((x1005 x1004)) + (let ((x1006 x1005)) + (let ((x1007 x1006)) + (let ((x1008 x1007)) + (let ((x1009 x1008)) + (let ((x1010 x1009)) + (let ((x1011 x1010)) + (let ((x1012 x1011)) + (let ((x1013 x1012)) + (let ((x1014 x1013)) + (let ((x1015 x1014)) + (let ((x1016 x1015)) + (let ((x1017 x1016)) + (let ((x1018 x1017)) + (let ((x1019 x1018)) + (let ((x1020 x1019)) + (let ((x1021 x1020)) + (let ((x1022 x1021)) + (let ((x1023 x1022)) + (let ((x1024 x1023)) + (let ((x1025 x1024)) + (let ((x1026 x1025)) + (let ((x1027 x1026)) + (let ((x1028 x1027)) + (let ((x1029 x1028)) + (let ((x1030 x1029)) + (let ((x1031 x1030)) + (let ((x1032 x1031)) + (let ((x1033 x1032)) + (let ((x1034 x1033)) + (let ((x1035 x1034)) + (let ((x1036 x1035)) + (let ((x1037 x1036)) + (let ((x1038 x1037)) + (let ((x1039 x1038)) + (let ((x1040 x1039)) + (let ((x1041 x1040)) + (let ((x1042 x1041)) + (let ((x1043 x1042)) + (let ((x1044 x1043)) + (let ((x1045 x1044)) + (let ((x1046 x1045)) + (let ((x1047 x1046)) + (let ((x1048 x1047)) + (let ((x1049 x1048)) + (let ((x1050 x1049)) + (let ((x1051 x1050)) + (let ((x1052 x1051)) + (let ((x1053 x1052)) + (let ((x1054 x1053)) + (let ((x1055 x1054)) + (let ((x1056 x1055)) + (let ((x1057 x1056)) + (let ((x1058 x1057)) + (let ((x1059 x1058)) + (let ((x1060 x1059)) + (let ((x1061 x1060)) + (let ((x1062 x1061)) + (let ((x1063 x1062)) + (let ((x1064 x1063)) + (let ((x1065 x1064)) + (let ((x1066 x1065)) + (let ((x1067 x1066)) + (let ((x1068 x1067)) + (let ((x1069 x1068)) + (let ((x1070 x1069)) + (let ((x1071 x1070)) + (let ((x1072 x1071)) + (let ((x1073 x1072)) + (let ((x1074 x1073)) + (let ((x1075 x1074)) + (let ((x1076 x1075)) + (let ((x1077 x1076)) + (let ((x1078 x1077)) + (let ((x1079 x1078)) + (let ((x1080 x1079)) + (let ((x1081 x1080)) + (let ((x1082 x1081)) + (let ((x1083 x1082)) + (let ((x1084 x1083)) + (let ((x1085 x1084)) + (let ((x1086 x1085)) + (let ((x1087 x1086)) + (let ((x1088 x1087)) + (let ((x1089 x1088)) + (let ((x1090 x1089)) + (let ((x1091 x1090)) + (let ((x1092 x1091)) + (let ((x1093 x1092)) + (let ((x1094 x1093)) + (let ((x1095 x1094)) + (let ((x1096 x1095)) + (let ((x1097 x1096)) + (let ((x1098 x1097)) + (let ((x1099 x1098)) + (let ((x1100 x1099)) + (let ((x1101 x1100)) + (let ((x1102 x1101)) + (let ((x1103 x1102)) + (let ((x1104 x1103)) + (let ((x1105 x1104)) + (let ((x1106 x1105)) + (let ((x1107 x1106)) + (let ((x1108 x1107)) + (let ((x1109 x1108)) + (let ((x1110 x1109)) + (let ((x1111 x1110)) + (let ((x1112 x1111)) + (let ((x1113 x1112)) + (let ((x1114 x1113)) + (let ((x1115 x1114)) + (let ((x1116 x1115)) + (let ((x1117 x1116)) + (let ((x1118 x1117)) + (let ((x1119 x1118)) + (let ((x1120 x1119)) + (let ((x1121 x1120)) + (let ((x1122 x1121)) + (let ((x1123 x1122)) + (let ((x1124 x1123)) + (let ((x1125 x1124)) + (let ((x1126 x1125)) + (let ((x1127 x1126)) + (let ((x1128 x1127)) + (let ((x1129 x1128)) + (let ((x1130 x1129)) + (let ((x1131 x1130)) + (let ((x1132 x1131)) + (let ((x1133 x1132)) + (let ((x1134 x1133)) + (let ((x1135 x1134)) + (let ((x1136 x1135)) + (let ((x1137 x1136)) + (let ((x1138 x1137)) + (let ((x1139 x1138)) + (let ((x1140 x1139)) + (let ((x1141 x1140)) + (let ((x1142 x1141)) + (let ((x1143 x1142)) + (let ((x1144 x1143)) + (let ((x1145 x1144)) + (let ((x1146 x1145)) + (let ((x1147 x1146)) + (let ((x1148 x1147)) + (let ((x1149 x1148)) + (let ((x1150 x1149)) + (let ((x1151 x1150)) + (let ((x1152 x1151)) + (let ((x1153 x1152)) + (let ((x1154 x1153)) + (let ((x1155 x1154)) + (let ((x1156 x1155)) + (let ((x1157 x1156)) + (let ((x1158 x1157)) + (let ((x1159 x1158)) + (let ((x1160 x1159)) + (let ((x1161 x1160)) + (let ((x1162 x1161)) + (let ((x1163 x1162)) + (let ((x1164 x1163)) + (let ((x1165 x1164)) + (let ((x1166 x1165)) + (let ((x1167 x1166)) + (let ((x1168 x1167)) + (let ((x1169 x1168)) + (let ((x1170 x1169)) + (let ((x1171 x1170)) + (let ((x1172 x1171)) + (let ((x1173 x1172)) + (let ((x1174 x1173)) + (let ((x1175 x1174)) + (let ((x1176 x1175)) + (let ((x1177 x1176)) + (let ((x1178 x1177)) + (let ((x1179 x1178)) + (let ((x1180 x1179)) + (let ((x1181 x1180)) + (let ((x1182 x1181)) + (let ((x1183 x1182)) + (let ((x1184 x1183)) + (let ((x1185 x1184)) + (let ((x1186 x1185)) + (let ((x1187 x1186)) + (let ((x1188 x1187)) + (let ((x1189 x1188)) + (let ((x1190 x1189)) + (let ((x1191 x1190)) + (let ((x1192 x1191)) + (let ((x1193 x1192)) + (let ((x1194 x1193)) + (let ((x1195 x1194)) + (let ((x1196 x1195)) + (let ((x1197 x1196)) + (let ((x1198 x1197)) + (let ((x1199 x1198)) + (let ((x1200 x1199)) + (let ((x1201 x1200)) + (let ((x1202 x1201)) + (let ((x1203 x1202)) + (let ((x1204 x1203)) + (let ((x1205 x1204)) + (let ((x1206 x1205)) + (let ((x1207 x1206)) + (let ((x1208 x1207)) + (let ((x1209 x1208)) + (let ((x1210 x1209)) + (let ((x1211 x1210)) + (let ((x1212 x1211)) + (let ((x1213 x1212)) + (let ((x1214 x1213)) + (let ((x1215 x1214)) + (let ((x1216 x1215)) + (let ((x1217 x1216)) + (let ((x1218 x1217)) + (let ((x1219 x1218)) + (let ((x1220 x1219)) + (let ((x1221 x1220)) + (let ((x1222 x1221)) + (let ((x1223 x1222)) + (let ((x1224 x1223)) + (let ((x1225 x1224)) + (let ((x1226 x1225)) + (let ((x1227 x1226)) + (let ((x1228 x1227)) + (let ((x1229 x1228)) + (let ((x1230 x1229)) + (let ((x1231 x1230)) + (let ((x1232 x1231)) + (let ((x1233 x1232)) + (let ((x1234 x1233)) + (let ((x1235 x1234)) + (let ((x1236 x1235)) + (let ((x1237 x1236)) + (let ((x1238 x1237)) + (let ((x1239 x1238)) + (let ((x1240 x1239)) + (let ((x1241 x1240)) + (let ((x1242 x1241)) + (let ((x1243 x1242)) + (let ((x1244 x1243)) + (let ((x1245 x1244)) + (let ((x1246 x1245)) + (let ((x1247 x1246)) + (let ((x1248 x1247)) + (let ((x1249 x1248)) + (let ((x1250 x1249)) + (let ((x1251 x1250)) + (let ((x1252 x1251)) + (let ((x1253 x1252)) + (let ((x1254 x1253)) + (let ((x1255 x1254)) + (let ((x1256 x1255)) + (let ((x1257 x1256)) + (let ((x1258 x1257)) + (let ((x1259 x1258)) + (let ((x1260 x1259)) + (let ((x1261 x1260)) + (let ((x1262 x1261)) + (let ((x1263 x1262)) + (let ((x1264 x1263)) + (let ((x1265 x1264)) + (let ((x1266 x1265)) + (let ((x1267 x1266)) + (let ((x1268 x1267)) + (let ((x1269 x1268)) + (let ((x1270 x1269)) + (let ((x1271 x1270)) + (let ((x1272 x1271)) + (let ((x1273 x1272)) + (let ((x1274 x1273)) + (let ((x1275 x1274)) + (let ((x1276 x1275)) + (let ((x1277 x1276)) + (let ((x1278 x1277)) + (let ((x1279 x1278)) + (let ((x1280 x1279)) + (let ((x1281 x1280)) + (let ((x1282 x1281)) + (let ((x1283 x1282)) + (let ((x1284 x1283)) + (let ((x1285 x1284)) + (let ((x1286 x1285)) + (let ((x1287 x1286)) + (let ((x1288 x1287)) + (let ((x1289 x1288)) + (let ((x1290 x1289)) + (let ((x1291 x1290)) + (let ((x1292 x1291)) + (let ((x1293 x1292)) + (let ((x1294 x1293)) + (let ((x1295 x1294)) + (let ((x1296 x1295)) + (let ((x1297 x1296)) + (let ((x1298 x1297)) + (let ((x1299 x1298)) + (let ((x1300 x1299)) + (let ((x1301 x1300)) + (let ((x1302 x1301)) + (let ((x1303 x1302)) + (let ((x1304 x1303)) + (let ((x1305 x1304)) + (let ((x1306 x1305)) + (let ((x1307 x1306)) + (let ((x1308 x1307)) + (let ((x1309 x1308)) + (let ((x1310 x1309)) + (let ((x1311 x1310)) + (let ((x1312 x1311)) + (let ((x1313 x1312)) + (let ((x1314 x1313)) + (let ((x1315 x1314)) + (let ((x1316 x1315)) + (let ((x1317 x1316)) + (let ((x1318 x1317)) + (let ((x1319 x1318)) + (let ((x1320 x1319)) + (let ((x1321 x1320)) + (let ((x1322 x1321)) + (let ((x1323 x1322)) + (let ((x1324 x1323)) + (let ((x1325 x1324)) + (let ((x1326 x1325)) + (let ((x1327 x1326)) + (let ((x1328 x1327)) + (let ((x1329 x1328)) + (let ((x1330 x1329)) + (let ((x1331 x1330)) + (let ((x1332 x1331)) + (let ((x1333 x1332)) + (let ((x1334 x1333)) + (let ((x1335 x1334)) + (let ((x1336 x1335)) + (let ((x1337 x1336)) + (let ((x1338 x1337)) + (let ((x1339 x1338)) + (let ((x1340 x1339)) + (let ((x1341 x1340)) + (let ((x1342 x1341)) + (let ((x1343 x1342)) + (let ((x1344 x1343)) + (let ((x1345 x1344)) + (let ((x1346 x1345)) + (let ((x1347 x1346)) + (let ((x1348 x1347)) + (let ((x1349 x1348)) + (let ((x1350 x1349)) + (let ((x1351 x1350)) + (let ((x1352 x1351)) + (let ((x1353 x1352)) + (let ((x1354 x1353)) + (let ((x1355 x1354)) + (let ((x1356 x1355)) + (let ((x1357 x1356)) + (let ((x1358 x1357)) + (let ((x1359 x1358)) + (let ((x1360 x1359)) + (let ((x1361 x1360)) + (let ((x1362 x1361)) + (let ((x1363 x1362)) + (let ((x1364 x1363)) + (let ((x1365 x1364)) + (let ((x1366 x1365)) + (let ((x1367 x1366)) + (let ((x1368 x1367)) + (let ((x1369 x1368)) + (let ((x1370 x1369)) + (let ((x1371 x1370)) + (let ((x1372 x1371)) + (let ((x1373 x1372)) + (let ((x1374 x1373)) + (let ((x1375 x1374)) + (let ((x1376 x1375)) + (let ((x1377 x1376)) + (let ((x1378 x1377)) + (let ((x1379 x1378)) + (let ((x1380 x1379)) + (let ((x1381 x1380)) + (let ((x1382 x1381)) + (let ((x1383 x1382)) + (let ((x1384 x1383)) + (let ((x1385 x1384)) + (let ((x1386 x1385)) + (let ((x1387 x1386)) + (let ((x1388 x1387)) + (let ((x1389 x1388)) + (let ((x1390 x1389)) + (let ((x1391 x1390)) + (let ((x1392 x1391)) + (let ((x1393 x1392)) + (let ((x1394 x1393)) + (let ((x1395 x1394)) + (let ((x1396 x1395)) + (let ((x1397 x1396)) + (let ((x1398 x1397)) + (let ((x1399 x1398)) + (let ((x1400 x1399)) + (let ((x1401 x1400)) + (let ((x1402 x1401)) + (let ((x1403 x1402)) + (let ((x1404 x1403)) + (let ((x1405 x1404)) + (let ((x1406 x1405)) + (let ((x1407 x1406)) + (let ((x1408 x1407)) + (let ((x1409 x1408)) + (let ((x1410 x1409)) + (let ((x1411 x1410)) + (let ((x1412 x1411)) + (let ((x1413 x1412)) + (let ((x1414 x1413)) + (let ((x1415 x1414)) + (let ((x1416 x1415)) + (let ((x1417 x1416)) + (let ((x1418 x1417)) + (let ((x1419 x1418)) + (let ((x1420 x1419)) + (let ((x1421 x1420)) + (let ((x1422 x1421)) + (let ((x1423 x1422)) + (let ((x1424 x1423)) + (let ((x1425 x1424)) + (let ((x1426 x1425)) + (let ((x1427 x1426)) + (let ((x1428 x1427)) + (let ((x1429 x1428)) + (let ((x1430 x1429)) + (let ((x1431 x1430)) + (let ((x1432 x1431)) + (let ((x1433 x1432)) + (let ((x1434 x1433)) + (let ((x1435 x1434)) + (let ((x1436 x1435)) + (let ((x1437 x1436)) + (let ((x1438 x1437)) + (let ((x1439 x1438)) + (let ((x1440 x1439)) + (let ((x1441 x1440)) + (let ((x1442 x1441)) + (let ((x1443 x1442)) + (let ((x1444 x1443)) + (let ((x1445 x1444)) + (let ((x1446 x1445)) + (let ((x1447 x1446)) + (let ((x1448 x1447)) + (let ((x1449 x1448)) + (let ((x1450 x1449)) + (let ((x1451 x1450)) + (let ((x1452 x1451)) + (let ((x1453 x1452)) + (let ((x1454 x1453)) + (let ((x1455 x1454)) + (let ((x1456 x1455)) + (let ((x1457 x1456)) + (let ((x1458 x1457)) + (let ((x1459 x1458)) + (let ((x1460 x1459)) + (let ((x1461 x1460)) + (let ((x1462 x1461)) + (let ((x1463 x1462)) + (let ((x1464 x1463)) + (let ((x1465 x1464)) + (let ((x1466 x1465)) + (let ((x1467 x1466)) + (let ((x1468 x1467)) + (let ((x1469 x1468)) + (let ((x1470 x1469)) + (let ((x1471 x1470)) + (let ((x1472 x1471)) + (let ((x1473 x1472)) + (let ((x1474 x1473)) + (let ((x1475 x1474)) + (let ((x1476 x1475)) + (let ((x1477 x1476)) + (let ((x1478 x1477)) + (let ((x1479 x1478)) + (let ((x1480 x1479)) + (let ((x1481 x1480)) + (let ((x1482 x1481)) + (let ((x1483 x1482)) + (let ((x1484 x1483)) + (let ((x1485 x1484)) + (let ((x1486 x1485)) + (let ((x1487 x1486)) + (let ((x1488 x1487)) + (let ((x1489 x1488)) + (let ((x1490 x1489)) + (let ((x1491 x1490)) + (let ((x1492 x1491)) + (let ((x1493 x1492)) + (let ((x1494 x1493)) + (let ((x1495 x1494)) + (let ((x1496 x1495)) + (let ((x1497 x1496)) + (let ((x1498 x1497)) + (let ((x1499 x1498)) + (let ((x1500 x1499)) + (let ((x1501 x1500)) + (let ((x1502 x1501)) + (let ((x1503 x1502)) + (let ((x1504 x1503)) + (let ((x1505 x1504)) + (let ((x1506 x1505)) + (let ((x1507 x1506)) + (let ((x1508 x1507)) + (let ((x1509 x1508)) + (let ((x1510 x1509)) + (let ((x1511 x1510)) + (let ((x1512 x1511)) + (let ((x1513 x1512)) + (let ((x1514 x1513)) + (let ((x1515 x1514)) + (let ((x1516 x1515)) + (let ((x1517 x1516)) + (let ((x1518 x1517)) + (let ((x1519 x1518)) + (let ((x1520 x1519)) + (let ((x1521 x1520)) + (let ((x1522 x1521)) + (let ((x1523 x1522)) + (let ((x1524 x1523)) + (let ((x1525 x1524)) + (let ((x1526 x1525)) + (let ((x1527 x1526)) + (let ((x1528 x1527)) + (let ((x1529 x1528)) + (let ((x1530 x1529)) + (let ((x1531 x1530)) + (let ((x1532 x1531)) + (let ((x1533 x1532)) + (let ((x1534 x1533)) + (let ((x1535 x1534)) + (let ((x1536 x1535)) + (let ((x1537 x1536)) + (let ((x1538 x1537)) + (let ((x1539 x1538)) + (let ((x1540 x1539)) + (let ((x1541 x1540)) + (let ((x1542 x1541)) + (let ((x1543 x1542)) + (let ((x1544 x1543)) + (let ((x1545 x1544)) + (let ((x1546 x1545)) + (let ((x1547 x1546)) + (let ((x1548 x1547)) + (let ((x1549 x1548)) + (let ((x1550 x1549)) + (let ((x1551 x1550)) + (let ((x1552 x1551)) + (let ((x1553 x1552)) + (let ((x1554 x1553)) + (let ((x1555 x1554)) + (let ((x1556 x1555)) + (let ((x1557 x1556)) + (let ((x1558 x1557)) + (let ((x1559 x1558)) + (let ((x1560 x1559)) + (let ((x1561 x1560)) + (let ((x1562 x1561)) + (let ((x1563 x1562)) + (let ((x1564 x1563)) + (let ((x1565 x1564)) + (let ((x1566 x1565)) + (let ((x1567 x1566)) + (let ((x1568 x1567)) + (let ((x1569 x1568)) + (let ((x1570 x1569)) + (let ((x1571 x1570)) + (let ((x1572 x1571)) + (let ((x1573 x1572)) + (let ((x1574 x1573)) + (let ((x1575 x1574)) + (let ((x1576 x1575)) + (let ((x1577 x1576)) + (let ((x1578 x1577)) + (let ((x1579 x1578)) + (let ((x1580 x1579)) + (let ((x1581 x1580)) + (let ((x1582 x1581)) + (let ((x1583 x1582)) + (let ((x1584 x1583)) + (let ((x1585 x1584)) + (let ((x1586 x1585)) + (let ((x1587 x1586)) + (let ((x1588 x1587)) + (let ((x1589 x1588)) + (let ((x1590 x1589)) + (let ((x1591 x1590)) + (let ((x1592 x1591)) + (let ((x1593 x1592)) + (let ((x1594 x1593)) + (let ((x1595 x1594)) + (let ((x1596 x1595)) + (let ((x1597 x1596)) + (let ((x1598 x1597)) + (let ((x1599 x1598)) + (let ((x1600 x1599)) + (let ((x1601 x1600)) + (let ((x1602 x1601)) + (let ((x1603 x1602)) + (let ((x1604 x1603)) + (let ((x1605 x1604)) + (let ((x1606 x1605)) + (let ((x1607 x1606)) + (let ((x1608 x1607)) + (let ((x1609 x1608)) + (let ((x1610 x1609)) + (let ((x1611 x1610)) + (let ((x1612 x1611)) + (let ((x1613 x1612)) + (let ((x1614 x1613)) + (let ((x1615 x1614)) + (let ((x1616 x1615)) + (let ((x1617 x1616)) + (let ((x1618 x1617)) + (let ((x1619 x1618)) + (let ((x1620 x1619)) + (let ((x1621 x1620)) + (let ((x1622 x1621)) + (let ((x1623 x1622)) + (let ((x1624 x1623)) + (let ((x1625 x1624)) + (let ((x1626 x1625)) + (let ((x1627 x1626)) + (let ((x1628 x1627)) + (let ((x1629 x1628)) + (let ((x1630 x1629)) + (let ((x1631 x1630)) + (let ((x1632 x1631)) + (let ((x1633 x1632)) + (let ((x1634 x1633)) + (let ((x1635 x1634)) + (let ((x1636 x1635)) + (let ((x1637 x1636)) + (let ((x1638 x1637)) + (let ((x1639 x1638)) + (let ((x1640 x1639)) + (let ((x1641 x1640)) + (let ((x1642 x1641)) + (let ((x1643 x1642)) + (let ((x1644 x1643)) + (let ((x1645 x1644)) + (let ((x1646 x1645)) + (let ((x1647 x1646)) + (let ((x1648 x1647)) + (let ((x1649 x1648)) + (let ((x1650 x1649)) + (let ((x1651 x1650)) + (let ((x1652 x1651)) + (let ((x1653 x1652)) + (let ((x1654 x1653)) + (let ((x1655 x1654)) + (let ((x1656 x1655)) + (let ((x1657 x1656)) + (let ((x1658 x1657)) + (let ((x1659 x1658)) + (let ((x1660 x1659)) + (let ((x1661 x1660)) + (let ((x1662 x1661)) + (let ((x1663 x1662)) + (let ((x1664 x1663)) + (let ((x1665 x1664)) + (let ((x1666 x1665)) + (let ((x1667 x1666)) + (let ((x1668 x1667)) + (let ((x1669 x1668)) + (let ((x1670 x1669)) + (let ((x1671 x1670)) + (let ((x1672 x1671)) + (let ((x1673 x1672)) + (let ((x1674 x1673)) + (let ((x1675 x1674)) + (let ((x1676 x1675)) + (let ((x1677 x1676)) + (let ((x1678 x1677)) + (let ((x1679 x1678)) + (let ((x1680 x1679)) + (let ((x1681 x1680)) + (let ((x1682 x1681)) + (let ((x1683 x1682)) + (let ((x1684 x1683)) + (let ((x1685 x1684)) + (let ((x1686 x1685)) + (let ((x1687 x1686)) + (let ((x1688 x1687)) + (let ((x1689 x1688)) + (let ((x1690 x1689)) + (let ((x1691 x1690)) + (let ((x1692 x1691)) + (let ((x1693 x1692)) + (let ((x1694 x1693)) + (let ((x1695 x1694)) + (let ((x1696 x1695)) + (let ((x1697 x1696)) + (let ((x1698 x1697)) + (let ((x1699 x1698)) + (let ((x1700 x1699)) + (let ((x1701 x1700)) + (let ((x1702 x1701)) + (let ((x1703 x1702)) + (let ((x1704 x1703)) + (let ((x1705 x1704)) + (let ((x1706 x1705)) + (let ((x1707 x1706)) + (let ((x1708 x1707)) + (let ((x1709 x1708)) + (let ((x1710 x1709)) + (let ((x1711 x1710)) + (let ((x1712 x1711)) + (let ((x1713 x1712)) + (let ((x1714 x1713)) + (let ((x1715 x1714)) + (let ((x1716 x1715)) + (let ((x1717 x1716)) + (let ((x1718 x1717)) + (let ((x1719 x1718)) + (let ((x1720 x1719)) + (let ((x1721 x1720)) + (let ((x1722 x1721)) + (let ((x1723 x1722)) + (let ((x1724 x1723)) + (let ((x1725 x1724)) + (let ((x1726 x1725)) + (let ((x1727 x1726)) + (let ((x1728 x1727)) + (let ((x1729 x1728)) + (let ((x1730 x1729)) + (let ((x1731 x1730)) + (let ((x1732 x1731)) + (let ((x1733 x1732)) + (let ((x1734 x1733)) + (let ((x1735 x1734)) + (let ((x1736 x1735)) + (let ((x1737 x1736)) + (let ((x1738 x1737)) + (let ((x1739 x1738)) + (let ((x1740 x1739)) + (let ((x1741 x1740)) + (let ((x1742 x1741)) + (let ((x1743 x1742)) + (let ((x1744 x1743)) + (let ((x1745 x1744)) + (let ((x1746 x1745)) + (let ((x1747 x1746)) + (let ((x1748 x1747)) + (let ((x1749 x1748)) + (let ((x1750 x1749)) + (let ((x1751 x1750)) + (let ((x1752 x1751)) + (let ((x1753 x1752)) + (let ((x1754 x1753)) + (let ((x1755 x1754)) + (let ((x1756 x1755)) + (let ((x1757 x1756)) + (let ((x1758 x1757)) + (let ((x1759 x1758)) + (let ((x1760 x1759)) + (let ((x1761 x1760)) + (let ((x1762 x1761)) + (let ((x1763 x1762)) + (let ((x1764 x1763)) + (let ((x1765 x1764)) + (let ((x1766 x1765)) + (let ((x1767 x1766)) + (let ((x1768 x1767)) + (let ((x1769 x1768)) + (let ((x1770 x1769)) + (let ((x1771 x1770)) + (let ((x1772 x1771)) + (let ((x1773 x1772)) + (let ((x1774 x1773)) + (let ((x1775 x1774)) + (let ((x1776 x1775)) + (let ((x1777 x1776)) + (let ((x1778 x1777)) + (let ((x1779 x1778)) + (let ((x1780 x1779)) + (let ((x1781 x1780)) + (let ((x1782 x1781)) + (let ((x1783 x1782)) + (let ((x1784 x1783)) + (let ((x1785 x1784)) + (let ((x1786 x1785)) + (let ((x1787 x1786)) + (let ((x1788 x1787)) + (let ((x1789 x1788)) + (let ((x1790 x1789)) + (let ((x1791 x1790)) + (let ((x1792 x1791)) + (let ((x1793 x1792)) + (let ((x1794 x1793)) + (let ((x1795 x1794)) + (let ((x1796 x1795)) + (let ((x1797 x1796)) + (let ((x1798 x1797)) + (let ((x1799 x1798)) + (let ((x1800 x1799)) + (let ((x1801 x1800)) + (let ((x1802 x1801)) + (let ((x1803 x1802)) + (let ((x1804 x1803)) + (let ((x1805 x1804)) + (let ((x1806 x1805)) + (let ((x1807 x1806)) + (let ((x1808 x1807)) + (let ((x1809 x1808)) + (let ((x1810 x1809)) + (let ((x1811 x1810)) + (let ((x1812 x1811)) + (let ((x1813 x1812)) + (let ((x1814 x1813)) + (let ((x1815 x1814)) + (let ((x1816 x1815)) + (let ((x1817 x1816)) + (let ((x1818 x1817)) + (let ((x1819 x1818)) + (let ((x1820 x1819)) + (let ((x1821 x1820)) + (let ((x1822 x1821)) + (let ((x1823 x1822)) + (let ((x1824 x1823)) + (let ((x1825 x1824)) + (let ((x1826 x1825)) + (let ((x1827 x1826)) + (let ((x1828 x1827)) + (let ((x1829 x1828)) + (let ((x1830 x1829)) + (let ((x1831 x1830)) + (let ((x1832 x1831)) + (let ((x1833 x1832)) + (let ((x1834 x1833)) + (let ((x1835 x1834)) + (let ((x1836 x1835)) + (let ((x1837 x1836)) + (let ((x1838 x1837)) + (let ((x1839 x1838)) + (let ((x1840 x1839)) + (let ((x1841 x1840)) + (let ((x1842 x1841)) + (let ((x1843 x1842)) + (let ((x1844 x1843)) + (let ((x1845 x1844)) + (let ((x1846 x1845)) + (let ((x1847 x1846)) + (let ((x1848 x1847)) + (let ((x1849 x1848)) + (let ((x1850 x1849)) + (let ((x1851 x1850)) + (let ((x1852 x1851)) + (let ((x1853 x1852)) + (let ((x1854 x1853)) + (let ((x1855 x1854)) + (let ((x1856 x1855)) + (let ((x1857 x1856)) + (let ((x1858 x1857)) + (let ((x1859 x1858)) + (let ((x1860 x1859)) + (let ((x1861 x1860)) + (let ((x1862 x1861)) + (let ((x1863 x1862)) + (let ((x1864 x1863)) + (let ((x1865 x1864)) + (let ((x1866 x1865)) + (let ((x1867 x1866)) + (let ((x1868 x1867)) + (let ((x1869 x1868)) + (let ((x1870 x1869)) + (let ((x1871 x1870)) + (let ((x1872 x1871)) + (let ((x1873 x1872)) + (let ((x1874 x1873)) + (let ((x1875 x1874)) + (let ((x1876 x1875)) + (let ((x1877 x1876)) + (let ((x1878 x1877)) + (let ((x1879 x1878)) + (let ((x1880 x1879)) + (let ((x1881 x1880)) + (let ((x1882 x1881)) + (let ((x1883 x1882)) + (let ((x1884 x1883)) + (let ((x1885 x1884)) + (let ((x1886 x1885)) + (let ((x1887 x1886)) + (let ((x1888 x1887)) + (let ((x1889 x1888)) + (let ((x1890 x1889)) + (let ((x1891 x1890)) + (let ((x1892 x1891)) + (let ((x1893 x1892)) + (let ((x1894 x1893)) + (let ((x1895 x1894)) + (let ((x1896 x1895)) + (let ((x1897 x1896)) + (let ((x1898 x1897)) + (let ((x1899 x1898)) + (let ((x1900 x1899)) + (let ((x1901 x1900)) + (let ((x1902 x1901)) + (let ((x1903 x1902)) + (let ((x1904 x1903)) + (let ((x1905 x1904)) + (let ((x1906 x1905)) + (let ((x1907 x1906)) + (let ((x1908 x1907)) + (let ((x1909 x1908)) + (let ((x1910 x1909)) + (let ((x1911 x1910)) + (let ((x1912 x1911)) + (let ((x1913 x1912)) + (let ((x1914 x1913)) + (let ((x1915 x1914)) + (let ((x1916 x1915)) + (let ((x1917 x1916)) + (let ((x1918 x1917)) + (let ((x1919 x1918)) + (let ((x1920 x1919)) + (let ((x1921 x1920)) + (let ((x1922 x1921)) + (let ((x1923 x1922)) + (let ((x1924 x1923)) + (let ((x1925 x1924)) + (let ((x1926 x1925)) + (let ((x1927 x1926)) + (let ((x1928 x1927)) + (let ((x1929 x1928)) + (let ((x1930 x1929)) + (let ((x1931 x1930)) + (let ((x1932 x1931)) + (let ((x1933 x1932)) + (let ((x1934 x1933)) + (let ((x1935 x1934)) + (let ((x1936 x1935)) + (let ((x1937 x1936)) + (let ((x1938 x1937)) + (let ((x1939 x1938)) + (let ((x1940 x1939)) + (let ((x1941 x1940)) + (let ((x1942 x1941)) + (let ((x1943 x1942)) + (let ((x1944 x1943)) + (let ((x1945 x1944)) + (let ((x1946 x1945)) + (let ((x1947 x1946)) + (let ((x1948 x1947)) + (let ((x1949 x1948)) + (let ((x1950 x1949)) + (let ((x1951 x1950)) + (let ((x1952 x1951)) + (let ((x1953 x1952)) + (let ((x1954 x1953)) + (let ((x1955 x1954)) + (let ((x1956 x1955)) + (let ((x1957 x1956)) + (let ((x1958 x1957)) + (let ((x1959 x1958)) + (let ((x1960 x1959)) + (let ((x1961 x1960)) + (let ((x1962 x1961)) + (let ((x1963 x1962)) + (let ((x1964 x1963)) + (let ((x1965 x1964)) + (let ((x1966 x1965)) + (let ((x1967 x1966)) + (let ((x1968 x1967)) + (let ((x1969 x1968)) + (let ((x1970 x1969)) + (let ((x1971 x1970)) + (let ((x1972 x1971)) + (let ((x1973 x1972)) + (let ((x1974 x1973)) + (let ((x1975 x1974)) + (let ((x1976 x1975)) + (let ((x1977 x1976)) + (let ((x1978 x1977)) + (let ((x1979 x1978)) + (let ((x1980 x1979)) + (let ((x1981 x1980)) + (let ((x1982 x1981)) + (let ((x1983 x1982)) + (let ((x1984 x1983)) + (let ((x1985 x1984)) + (let ((x1986 x1985)) + (let ((x1987 x1986)) + (let ((x1988 x1987)) + (let ((x1989 x1988)) + (let ((x1990 x1989)) + (let ((x1991 x1990)) + (let ((x1992 x1991)) + (let ((x1993 x1992)) + (let ((x1994 x1993)) + (let ((x1995 x1994)) + (let ((x1996 x1995)) + (let ((x1997 x1996)) + (let ((x1998 x1997)) + (let ((x1999 x1998)) + (let ((x2000 x1999)) + (let ((x2001 x2000)) + (let ((x2002 x2001)) + (let ((x2003 x2002)) + (let ((x2004 x2003)) + (let ((x2005 x2004)) + (let ((x2006 x2005)) + (let ((x2007 x2006)) + (let ((x2008 x2007)) + (let ((x2009 x2008)) + (let ((x2010 x2009)) + (let ((x2011 x2010)) + (let ((x2012 x2011)) + (let ((x2013 x2012)) + (let ((x2014 x2013)) + (let ((x2015 x2014)) + (let ((x2016 x2015)) + (let ((x2017 x2016)) + (let ((x2018 x2017)) + (let ((x2019 x2018)) + (let ((x2020 x2019)) + (let ((x2021 x2020)) + (let ((x2022 x2021)) + (let ((x2023 x2022)) + (let ((x2024 x2023)) + (let ((x2025 x2024)) + (let ((x2026 x2025)) + (let ((x2027 x2026)) + (let ((x2028 x2027)) + (let ((x2029 x2028)) + (let ((x2030 x2029)) + (let ((x2031 x2030)) + (let ((x2032 x2031)) + (let ((x2033 x2032)) + (let ((x2034 x2033)) + (let ((x2035 x2034)) + (let ((x2036 x2035)) + (let ((x2037 x2036)) + (let ((x2038 x2037)) + (let ((x2039 x2038)) + (let ((x2040 x2039)) + (let ((x2041 x2040)) + (let ((x2042 x2041)) + (let ((x2043 x2042)) + (let ((x2044 x2043)) + (let ((x2045 x2044)) + (let ((x2046 x2045)) + (let ((x2047 x2046)) + (let ((x2048 x2047)) + (let ((x2049 x2048)) + (let ((x2050 x2049)) + (let ((x2051 x2050)) + (let ((x2052 x2051)) + (let ((x2053 x2052)) + (let ((x2054 x2053)) + (let ((x2055 x2054)) + (let ((x2056 x2055)) + (let ((x2057 x2056)) + (let ((x2058 x2057)) + (let ((x2059 x2058)) + (let ((x2060 x2059)) + (let ((x2061 x2060)) + (let ((x2062 x2061)) + (let ((x2063 x2062)) + (let ((x2064 x2063)) + (let ((x2065 x2064)) + (let ((x2066 x2065)) + (let ((x2067 x2066)) + (let ((x2068 x2067)) + (let ((x2069 x2068)) + (let ((x2070 x2069)) + (let ((x2071 x2070)) + (let ((x2072 x2071)) + (let ((x2073 x2072)) + (let ((x2074 x2073)) + (let ((x2075 x2074)) + (let ((x2076 x2075)) + (let ((x2077 x2076)) + (let ((x2078 x2077)) + (let ((x2079 x2078)) + (let ((x2080 x2079)) + (let ((x2081 x2080)) + (let ((x2082 x2081)) + (let ((x2083 x2082)) + (let ((x2084 x2083)) + (let ((x2085 x2084)) + (let ((x2086 x2085)) + (let ((x2087 x2086)) + (let ((x2088 x2087)) + (let ((x2089 x2088)) + (let ((x2090 x2089)) + (let ((x2091 x2090)) + (let ((x2092 x2091)) + (let ((x2093 x2092)) + (let ((x2094 x2093)) + (let ((x2095 x2094)) + (let ((x2096 x2095)) + (let ((x2097 x2096)) + (let ((x2098 x2097)) + (let ((x2099 x2098)) + (let ((x2100 x2099)) + (let ((x2101 x2100)) + (let ((x2102 x2101)) + (let ((x2103 x2102)) + (let ((x2104 x2103)) + (let ((x2105 x2104)) + (let ((x2106 x2105)) + (let ((x2107 x2106)) + (let ((x2108 x2107)) + (let ((x2109 x2108)) + (let ((x2110 x2109)) + (let ((x2111 x2110)) + (let ((x2112 x2111)) + (let ((x2113 x2112)) + (let ((x2114 x2113)) + (let ((x2115 x2114)) + (let ((x2116 x2115)) + (let ((x2117 x2116)) + (let ((x2118 x2117)) + (let ((x2119 x2118)) + (let ((x2120 x2119)) + (let ((x2121 x2120)) + (let ((x2122 x2121)) + (let ((x2123 x2122)) + (let ((x2124 x2123)) + (let ((x2125 x2124)) + (let ((x2126 x2125)) + (let ((x2127 x2126)) + (let ((x2128 x2127)) + (let ((x2129 x2128)) + (let ((x2130 x2129)) + (let ((x2131 x2130)) + (let ((x2132 x2131)) + (let ((x2133 x2132)) + (let ((x2134 x2133)) + (let ((x2135 x2134)) + (let ((x2136 x2135)) + (let ((x2137 x2136)) + (let ((x2138 x2137)) + (let ((x2139 x2138)) + (let ((x2140 x2139)) + (let ((x2141 x2140)) + (let ((x2142 x2141)) + (let ((x2143 x2142)) + (let ((x2144 x2143)) + (let ((x2145 x2144)) + (let ((x2146 x2145)) + (let ((x2147 x2146)) + (let ((x2148 x2147)) + (let ((x2149 x2148)) + (let ((x2150 x2149)) + (let ((x2151 x2150)) + (let ((x2152 x2151)) + (let ((x2153 x2152)) + (let ((x2154 x2153)) + (let ((x2155 x2154)) + (let ((x2156 x2155)) + (let ((x2157 x2156)) + (let ((x2158 x2157)) + (let ((x2159 x2158)) + (let ((x2160 x2159)) + (let ((x2161 x2160)) + (let ((x2162 x2161)) + (let ((x2163 x2162)) + (let ((x2164 x2163)) + (let ((x2165 x2164)) + (let ((x2166 x2165)) + (let ((x2167 x2166)) + (let ((x2168 x2167)) + (let ((x2169 x2168)) + (let ((x2170 x2169)) + (let ((x2171 x2170)) + (let ((x2172 x2171)) + (let ((x2173 x2172)) + (let ((x2174 x2173)) + (let ((x2175 x2174)) + (let ((x2176 x2175)) + (let ((x2177 x2176)) + (let ((x2178 x2177)) + (let ((x2179 x2178)) + (let ((x2180 x2179)) + (let ((x2181 x2180)) + (let ((x2182 x2181)) + (let ((x2183 x2182)) + (let ((x2184 x2183)) + (let ((x2185 x2184)) + (let ((x2186 x2185)) + (let ((x2187 x2186)) + (let ((x2188 x2187)) + (let ((x2189 x2188)) + (let ((x2190 x2189)) + (let ((x2191 x2190)) + (let ((x2192 x2191)) + (let ((x2193 x2192)) + (let ((x2194 x2193)) + (let ((x2195 x2194)) + (let ((x2196 x2195)) + (let ((x2197 x2196)) + (let ((x2198 x2197)) + (let ((x2199 x2198)) + (let ((x2200 x2199)) + (let ((x2201 x2200)) + (let ((x2202 x2201)) + (let ((x2203 x2202)) + (let ((x2204 x2203)) + (let ((x2205 x2204)) + (let ((x2206 x2205)) + (let ((x2207 x2206)) + (let ((x2208 x2207)) + (let ((x2209 x2208)) + (let ((x2210 x2209)) + (let ((x2211 x2210)) + (let ((x2212 x2211)) + (let ((x2213 x2212)) + (let ((x2214 x2213)) + (let ((x2215 x2214)) + (let ((x2216 x2215)) + (let ((x2217 x2216)) + (let ((x2218 x2217)) + (let ((x2219 x2218)) + (let ((x2220 x2219)) + (let ((x2221 x2220)) + (let ((x2222 x2221)) + (let ((x2223 x2222)) + (let ((x2224 x2223)) + (let ((x2225 x2224)) + (let ((x2226 x2225)) + (let ((x2227 x2226)) + (let ((x2228 x2227)) + (let ((x2229 x2228)) + (let ((x2230 x2229)) + (let ((x2231 x2230)) + (let ((x2232 x2231)) + (let ((x2233 x2232)) + (let ((x2234 x2233)) + (let ((x2235 x2234)) + (let ((x2236 x2235)) + (let ((x2237 x2236)) + (let ((x2238 x2237)) + (let ((x2239 x2238)) + (let ((x2240 x2239)) + (let ((x2241 x2240)) + (let ((x2242 x2241)) + (let ((x2243 x2242)) + (let ((x2244 x2243)) + (let ((x2245 x2244)) + (let ((x2246 x2245)) + (let ((x2247 x2246)) + (let ((x2248 x2247)) + (let ((x2249 x2248)) + (let ((x2250 x2249)) + (let ((x2251 x2250)) + (let ((x2252 x2251)) + (let ((x2253 x2252)) + (let ((x2254 x2253)) + (let ((x2255 x2254)) + (let ((x2256 x2255)) + (let ((x2257 x2256)) + (let ((x2258 x2257)) + (let ((x2259 x2258)) + (let ((x2260 x2259)) + (let ((x2261 x2260)) + (let ((x2262 x2261)) + (let ((x2263 x2262)) + (let ((x2264 x2263)) + (let ((x2265 x2264)) + (let ((x2266 x2265)) + (let ((x2267 x2266)) + (let ((x2268 x2267)) + (let ((x2269 x2268)) + (let ((x2270 x2269)) + (let ((x2271 x2270)) + (let ((x2272 x2271)) + (let ((x2273 x2272)) + (let ((x2274 x2273)) + (let ((x2275 x2274)) + (let ((x2276 x2275)) + (let ((x2277 x2276)) + (let ((x2278 x2277)) + (let ((x2279 x2278)) + (let ((x2280 x2279)) + (let ((x2281 x2280)) + (let ((x2282 x2281)) + (let ((x2283 x2282)) + (let ((x2284 x2283)) + (let ((x2285 x2284)) + (let ((x2286 x2285)) + (let ((x2287 x2286)) + (let ((x2288 x2287)) + (let ((x2289 x2288)) + (let ((x2290 x2289)) + (let ((x2291 x2290)) + (let ((x2292 x2291)) + (let ((x2293 x2292)) + (let ((x2294 x2293)) + (let ((x2295 x2294)) + (let ((x2296 x2295)) + (let ((x2297 x2296)) + (let ((x2298 x2297)) + (let ((x2299 x2298)) + (let ((x2300 x2299)) + (let ((x2301 x2300)) + (let ((x2302 x2301)) + (let ((x2303 x2302)) + (let ((x2304 x2303)) + (let ((x2305 x2304)) + (let ((x2306 x2305)) + (let ((x2307 x2306)) + (let ((x2308 x2307)) + (let ((x2309 x2308)) + (let ((x2310 x2309)) + (let ((x2311 x2310)) + (let ((x2312 x2311)) + (let ((x2313 x2312)) + (let ((x2314 x2313)) + (let ((x2315 x2314)) + (let ((x2316 x2315)) + (let ((x2317 x2316)) + (let ((x2318 x2317)) + (let ((x2319 x2318)) + (let ((x2320 x2319)) + (let ((x2321 x2320)) + (let ((x2322 x2321)) + (let ((x2323 x2322)) + (let ((x2324 x2323)) + (let ((x2325 x2324)) + (let ((x2326 x2325)) + (let ((x2327 x2326)) + (let ((x2328 x2327)) + (let ((x2329 x2328)) + (let ((x2330 x2329)) + (let ((x2331 x2330)) + (let ((x2332 x2331)) + (let ((x2333 x2332)) + (let ((x2334 x2333)) + (let ((x2335 x2334)) + (let ((x2336 x2335)) + (let ((x2337 x2336)) + (let ((x2338 x2337)) + (let ((x2339 x2338)) + (let ((x2340 x2339)) + (let ((x2341 x2340)) + (let ((x2342 x2341)) + (let ((x2343 x2342)) + (let ((x2344 x2343)) + (let ((x2345 x2344)) + (let ((x2346 x2345)) + (let ((x2347 x2346)) + (let ((x2348 x2347)) + (let ((x2349 x2348)) + (let ((x2350 x2349)) + (let ((x2351 x2350)) + (let ((x2352 x2351)) + (let ((x2353 x2352)) + (let ((x2354 x2353)) + (let ((x2355 x2354)) + (let ((x2356 x2355)) + (let ((x2357 x2356)) + (let ((x2358 x2357)) + (let ((x2359 x2358)) + (let ((x2360 x2359)) + (let ((x2361 x2360)) + (let ((x2362 x2361)) + (let ((x2363 x2362)) + (let ((x2364 x2363)) + (let ((x2365 x2364)) + (let ((x2366 x2365)) + (let ((x2367 x2366)) + (let ((x2368 x2367)) + (let ((x2369 x2368)) + (let ((x2370 x2369)) + (let ((x2371 x2370)) + (let ((x2372 x2371)) + (let ((x2373 x2372)) + (let ((x2374 x2373)) + (let ((x2375 x2374)) + (let ((x2376 x2375)) + (let ((x2377 x2376)) + (let ((x2378 x2377)) + (let ((x2379 x2378)) + (let ((x2380 x2379)) + (let ((x2381 x2380)) + (let ((x2382 x2381)) + (let ((x2383 x2382)) + (let ((x2384 x2383)) + (let ((x2385 x2384)) + (let ((x2386 x2385)) + (let ((x2387 x2386)) + (let ((x2388 x2387)) + (let ((x2389 x2388)) + (let ((x2390 x2389)) + (let ((x2391 x2390)) + (let ((x2392 x2391)) + (let ((x2393 x2392)) + (let ((x2394 x2393)) + (let ((x2395 x2394)) + (let ((x2396 x2395)) + (let ((x2397 x2396)) + (let ((x2398 x2397)) + (let ((x2399 x2398)) + (let ((x2400 x2399)) + (let ((x2401 x2400)) + (let ((x2402 x2401)) + (let ((x2403 x2402)) + (let ((x2404 x2403)) + (let ((x2405 x2404)) + (let ((x2406 x2405)) + (let ((x2407 x2406)) + (let ((x2408 x2407)) + (let ((x2409 x2408)) + (let ((x2410 x2409)) + (let ((x2411 x2410)) + (let ((x2412 x2411)) + (let ((x2413 x2412)) + (let ((x2414 x2413)) + (let ((x2415 x2414)) + (let ((x2416 x2415)) + (let ((x2417 x2416)) + (let ((x2418 x2417)) + (let ((x2419 x2418)) + (let ((x2420 x2419)) + (let ((x2421 x2420)) + (let ((x2422 x2421)) + (let ((x2423 x2422)) + (let ((x2424 x2423)) + (let ((x2425 x2424)) + (let ((x2426 x2425)) + (let ((x2427 x2426)) + (let ((x2428 x2427)) + (let ((x2429 x2428)) + (let ((x2430 x2429)) + (let ((x2431 x2430)) + (let ((x2432 x2431)) + (let ((x2433 x2432)) + (let ((x2434 x2433)) + (let ((x2435 x2434)) + (let ((x2436 x2435)) + (let ((x2437 x2436)) + (let ((x2438 x2437)) + (let ((x2439 x2438)) + (let ((x2440 x2439)) + (let ((x2441 x2440)) + (let ((x2442 x2441)) + (let ((x2443 x2442)) + (let ((x2444 x2443)) + (let ((x2445 x2444)) + (let ((x2446 x2445)) + (let ((x2447 x2446)) + (let ((x2448 x2447)) + (let ((x2449 x2448)) + (let ((x2450 x2449)) + (let ((x2451 x2450)) + (let ((x2452 x2451)) + (let ((x2453 x2452)) + (let ((x2454 x2453)) + (let ((x2455 x2454)) + (let ((x2456 x2455)) + (let ((x2457 x2456)) + (let ((x2458 x2457)) + (let ((x2459 x2458)) + (let ((x2460 x2459)) + (let ((x2461 x2460)) + (let ((x2462 x2461)) + (let ((x2463 x2462)) + (let ((x2464 x2463)) + (let ((x2465 x2464)) + (let ((x2466 x2465)) + (let ((x2467 x2466)) + (let ((x2468 x2467)) + (let ((x2469 x2468)) + (let ((x2470 x2469)) + (let ((x2471 x2470)) + (let ((x2472 x2471)) + (let ((x2473 x2472)) + (let ((x2474 x2473)) + (let ((x2475 x2474)) + (let ((x2476 x2475)) + (let ((x2477 x2476)) + (let ((x2478 x2477)) + (let ((x2479 x2478)) + (let ((x2480 x2479)) + (let ((x2481 x2480)) + (let ((x2482 x2481)) + (let ((x2483 x2482)) + (let ((x2484 x2483)) + (let ((x2485 x2484)) + (let ((x2486 x2485)) + (let ((x2487 x2486)) + (let ((x2488 x2487)) + (let ((x2489 x2488)) + (let ((x2490 x2489)) + (let ((x2491 x2490)) + (let ((x2492 x2491)) + (let ((x2493 x2492)) + (let ((x2494 x2493)) + (let ((x2495 x2494)) + (let ((x2496 x2495)) + (let ((x2497 x2496)) + (let ((x2498 x2497)) + (let ((x2499 x2498)) + (let ((x2500 x2499)) + (let ((x2501 x2500)) + (let ((x2502 x2501)) + (let ((x2503 x2502)) + (let ((x2504 x2503)) + (let ((x2505 x2504)) + (let ((x2506 x2505)) + (let ((x2507 x2506)) + (let ((x2508 x2507)) + (let ((x2509 x2508)) + (let ((x2510 x2509)) + (let ((x2511 x2510)) + (let ((x2512 x2511)) + (let ((x2513 x2512)) + (let ((x2514 x2513)) + (let ((x2515 x2514)) + (let ((x2516 x2515)) + (let ((x2517 x2516)) + (let ((x2518 x2517)) + (let ((x2519 x2518)) + (let ((x2520 x2519)) + (let ((x2521 x2520)) + (let ((x2522 x2521)) + (let ((x2523 x2522)) + (let ((x2524 x2523)) + (let ((x2525 x2524)) + (let ((x2526 x2525)) + (let ((x2527 x2526)) + (let ((x2528 x2527)) + (let ((x2529 x2528)) + (let ((x2530 x2529)) + (let ((x2531 x2530)) + (let ((x2532 x2531)) + (let ((x2533 x2532)) + (let ((x2534 x2533)) + (let ((x2535 x2534)) + (let ((x2536 x2535)) + (let ((x2537 x2536)) + (let ((x2538 x2537)) + (let ((x2539 x2538)) + (let ((x2540 x2539)) + (let ((x2541 x2540)) + (let ((x2542 x2541)) + (let ((x2543 x2542)) + (let ((x2544 x2543)) + (let ((x2545 x2544)) + (let ((x2546 x2545)) + (let ((x2547 x2546)) + (let ((x2548 x2547)) + (let ((x2549 x2548)) + (let ((x2550 x2549)) + (let ((x2551 x2550)) + (let ((x2552 x2551)) + (let ((x2553 x2552)) + (let ((x2554 x2553)) + (let ((x2555 x2554)) + (let ((x2556 x2555)) + (let ((x2557 x2556)) + (let ((x2558 x2557)) + (let ((x2559 x2558)) + (let ((x2560 x2559)) + (let ((x2561 x2560)) + (let ((x2562 x2561)) + (let ((x2563 x2562)) + (let ((x2564 x2563)) + (let ((x2565 x2564)) + (let ((x2566 x2565)) + (let ((x2567 x2566)) + (let ((x2568 x2567)) + (let ((x2569 x2568)) + (let ((x2570 x2569)) + (let ((x2571 x2570)) + (let ((x2572 x2571)) + (let ((x2573 x2572)) + (let ((x2574 x2573)) + (let ((x2575 x2574)) + (let ((x2576 x2575)) + (let ((x2577 x2576)) + (let ((x2578 x2577)) + (let ((x2579 x2578)) + (let ((x2580 x2579)) + (let ((x2581 x2580)) + (let ((x2582 x2581)) + (let ((x2583 x2582)) + (let ((x2584 x2583)) + (let ((x2585 x2584)) + (let ((x2586 x2585)) + (let ((x2587 x2586)) + (let ((x2588 x2587)) + (let ((x2589 x2588)) + (let ((x2590 x2589)) + (let ((x2591 x2590)) + (let ((x2592 x2591)) + (let ((x2593 x2592)) + (let ((x2594 x2593)) + (let ((x2595 x2594)) + (let ((x2596 x2595)) + (let ((x2597 x2596)) + (let ((x2598 x2597)) + (let ((x2599 x2598)) + (let ((x2600 x2599)) + (let ((x2601 x2600)) + (let ((x2602 x2601)) + (let ((x2603 x2602)) + (let ((x2604 x2603)) + (let ((x2605 x2604)) + (let ((x2606 x2605)) + (let ((x2607 x2606)) + (let ((x2608 x2607)) + (let ((x2609 x2608)) + (let ((x2610 x2609)) + (let ((x2611 x2610)) + (let ((x2612 x2611)) + (let ((x2613 x2612)) + (let ((x2614 x2613)) + (let ((x2615 x2614)) + (let ((x2616 x2615)) + (let ((x2617 x2616)) + (let ((x2618 x2617)) + (let ((x2619 x2618)) + (let ((x2620 x2619)) + (let ((x2621 x2620)) + (let ((x2622 x2621)) + (let ((x2623 x2622)) + (let ((x2624 x2623)) + (let ((x2625 x2624)) + (let ((x2626 x2625)) + (let ((x2627 x2626)) + (let ((x2628 x2627)) + (let ((x2629 x2628)) + (let ((x2630 x2629)) + (let ((x2631 x2630)) + (let ((x2632 x2631)) + (let ((x2633 x2632)) + (let ((x2634 x2633)) + (let ((x2635 x2634)) + (let ((x2636 x2635)) + (let ((x2637 x2636)) + (let ((x2638 x2637)) + (let ((x2639 x2638)) + (let ((x2640 x2639)) + (let ((x2641 x2640)) + (let ((x2642 x2641)) + (let ((x2643 x2642)) + (let ((x2644 x2643)) + (let ((x2645 x2644)) + (let ((x2646 x2645)) + (let ((x2647 x2646)) + (let ((x2648 x2647)) + (let ((x2649 x2648)) + (let ((x2650 x2649)) + (let ((x2651 x2650)) + (let ((x2652 x2651)) + (let ((x2653 x2652)) + (let ((x2654 x2653)) + (let ((x2655 x2654)) + (let ((x2656 x2655)) + (let ((x2657 x2656)) + (let ((x2658 x2657)) + (let ((x2659 x2658)) + (let ((x2660 x2659)) + (let ((x2661 x2660)) + (let ((x2662 x2661)) + (let ((x2663 x2662)) + (let ((x2664 x2663)) + (let ((x2665 x2664)) + (let ((x2666 x2665)) + (let ((x2667 x2666)) + (let ((x2668 x2667)) + (let ((x2669 x2668)) + (let ((x2670 x2669)) + (let ((x2671 x2670)) + (let ((x2672 x2671)) + (let ((x2673 x2672)) + (let ((x2674 x2673)) + (let ((x2675 x2674)) + (let ((x2676 x2675)) + (let ((x2677 x2676)) + (let ((x2678 x2677)) + (let ((x2679 x2678)) + (let ((x2680 x2679)) + (let ((x2681 x2680)) + (let ((x2682 x2681)) + (let ((x2683 x2682)) + (let ((x2684 x2683)) + (let ((x2685 x2684)) + (let ((x2686 x2685)) + (let ((x2687 x2686)) + (let ((x2688 x2687)) + (let ((x2689 x2688)) + (let ((x2690 x2689)) + (let ((x2691 x2690)) + (let ((x2692 x2691)) + (let ((x2693 x2692)) + (let ((x2694 x2693)) + (let ((x2695 x2694)) + (let ((x2696 x2695)) + (let ((x2697 x2696)) + (let ((x2698 x2697)) + (let ((x2699 x2698)) + (let ((x2700 x2699)) + (let ((x2701 x2700)) + (let ((x2702 x2701)) + (let ((x2703 x2702)) + (let ((x2704 x2703)) + (let ((x2705 x2704)) + (let ((x2706 x2705)) + (let ((x2707 x2706)) + (let ((x2708 x2707)) + (let ((x2709 x2708)) + (let ((x2710 x2709)) + (let ((x2711 x2710)) + (let ((x2712 x2711)) + (let ((x2713 x2712)) + (let ((x2714 x2713)) + (let ((x2715 x2714)) + (let ((x2716 x2715)) + (let ((x2717 x2716)) + (let ((x2718 x2717)) + (let ((x2719 x2718)) + (let ((x2720 x2719)) + (let ((x2721 x2720)) + (let ((x2722 x2721)) + (let ((x2723 x2722)) + (let ((x2724 x2723)) + (let ((x2725 x2724)) + (let ((x2726 x2725)) + (let ((x2727 x2726)) + (let ((x2728 x2727)) + (let ((x2729 x2728)) + (let ((x2730 x2729)) + (let ((x2731 x2730)) + (let ((x2732 x2731)) + (let ((x2733 x2732)) + (let ((x2734 x2733)) + (let ((x2735 x2734)) + (let ((x2736 x2735)) + (let ((x2737 x2736)) + (let ((x2738 x2737)) + (let ((x2739 x2738)) + (let ((x2740 x2739)) + (let ((x2741 x2740)) + (let ((x2742 x2741)) + (let ((x2743 x2742)) + (let ((x2744 x2743)) + (let ((x2745 x2744)) + (let ((x2746 x2745)) + (let ((x2747 x2746)) + (let ((x2748 x2747)) + (let ((x2749 x2748)) + (let ((x2750 x2749)) + (let ((x2751 x2750)) + (let ((x2752 x2751)) + (let ((x2753 x2752)) + (let ((x2754 x2753)) + (let ((x2755 x2754)) + (let ((x2756 x2755)) + (let ((x2757 x2756)) + (let ((x2758 x2757)) + (let ((x2759 x2758)) + (let ((x2760 x2759)) + (let ((x2761 x2760)) + (let ((x2762 x2761)) + (let ((x2763 x2762)) + (let ((x2764 x2763)) + (let ((x2765 x2764)) + (let ((x2766 x2765)) + (let ((x2767 x2766)) + (let ((x2768 x2767)) + (let ((x2769 x2768)) + (let ((x2770 x2769)) + (let ((x2771 x2770)) + (let ((x2772 x2771)) + (let ((x2773 x2772)) + (let ((x2774 x2773)) + (let ((x2775 x2774)) + (let ((x2776 x2775)) + (let ((x2777 x2776)) + (let ((x2778 x2777)) + (let ((x2779 x2778)) + (let ((x2780 x2779)) + (let ((x2781 x2780)) + (let ((x2782 x2781)) + (let ((x2783 x2782)) + (let ((x2784 x2783)) + (let ((x2785 x2784)) + (let ((x2786 x2785)) + (let ((x2787 x2786)) + (let ((x2788 x2787)) + (let ((x2789 x2788)) + (let ((x2790 x2789)) + (let ((x2791 x2790)) + (let ((x2792 x2791)) + (let ((x2793 x2792)) + (let ((x2794 x2793)) + (let ((x2795 x2794)) + (let ((x2796 x2795)) + (let ((x2797 x2796)) + (let ((x2798 x2797)) + (let ((x2799 x2798)) + (let ((x2800 x2799)) + (let ((x2801 x2800)) + (let ((x2802 x2801)) + (let ((x2803 x2802)) + (let ((x2804 x2803)) + (let ((x2805 x2804)) + (let ((x2806 x2805)) + (let ((x2807 x2806)) + (let ((x2808 x2807)) + (let ((x2809 x2808)) + (let ((x2810 x2809)) + (let ((x2811 x2810)) + (let ((x2812 x2811)) + (let ((x2813 x2812)) + (let ((x2814 x2813)) + (let ((x2815 x2814)) + (let ((x2816 x2815)) + (let ((x2817 x2816)) + (let ((x2818 x2817)) + (let ((x2819 x2818)) + (let ((x2820 x2819)) + (let ((x2821 x2820)) + (let ((x2822 x2821)) + (let ((x2823 x2822)) + (let ((x2824 x2823)) + (let ((x2825 x2824)) + (let ((x2826 x2825)) + (let ((x2827 x2826)) + (let ((x2828 x2827)) + (let ((x2829 x2828)) + (let ((x2830 x2829)) + (let ((x2831 x2830)) + (let ((x2832 x2831)) + (let ((x2833 x2832)) + (let ((x2834 x2833)) + (let ((x2835 x2834)) + (let ((x2836 x2835)) + (let ((x2837 x2836)) + (let ((x2838 x2837)) + (let ((x2839 x2838)) + (let ((x2840 x2839)) + (let ((x2841 x2840)) + (let ((x2842 x2841)) + (let ((x2843 x2842)) + (let ((x2844 x2843)) + (let ((x2845 x2844)) + (let ((x2846 x2845)) + (let ((x2847 x2846)) + (let ((x2848 x2847)) + (let ((x2849 x2848)) + (let ((x2850 x2849)) + (let ((x2851 x2850)) + (let ((x2852 x2851)) + (let ((x2853 x2852)) + (let ((x2854 x2853)) + (let ((x2855 x2854)) + (let ((x2856 x2855)) + (let ((x2857 x2856)) + (let ((x2858 x2857)) + (let ((x2859 x2858)) + (let ((x2860 x2859)) + (let ((x2861 x2860)) + (let ((x2862 x2861)) + (let ((x2863 x2862)) + (let ((x2864 x2863)) + (let ((x2865 x2864)) + (let ((x2866 x2865)) + (let ((x2867 x2866)) + (let ((x2868 x2867)) + (let ((x2869 x2868)) + (let ((x2870 x2869)) + (let ((x2871 x2870)) + (let ((x2872 x2871)) + (let ((x2873 x2872)) + (let ((x2874 x2873)) + (let ((x2875 x2874)) + (let ((x2876 x2875)) + (let ((x2877 x2876)) + (let ((x2878 x2877)) + (let ((x2879 x2878)) + (let ((x2880 x2879)) + (let ((x2881 x2880)) + (let ((x2882 x2881)) + (let ((x2883 x2882)) + (let ((x2884 x2883)) + (let ((x2885 x2884)) + (let ((x2886 x2885)) + (let ((x2887 x2886)) + (let ((x2888 x2887)) + (let ((x2889 x2888)) + (let ((x2890 x2889)) + (let ((x2891 x2890)) + (let ((x2892 x2891)) + (let ((x2893 x2892)) + (let ((x2894 x2893)) + (let ((x2895 x2894)) + (let ((x2896 x2895)) + (let ((x2897 x2896)) + (let ((x2898 x2897)) + (let ((x2899 x2898)) + (let ((x2900 x2899)) + (let ((x2901 x2900)) + (let ((x2902 x2901)) + (let ((x2903 x2902)) + (let ((x2904 x2903)) + (let ((x2905 x2904)) + (let ((x2906 x2905)) + (let ((x2907 x2906)) + (let ((x2908 x2907)) + (let ((x2909 x2908)) + (let ((x2910 x2909)) + (let ((x2911 x2910)) + (let ((x2912 x2911)) + (let ((x2913 x2912)) + (let ((x2914 x2913)) + (let ((x2915 x2914)) + (let ((x2916 x2915)) + (let ((x2917 x2916)) + (let ((x2918 x2917)) + (let ((x2919 x2918)) + (let ((x2920 x2919)) + (let ((x2921 x2920)) + (let ((x2922 x2921)) + (let ((x2923 x2922)) + (let ((x2924 x2923)) + (let ((x2925 x2924)) + (let ((x2926 x2925)) + (let ((x2927 x2926)) + (let ((x2928 x2927)) + (let ((x2929 x2928)) + (let ((x2930 x2929)) + (let ((x2931 x2930)) + (let ((x2932 x2931)) + (let ((x2933 x2932)) + (let ((x2934 x2933)) + (let ((x2935 x2934)) + (let ((x2936 x2935)) + (let ((x2937 x2936)) + (let ((x2938 x2937)) + (let ((x2939 x2938)) + (let ((x2940 x2939)) + (let ((x2941 x2940)) + (let ((x2942 x2941)) + (let ((x2943 x2942)) + (let ((x2944 x2943)) + (let ((x2945 x2944)) + (let ((x2946 x2945)) + (let ((x2947 x2946)) + (let ((x2948 x2947)) + (let ((x2949 x2948)) + (let ((x2950 x2949)) + (let ((x2951 x2950)) + (let ((x2952 x2951)) + (let ((x2953 x2952)) + (let ((x2954 x2953)) + (let ((x2955 x2954)) + (let ((x2956 x2955)) + (let ((x2957 x2956)) + (let ((x2958 x2957)) + (let ((x2959 x2958)) + (let ((x2960 x2959)) + (let ((x2961 x2960)) + (let ((x2962 x2961)) + (let ((x2963 x2962)) + (let ((x2964 x2963)) + (let ((x2965 x2964)) + (let ((x2966 x2965)) + (let ((x2967 x2966)) + (let ((x2968 x2967)) + (let ((x2969 x2968)) + (let ((x2970 x2969)) + (let ((x2971 x2970)) + (let ((x2972 x2971)) + (let ((x2973 x2972)) + (let ((x2974 x2973)) + (let ((x2975 x2974)) + (let ((x2976 x2975)) + (let ((x2977 x2976)) + (let ((x2978 x2977)) + (let ((x2979 x2978)) + (let ((x2980 x2979)) + (let ((x2981 x2980)) + (let ((x2982 x2981)) + (let ((x2983 x2982)) + (let ((x2984 x2983)) + (let ((x2985 x2984)) + (let ((x2986 x2985)) + (let ((x2987 x2986)) + (let ((x2988 x2987)) + (let ((x2989 x2988)) + (let ((x2990 x2989)) + (let ((x2991 x2990)) + (let ((x2992 x2991)) + (let ((x2993 x2992)) + (let ((x2994 x2993)) + (let ((x2995 x2994)) + (let ((x2996 x2995)) + (let ((x2997 x2996)) + (let ((x2998 x2997)) + (let ((x2999 x2998)) + (let ((x3000 x2999)) + (let ((x3001 x3000)) + (let ((x3002 x3001)) + (let ((x3003 x3002)) + (let ((x3004 x3003)) + (let ((x3005 x3004)) + (let ((x3006 x3005)) + (let ((x3007 x3006)) + (let ((x3008 x3007)) + (let ((x3009 x3008)) + (let ((x3010 x3009)) + (let ((x3011 x3010)) + (let ((x3012 x3011)) + (let ((x3013 x3012)) + (let ((x3014 x3013)) + (let ((x3015 x3014)) + (let ((x3016 x3015)) + (let ((x3017 x3016)) + (let ((x3018 x3017)) + (let ((x3019 x3018)) + (let ((x3020 x3019)) + (let ((x3021 x3020)) + (let ((x3022 x3021)) + (let ((x3023 x3022)) + (let ((x3024 x3023)) + (let ((x3025 x3024)) + (let ((x3026 x3025)) + (let ((x3027 x3026)) + (let ((x3028 x3027)) + (let ((x3029 x3028)) + (let ((x3030 x3029)) + (let ((x3031 x3030)) + (let ((x3032 x3031)) + (let ((x3033 x3032)) + (let ((x3034 x3033)) + (let ((x3035 x3034)) + (let ((x3036 x3035)) + (let ((x3037 x3036)) + (let ((x3038 x3037)) + (let ((x3039 x3038)) + (let ((x3040 x3039)) + (let ((x3041 x3040)) + (let ((x3042 x3041)) + (let ((x3043 x3042)) + (let ((x3044 x3043)) + (let ((x3045 x3044)) + (let ((x3046 x3045)) + (let ((x3047 x3046)) + (let ((x3048 x3047)) + (let ((x3049 x3048)) + (let ((x3050 x3049)) + (let ((x3051 x3050)) + (let ((x3052 x3051)) + (let ((x3053 x3052)) + (let ((x3054 x3053)) + (let ((x3055 x3054)) + (let ((x3056 x3055)) + (let ((x3057 x3056)) + (let ((x3058 x3057)) + (let ((x3059 x3058)) + (let ((x3060 x3059)) + (let ((x3061 x3060)) + (let ((x3062 x3061)) + (let ((x3063 x3062)) + (let ((x3064 x3063)) + (let ((x3065 x3064)) + (let ((x3066 x3065)) + (let ((x3067 x3066)) + (let ((x3068 x3067)) + (let ((x3069 x3068)) + (let ((x3070 x3069)) + (let ((x3071 x3070)) + (let ((x3072 x3071)) + (let ((x3073 x3072)) + (let ((x3074 x3073)) + (let ((x3075 x3074)) + (let ((x3076 x3075)) + (let ((x3077 x3076)) + (let ((x3078 x3077)) + (let ((x3079 x3078)) + (let ((x3080 x3079)) + (let ((x3081 x3080)) + (let ((x3082 x3081)) + (let ((x3083 x3082)) + (let ((x3084 x3083)) + (let ((x3085 x3084)) + (let ((x3086 x3085)) + (let ((x3087 x3086)) + (let ((x3088 x3087)) + (let ((x3089 x3088)) + (let ((x3090 x3089)) + (let ((x3091 x3090)) + (let ((x3092 x3091)) + (let ((x3093 x3092)) + (let ((x3094 x3093)) + (let ((x3095 x3094)) + (let ((x3096 x3095)) + (let ((x3097 x3096)) + (let ((x3098 x3097)) + (let ((x3099 x3098)) + (let ((x3100 x3099)) + (let ((x3101 x3100)) + (let ((x3102 x3101)) + (let ((x3103 x3102)) + (let ((x3104 x3103)) + (let ((x3105 x3104)) + (let ((x3106 x3105)) + (let ((x3107 x3106)) + (let ((x3108 x3107)) + (let ((x3109 x3108)) + (let ((x3110 x3109)) + (let ((x3111 x3110)) + (let ((x3112 x3111)) + (let ((x3113 x3112)) + (let ((x3114 x3113)) + (let ((x3115 x3114)) + (let ((x3116 x3115)) + (let ((x3117 x3116)) + (let ((x3118 x3117)) + (let ((x3119 x3118)) + (let ((x3120 x3119)) + (let ((x3121 x3120)) + (let ((x3122 x3121)) + (let ((x3123 x3122)) + (let ((x3124 x3123)) + (let ((x3125 x3124)) + (let ((x3126 x3125)) + (let ((x3127 x3126)) + (let ((x3128 x3127)) + (let ((x3129 x3128)) + (let ((x3130 x3129)) + (let ((x3131 x3130)) + (let ((x3132 x3131)) + (let ((x3133 x3132)) + (let ((x3134 x3133)) + (let ((x3135 x3134)) + (let ((x3136 x3135)) + (let ((x3137 x3136)) + (let ((x3138 x3137)) + (let ((x3139 x3138)) + (let ((x3140 x3139)) + (let ((x3141 x3140)) + (let ((x3142 x3141)) + (let ((x3143 x3142)) + (let ((x3144 x3143)) + (let ((x3145 x3144)) + (let ((x3146 x3145)) + (let ((x3147 x3146)) + (let ((x3148 x3147)) + (let ((x3149 x3148)) + (let ((x3150 x3149)) + (let ((x3151 x3150)) + (let ((x3152 x3151)) + (let ((x3153 x3152)) + (let ((x3154 x3153)) + (let ((x3155 x3154)) + (let ((x3156 x3155)) + (let ((x3157 x3156)) + (let ((x3158 x3157)) + (let ((x3159 x3158)) + (let ((x3160 x3159)) + (let ((x3161 x3160)) + (let ((x3162 x3161)) + (let ((x3163 x3162)) + (let ((x3164 x3163)) + (let ((x3165 x3164)) + (let ((x3166 x3165)) + (let ((x3167 x3166)) + (let ((x3168 x3167)) + (let ((x3169 x3168)) + (let ((x3170 x3169)) + (let ((x3171 x3170)) + (let ((x3172 x3171)) + (let ((x3173 x3172)) + (let ((x3174 x3173)) + (let ((x3175 x3174)) + (let ((x3176 x3175)) + (let ((x3177 x3176)) + (let ((x3178 x3177)) + (let ((x3179 x3178)) + (let ((x3180 x3179)) + (let ((x3181 x3180)) + (let ((x3182 x3181)) + (let ((x3183 x3182)) + (let ((x3184 x3183)) + (let ((x3185 x3184)) + (let ((x3186 x3185)) + (let ((x3187 x3186)) + (let ((x3188 x3187)) + (let ((x3189 x3188)) + (let ((x3190 x3189)) + (let ((x3191 x3190)) + (let ((x3192 x3191)) + (let ((x3193 x3192)) + (let ((x3194 x3193)) + (let ((x3195 x3194)) + (let ((x3196 x3195)) + (let ((x3197 x3196)) + (let ((x3198 x3197)) + (let ((x3199 x3198)) + (let ((x3200 x3199)) + (let ((x3201 x3200)) + (let ((x3202 x3201)) + (let ((x3203 x3202)) + (let ((x3204 x3203)) + (let ((x3205 x3204)) + (let ((x3206 x3205)) + (let ((x3207 x3206)) + (let ((x3208 x3207)) + (let ((x3209 x3208)) + (let ((x3210 x3209)) + (let ((x3211 x3210)) + (let ((x3212 x3211)) + (let ((x3213 x3212)) + (let ((x3214 x3213)) + (let ((x3215 x3214)) + (let ((x3216 x3215)) + (let ((x3217 x3216)) + (let ((x3218 x3217)) + (let ((x3219 x3218)) + (let ((x3220 x3219)) + (let ((x3221 x3220)) + (let ((x3222 x3221)) + (let ((x3223 x3222)) + (let ((x3224 x3223)) + (let ((x3225 x3224)) + (let ((x3226 x3225)) + (let ((x3227 x3226)) + (let ((x3228 x3227)) + (let ((x3229 x3228)) + (let ((x3230 x3229)) + (let ((x3231 x3230)) + (let ((x3232 x3231)) + (let ((x3233 x3232)) + (let ((x3234 x3233)) + (let ((x3235 x3234)) + (let ((x3236 x3235)) + (let ((x3237 x3236)) + (let ((x3238 x3237)) + (let ((x3239 x3238)) + (let ((x3240 x3239)) + (let ((x3241 x3240)) + (let ((x3242 x3241)) + (let ((x3243 x3242)) + (let ((x3244 x3243)) + (let ((x3245 x3244)) + (let ((x3246 x3245)) + (let ((x3247 x3246)) + (let ((x3248 x3247)) + (let ((x3249 x3248)) + (let ((x3250 x3249)) + (let ((x3251 x3250)) + (let ((x3252 x3251)) + (let ((x3253 x3252)) + (let ((x3254 x3253)) + (let ((x3255 x3254)) + (let ((x3256 x3255)) + (let ((x3257 x3256)) + (let ((x3258 x3257)) + (let ((x3259 x3258)) + (let ((x3260 x3259)) + (let ((x3261 x3260)) + (let ((x3262 x3261)) + (let ((x3263 x3262)) + (let ((x3264 x3263)) + (let ((x3265 x3264)) + (let ((x3266 x3265)) + (let ((x3267 x3266)) + (let ((x3268 x3267)) + (let ((x3269 x3268)) + (let ((x3270 x3269)) + (let ((x3271 x3270)) + (let ((x3272 x3271)) + (let ((x3273 x3272)) + (let ((x3274 x3273)) + (let ((x3275 x3274)) + (let ((x3276 x3275)) + (let ((x3277 x3276)) + (let ((x3278 x3277)) + (let ((x3279 x3278)) + (let ((x3280 x3279)) + (let ((x3281 x3280)) + (let ((x3282 x3281)) + (let ((x3283 x3282)) + (let ((x3284 x3283)) + (let ((x3285 x3284)) + (let ((x3286 x3285)) + (let ((x3287 x3286)) + (let ((x3288 x3287)) + (let ((x3289 x3288)) + (let ((x3290 x3289)) + (let ((x3291 x3290)) + (let ((x3292 x3291)) + (let ((x3293 x3292)) + (let ((x3294 x3293)) + (let ((x3295 x3294)) + (let ((x3296 x3295)) + (let ((x3297 x3296)) + (let ((x3298 x3297)) + (let ((x3299 x3298)) + (let ((x3300 x3299)) + (let ((x3301 x3300)) + (let ((x3302 x3301)) + (let ((x3303 x3302)) + (let ((x3304 x3303)) + (let ((x3305 x3304)) + (let ((x3306 x3305)) + (let ((x3307 x3306)) + (let ((x3308 x3307)) + (let ((x3309 x3308)) + (let ((x3310 x3309)) + (let ((x3311 x3310)) + (let ((x3312 x3311)) + (let ((x3313 x3312)) + (let ((x3314 x3313)) + (let ((x3315 x3314)) + (let ((x3316 x3315)) + (let ((x3317 x3316)) + (let ((x3318 x3317)) + (let ((x3319 x3318)) + (let ((x3320 x3319)) + (let ((x3321 x3320)) + (let ((x3322 x3321)) + (let ((x3323 x3322)) + (let ((x3324 x3323)) + (let ((x3325 x3324)) + (let ((x3326 x3325)) + (let ((x3327 x3326)) + (let ((x3328 x3327)) + (let ((x3329 x3328)) + (let ((x3330 x3329)) + (let ((x3331 x3330)) + (let ((x3332 x3331)) + (let ((x3333 x3332)) + (let ((x3334 x3333)) + (let ((x3335 x3334)) + (let ((x3336 x3335)) + (let ((x3337 x3336)) + (let ((x3338 x3337)) + (let ((x3339 x3338)) + (let ((x3340 x3339)) + (let ((x3341 x3340)) + (let ((x3342 x3341)) + (let ((x3343 x3342)) + (let ((x3344 x3343)) + (let ((x3345 x3344)) + (let ((x3346 x3345)) + (let ((x3347 x3346)) + (let ((x3348 x3347)) + (let ((x3349 x3348)) + (let ((x3350 x3349)) + (let ((x3351 x3350)) + (let ((x3352 x3351)) + (let ((x3353 x3352)) + (let ((x3354 x3353)) + (let ((x3355 x3354)) + (let ((x3356 x3355)) + (let ((x3357 x3356)) + (let ((x3358 x3357)) + (let ((x3359 x3358)) + (let ((x3360 x3359)) + (let ((x3361 x3360)) + (let ((x3362 x3361)) + (let ((x3363 x3362)) + (let ((x3364 x3363)) + (let ((x3365 x3364)) + (let ((x3366 x3365)) + (let ((x3367 x3366)) + (let ((x3368 x3367)) + (let ((x3369 x3368)) + (let ((x3370 x3369)) + (let ((x3371 x3370)) + (let ((x3372 x3371)) + (let ((x3373 x3372)) + (let ((x3374 x3373)) + (let ((x3375 x3374)) + (let ((x3376 x3375)) + (let ((x3377 x3376)) + (let ((x3378 x3377)) + (let ((x3379 x3378)) + (let ((x3380 x3379)) + (let ((x3381 x3380)) + (let ((x3382 x3381)) + (let ((x3383 x3382)) + (let ((x3384 x3383)) + (let ((x3385 x3384)) + (let ((x3386 x3385)) + (let ((x3387 x3386)) + (let ((x3388 x3387)) + (let ((x3389 x3388)) + (let ((x3390 x3389)) + (let ((x3391 x3390)) + (let ((x3392 x3391)) + (let ((x3393 x3392)) + (let ((x3394 x3393)) + (let ((x3395 x3394)) + (let ((x3396 x3395)) + (let ((x3397 x3396)) + (let ((x3398 x3397)) + (let ((x3399 x3398)) + (let ((x3400 x3399)) + (let ((x3401 x3400)) + (let ((x3402 x3401)) + (let ((x3403 x3402)) + (let ((x3404 x3403)) + (let ((x3405 x3404)) + (let ((x3406 x3405)) + (let ((x3407 x3406)) + (let ((x3408 x3407)) + (let ((x3409 x3408)) + (let ((x3410 x3409)) + (let ((x3411 x3410)) + (let ((x3412 x3411)) + (let ((x3413 x3412)) + (let ((x3414 x3413)) + (let ((x3415 x3414)) + (let ((x3416 x3415)) + (let ((x3417 x3416)) + (let ((x3418 x3417)) + (let ((x3419 x3418)) + (let ((x3420 x3419)) + (let ((x3421 x3420)) + (let ((x3422 x3421)) + (let ((x3423 x3422)) + (let ((x3424 x3423)) + (let ((x3425 x3424)) + (let ((x3426 x3425)) + (let ((x3427 x3426)) + (let ((x3428 x3427)) + (let ((x3429 x3428)) + (let ((x3430 x3429)) + (let ((x3431 x3430)) + (let ((x3432 x3431)) + (let ((x3433 x3432)) + (let ((x3434 x3433)) + (let ((x3435 x3434)) + (let ((x3436 x3435)) + (let ((x3437 x3436)) + (let ((x3438 x3437)) + (let ((x3439 x3438)) + (let ((x3440 x3439)) + (let ((x3441 x3440)) + (let ((x3442 x3441)) + (let ((x3443 x3442)) + (let ((x3444 x3443)) + (let ((x3445 x3444)) + (let ((x3446 x3445)) + (let ((x3447 x3446)) + (let ((x3448 x3447)) + (let ((x3449 x3448)) + (let ((x3450 x3449)) + (let ((x3451 x3450)) + (let ((x3452 x3451)) + (let ((x3453 x3452)) + (let ((x3454 x3453)) + (let ((x3455 x3454)) + (let ((x3456 x3455)) + (let ((x3457 x3456)) + (let ((x3458 x3457)) + (let ((x3459 x3458)) + (let ((x3460 x3459)) + (let ((x3461 x3460)) + (let ((x3462 x3461)) + (let ((x3463 x3462)) + (let ((x3464 x3463)) + (let ((x3465 x3464)) + (let ((x3466 x3465)) + (let ((x3467 x3466)) + (let ((x3468 x3467)) + (let ((x3469 x3468)) + (let ((x3470 x3469)) + (let ((x3471 x3470)) + (let ((x3472 x3471)) + (let ((x3473 x3472)) + (let ((x3474 x3473)) + (let ((x3475 x3474)) + (let ((x3476 x3475)) + (let ((x3477 x3476)) + (let ((x3478 x3477)) + (let ((x3479 x3478)) + (let ((x3480 x3479)) + (let ((x3481 x3480)) + (let ((x3482 x3481)) + (let ((x3483 x3482)) + (let ((x3484 x3483)) + (let ((x3485 x3484)) + (let ((x3486 x3485)) + (let ((x3487 x3486)) + (let ((x3488 x3487)) + (let ((x3489 x3488)) + (let ((x3490 x3489)) + (let ((x3491 x3490)) + (let ((x3492 x3491)) + (let ((x3493 x3492)) + (let ((x3494 x3493)) + (let ((x3495 x3494)) + (let ((x3496 x3495)) + (let ((x3497 x3496)) + (let ((x3498 x3497)) + (let ((x3499 x3498)) + (let ((x3500 x3499)) + x3500 + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +(assert (not f)) +(check-sat) diff --git a/regression/smt2_solver/deep-nesting/deep-operand-chain.desc b/regression/smt2_solver/deep-nesting/deep-operand-chain.desc new file mode 100644 index 00000000000..4814689ff69 --- /dev/null +++ b/regression/smt2_solver/deep-nesting/deep-operand-chain.desc @@ -0,0 +1,13 @@ +CORE +deep-operand-chain.smt2 + +^EXIT=0$ +^SIGNAL=0$ +^sat$ +-- +^\(error +-- +Regression test for the iterative SMT2 expression parser. A deeply right- +associated operand chain `(bvand x (bvand x (bvand x ... x)))` of depth 5000 +is parsed and solved without overflowing the default 8 MB C++ stack. The +recursive operand-collection path segfaults on the same input. diff --git a/regression/smt2_solver/deep-nesting/deep-operand-chain.smt2 b/regression/smt2_solver/deep-nesting/deep-operand-chain.smt2 new file mode 100644 index 00000000000..eb296e07a40 --- /dev/null +++ b/regression/smt2_solver/deep-nesting/deep-operand-chain.smt2 @@ -0,0 +1,11 @@ +; Right-associated (bvand x (bvand x (bvand x ... x))) of depth 3500. +; +; Regression test for the iterative SMT2 expression parser. +; The recursive operand-collection path segfaults on this input at +; depth >= 3000; the iterative path handles it. Result is trivially sat. +(set-logic QF_BV) +(declare-const x (_ BitVec 8)) +(assert (= x + (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x (bvand x x)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +)) +(check-sat) diff --git a/src/solvers/smt2/smt2_parser.cpp b/src/solvers/smt2/smt2_parser.cpp index f233905dd20..d95bc60149f 100644 --- a/src/solvers/smt2/smt2_parser.cpp +++ b/src/solvers/smt2/smt2_parser.cpp @@ -8,8 +8,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "smt2_parser.h" -#include "smt2_format.h" - #include #include #include @@ -20,6 +18,9 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +#include "smt2_format.h" +#include "smt2irep.h" + #include smt2_tokenizert::tokent smt2_parsert::next_token() @@ -121,10 +122,40 @@ void smt2_parsert::ignore_command() exprt::operandst smt2_parsert::operands() { + // If our iterative walker (convert_irep_to_exprt) has pre-computed the + // operands for the handler about to run, consume them here. + if(precollected_operands.has_value()) + { + auto result = std::move(*precollected_operands); + precollected_operands.reset(); + return result; + } + exprt::operandst result; while(smt2_tokenizer.peek() != smt2_tokenizert::CLOSE) - result.push_back(expression()); + { + // For each operand, if it starts with '(' we read it via smt2irep into + // a generic S-expression irept iteratively, then walk that irept + // iteratively to produce the corresponding exprt. This keeps the + // parser stack-safe even for operands that are deeply right-nested + // function applications such as (bvand x (bvand x (bvand x ...))), + // which are common in SMT-COMP QF_ABV benchmarks. + // + // For atomic operands the existing expression() path is used; it + // does not recurse on atoms. + if(smt2_tokenizer.peek() == smt2_tokenizert::OPEN) + { + auto irep_opt = smt2irep(smt2_tokenizer); + if(!irep_opt.has_value()) + throw error("EOF in an operand"); + result.push_back(convert_irep_to_exprt(*irep_opt)); + } + else + { + result.push_back(expression()); + } + } next_token(); // eat the ')' @@ -485,126 +516,134 @@ exprt smt2_parsert::function_application_fp(const exprt::operandst &op) fp_type); } -exprt smt2_parsert::function_application() +exprt smt2_parsert::function_application_with_id(const irep_idt &id) { - switch(next_token()) + if(id == "_") // indexed identifier { - case smt2_tokenizert::SYMBOL: - if(smt2_tokenizer.get_buffer() == "_") // indexed identifier - { - // indexed identifier - if(next_token() != smt2_tokenizert::SYMBOL) - throw error("expected symbol after '_'"); + // indexed identifier + if(next_token() != smt2_tokenizert::SYMBOL) + throw error("expected symbol after '_'"); - // copy, the reference won't be stable - const auto id = smt2_tokenizer.get_buffer(); + // copy, the reference won't be stable + const auto inner_id = smt2_tokenizer.get_buffer(); - if(has_prefix(id, "bv")) - { - mp_integer i = string2integer( - std::string(smt2_tokenizer.get_buffer(), 2, std::string::npos)); + if(has_prefix(inner_id, "bv")) + { + mp_integer i = string2integer( + std::string(smt2_tokenizer.get_buffer(), 2, std::string::npos)); - if(next_token() != smt2_tokenizert::NUMERAL) - throw error("expected numeral as bitvector literal width"); + if(next_token() != smt2_tokenizert::NUMERAL) + throw error("expected numeral as bitvector literal width"); - auto width = std::stoll(smt2_tokenizer.get_buffer()); + auto width = std::stoll(smt2_tokenizer.get_buffer()); - if(next_token() != smt2_tokenizert::CLOSE) - throw error("expected ')' after bitvector literal"); + if(next_token() != smt2_tokenizert::CLOSE) + throw error("expected ')' after bitvector literal"); - return from_integer(i, unsignedbv_typet(width)); - } - else if(id == "+oo" || id == "-oo" || id == "NaN") - { - // These are the "plus infinity", "minus infinity" and NaN - // floating-point literals. - if(next_token() != smt2_tokenizert::NUMERAL) - throw error() << "expected number after " << id; + return from_integer(i, unsignedbv_typet(width)); + } + else if(inner_id == "+oo" || inner_id == "-oo" || inner_id == "NaN") + { + // These are the "plus infinity", "minus infinity" and NaN + // floating-point literals. + if(next_token() != smt2_tokenizert::NUMERAL) + throw error() << "expected number after " << inner_id; - auto width_e = std::stoll(smt2_tokenizer.get_buffer()); + auto width_e = std::stoll(smt2_tokenizer.get_buffer()); - if(next_token() != smt2_tokenizert::NUMERAL) - throw error() << "expected second number after " << id; + if(next_token() != smt2_tokenizert::NUMERAL) + throw error() << "expected second number after " << inner_id; - auto width_f = std::stoll(smt2_tokenizer.get_buffer()); + auto width_f = std::stoll(smt2_tokenizer.get_buffer()); - if(next_token() != smt2_tokenizert::CLOSE) - throw error() << "expected ')' after " << id; + if(next_token() != smt2_tokenizert::CLOSE) + throw error() << "expected ')' after " << inner_id; - // width_f *includes* the hidden bit - const ieee_float_spect spec(width_f - 1, width_e); + // width_f *includes* the hidden bit + const ieee_float_spect spec(width_f - 1, width_e); - if(id == "+oo") - return ieee_floatt::plus_infinity(spec).to_expr(); - else if(id == "-oo") - return ieee_floatt::minus_infinity(spec).to_expr(); - else // NaN - return ieee_floatt::NaN(spec).to_expr(); - } - else - { - throw error() << "unknown indexed identifier " << id; - } + if(inner_id == "+oo") + return ieee_floatt::plus_infinity(spec).to_expr(); + else if(inner_id == "-oo") + return ieee_floatt::minus_infinity(spec).to_expr(); + else // NaN + return ieee_floatt::NaN(spec).to_expr(); } - else if(smt2_tokenizer.get_buffer() == "!") + else { - // these are "term attributes" - const auto term = expression(); + throw error() << "unknown indexed identifier " << inner_id; + } + } + else if(id == "!") + { + // these are "term attributes" + const auto term = expression(); - while(smt2_tokenizer.peek() == smt2_tokenizert::KEYWORD) + while(smt2_tokenizer.peek() == smt2_tokenizert::KEYWORD) + { + next_token(); // eat the keyword + if(smt2_tokenizer.get_buffer() == "named") { - next_token(); // eat the keyword - if(smt2_tokenizer.get_buffer() == "named") - { - // 'named terms' must be Boolean - if(!term.is_boolean()) - throw error("named terms must be Boolean"); + // 'named terms' must be Boolean + if(!term.is_boolean()) + throw error("named terms must be Boolean"); - if(next_token() == smt2_tokenizert::SYMBOL) - { - const symbol_exprt symbol_expr( - smt2_tokenizer.get_buffer(), bool_typet()); - named_terms.emplace( - symbol_expr.identifier(), named_termt(term, symbol_expr)); - } - else - throw error("invalid name attribute, expected symbol"); + if(next_token() == smt2_tokenizert::SYMBOL) + { + const symbol_exprt symbol_expr( + smt2_tokenizer.get_buffer(), bool_typet()); + named_terms.emplace( + symbol_expr.identifier(), named_termt(term, symbol_expr)); } else - throw error("unknown term attribute"); + throw error("invalid name attribute, expected symbol"); } - - if(next_token() != smt2_tokenizert::CLOSE) - throw error("expected ')' at end of term attribute"); else - return term; + throw error("unknown term attribute"); } + + if(next_token() != smt2_tokenizert::CLOSE) + throw error("expected ')' at end of term attribute"); else - { - // non-indexed symbol, look up in expression table - const auto id = smt2_tokenizer.get_buffer(); - const auto e_it = expressions.find(id); - if(e_it != expressions.end()) - return e_it->second(); + return term; + } + else + { + // non-indexed symbol, look up in expression table + const auto e_it = expressions.find(id2string(id)); + if(e_it != expressions.end()) + return e_it->second(); - // get the operands - auto op = operands(); + // get the operands + auto op = operands(); - // rummage through id_map - auto id_it = id_map.find(id); - if(id_it != id_map.end()) + // rummage through id_map + auto id_it = id_map.find(id); + if(id_it != id_map.end()) + { + if(id_it->second.type.id() == ID_mathematical_function) { - if(id_it->second.type.id() == ID_mathematical_function) - { - return function_application(symbol_exprt(id, id_it->second.type), op); - } - else - return symbol_exprt(id, id_it->second.type); + return function_application(symbol_exprt(id, id_it->second.type), op); } else - throw error() << "unknown function symbol '" << id << '\''; + return symbol_exprt(id, id_it->second.type); } - break; + else + throw error() << "unknown function symbol '" << id << '\''; + } + + UNREACHABLE; +} + +exprt smt2_parsert::function_application() +{ + switch(next_token()) + { + case smt2_tokenizert::SYMBOL: + { + const auto id = smt2_tokenizer.get_buffer(); + return function_application_with_id(id); + } case smt2_tokenizert::OPEN: // likely indexed identifier if(smt2_tokenizer.peek() == smt2_tokenizert::SYMBOL) @@ -1008,8 +1047,660 @@ exprt smt2_parsert::bv_mod(const exprt::operandst &operands, bool is_signed) if_exprt(divisor_is_zero, dividend, mod_result)); } +void smt2_parsert::serialize_irept(const irept &ir, std::string &out) +{ + if(ir.get_sub().empty()) + { + out += ir.id_string(); + return; + } + out += '('; + bool first = true; + for(const auto &c : ir.get_sub()) + { + if(!first) + out += ' '; + serialize_irept(c, out); + first = false; + } + out += ')'; +} + +exprt smt2_parsert::convert_irept_via_recursive(const irept &ir) +{ + // Serialize the irept back to SMT-LIB text and evaluate it via + // expression() on a temporarily-swapped tokenizer. This is used as a + // fallback for constructs the iterative walker does not implement + // (quantifiers, 'as const', indexed identifiers such as to_fp). + // + // Because these constructs are not deeply right-nested in practice, the + // short recursion through expression() does not compromise the stack + // safety that motivates the iterative walker. + std::string text; + serialize_irept(ir, text); + + std::istringstream iss(text); + smt2_tokenizert saved{std::move(smt2_tokenizer)}; + smt2_tokenizer = smt2_tokenizert{iss}; + exprt result; + try + { + result = expression(); + } + catch(...) + { + smt2_tokenizer = std::move(saved); + throw; + } + smt2_tokenizer = std::move(saved); + return result; +} + +exprt smt2_parsert::convert_irep_to_exprt(const irept &root) +{ + // Post-order walk over the S-expression irept using an explicit frame + // stack. The existing expressions[] / id_map / function_application_with_id + // machinery is reused for semantic translation: for every function + // application node we pre-compute the operand exprts and pass them to + // the handler via precollected_operands. + // + // Forms handled here: + // - atoms (numerals, bitvector literals, symbols, booleans) + // - (let ((x1 v1) ...) body) + // - (_ bv... n) / (_ +oo e f) / (_ -oo e f) / (_ NaN e f) + // - (! term :named foo ...) + // - ((_ extract ...) op) and other indexed-identifier applications + // - ((as const T) v) + // - regular function applications (head is a SYMBOL) + // + // Quantifiers, lambdas and other unusual forms are not produced by + // smt2irep callers in QF_ABV; if encountered, an error is raised. + + enum staget + { + S_START, + S_CHILDREN_DONE, + S_LET_BINDINGS_DONE, + S_LET_BODY_DONE + }; + + struct framet + { + const irept *node; + staget stage = S_START; + // For let scope management: + std::vector> saved_ids; + std::vector> bindings; + }; + + std::vector frames; + std::vector results; + frames.push_back({&root}); + + auto classify_atom = [this](const std::string &buffer) -> exprt + { + if(buffer.size() >= 2 && buffer[0] == '#' && buffer[1] == 'x') + { + mp_integer value = + string2integer(std::string(buffer, 2, std::string::npos), 16); + const std::size_t width = 4 * (buffer.size() - 2); + CHECK_RETURN(width != 0 && width % 4 == 0); + return from_integer(value, unsignedbv_typet(width)); + } + if(buffer.size() >= 2 && buffer[0] == '#' && buffer[1] == 'b') + { + mp_integer value = + string2integer(std::string(buffer, 2, std::string::npos), 2); + const std::size_t width = buffer.size() - 2; + CHECK_RETURN(width != 0); + return from_integer(value, unsignedbv_typet(width)); + } + // A decimal numeral consists entirely of digits (optionally with a + // single '.' for reals). Note that SMT-LIB symbols are permitted to + // start with '.' (e.g. '.cse28' in let bindings emitted by Z3), so + // first character alone is not enough to classify. + auto looks_like_numeral = [&buffer] + { + if(buffer.empty()) + return false; + bool seen_digit = false; + for(char ch : buffer) + { + if(isdigit(static_cast(ch))) + seen_digit = true; + else if(ch != '.') + return false; + } + return seen_digit; + }; + if(looks_like_numeral()) + return constant_exprt(buffer, integer_typet()); + // Otherwise assume SYMBOL: look up in expressions[] (covers true/false, + // rounding modes, ...) and then in id_map. + const auto e_it = expressions.find(buffer); + if(e_it != expressions.end()) + return e_it->second(); + auto id_it = id_map.find(buffer); + if(id_it != id_map.end()) + return symbol_exprt(buffer, id_it->second.type); + throw error() << "unknown expression '" << buffer << '\''; + }; + + auto is_leaf = [](const irept &ir) { return ir.get_sub().empty(); }; + + while(!frames.empty()) + { + framet &top = frames.back(); + const irept &n = *top.node; + + if(top.stage == S_START) + { + if(is_leaf(n)) + { + results.push_back(classify_atom(n.id_string())); + frames.pop_back(); + continue; + } + + if(n.get_sub().empty()) + throw error("empty s-expression"); + + const irept &head = n.get_sub().front(); + + if(is_leaf(head)) + { + const std::string &head_id = head.id_string(); + + if(head_id == "let") + { + if(n.get_sub().size() != 3) + throw error("malformed let expression"); + const irept &bindings = n.get_sub()[1]; + top.stage = S_LET_BINDINGS_DONE; + // Queue all binding values in reverse so they resolve left-to-right. + for(auto it = bindings.get_sub().rbegin(); + it != bindings.get_sub().rend(); + ++it) + { + if(it->get_sub().size() != 2) + throw error("malformed let binding"); + frames.push_back({&it->get_sub()[1]}); + } + continue; + } + + if(head_id == "_") + { + // (_ bv... N) or (_ +oo e f) etc. — no sub-expressions to convert. + if(n.get_sub().size() < 3) + throw error("malformed indexed identifier"); + const std::string &inner = n.get_sub()[1].id_string(); + if(has_prefix(inner, "bv")) + { + mp_integer i = + string2integer(std::string(inner, 2, std::string::npos)); + auto width_s = n.get_sub()[2].id_string(); + auto width = std::stoll(width_s); + results.push_back(from_integer(i, unsignedbv_typet(width))); + frames.pop_back(); + continue; + } + if(inner == "+oo" || inner == "-oo" || inner == "NaN") + { + if(n.get_sub().size() != 4) + throw error() << "malformed " << inner; + auto width_e = std::stoll(n.get_sub()[2].id_string()); + auto width_f = std::stoll(n.get_sub()[3].id_string()); + const ieee_float_spect spec(width_f - 1, width_e); + if(inner == "+oo") + results.push_back(ieee_floatt::plus_infinity(spec).to_expr()); + else if(inner == "-oo") + results.push_back(ieee_floatt::minus_infinity(spec).to_expr()); + else + results.push_back(ieee_floatt::NaN(spec).to_expr()); + frames.pop_back(); + continue; + } + throw error() << "unknown indexed identifier " << inner; + } + + if(head_id == "!") + { + // (! term :named foo ...) — evaluate term, then process attributes + if(n.get_sub().size() < 2) + throw error("malformed term attribute"); + top.stage = S_CHILDREN_DONE; + frames.push_back({&n.get_sub()[1]}); // the term + continue; + } + + if(head_id == "forall" || head_id == "exists" || head_id == "lambda") + { + // Quantifiers and lambdas introduce bound variables with typed + // sorts. Rather than re-implementing the binding machinery in + // the iterative walker, fall back to the recursive expression() + // path via serialize-and-swap. Quantifier bodies are not deeply + // right-nested in practice. + results.push_back(convert_irept_via_recursive(n)); + frames.pop_back(); + continue; + } + + // Regular function application: queue all operand children. + top.stage = S_CHILDREN_DONE; + for(std::size_t i = n.get_sub().size(); i-- > 1;) + frames.push_back({&n.get_sub()[i]}); + continue; + } + + // head is itself an interior node — ((_ extract ...) op) etc. + const irept &head_head = head.get_sub().front(); + + // Filter out heads that the S_CHILDREN_DONE stage does not + // implement (`((as const T) v)`, `((_ to_fp ...) op)` and its + // unsigned variant). These are handled by the fallback to the + // recursive expression() path instead, so do NOT queue children + // here — the fallback will re-parse from the SMT-LIB text and + // manage its own operand evaluation. + auto indexed_is_handled = [](const std::string &id) + { + return id == "extract" || id == "rotate_left" || id == "rotate_right" || + id == "repeat" || id == "sign_extend" || id == "zero_extend" || + id == "fp.to_sbv" || id == "fp.to_ubv"; + }; + const bool fallback = + is_leaf(head_head) && + ((head_head.id_string() == "_" && head.get_sub().size() >= 2 && + !indexed_is_handled(head.get_sub()[1].id_string())) || + head_head.id_string() == "as"); + if(fallback) + { + results.push_back(convert_irept_via_recursive(n)); + frames.pop_back(); + continue; + } + + if( + is_leaf(head_head) && + (head_head.id_string() == "_" || head_head.id_string() == "as")) + { + // Queue operands (arguments to the indexed identifier / as-const). + top.stage = S_CHILDREN_DONE; + for(std::size_t i = n.get_sub().size(); i-- > 1;) + frames.push_back({&n.get_sub()[i]}); + continue; + } + + throw error("unsupported s-expression head"); + } + + if(top.stage == S_CHILDREN_DONE) + { + const irept &head = n.get_sub().front(); + + if(is_leaf(head)) + { + const irep_idt head_id = head.id_string(); + + if(head_id == "!") + { + // Pop the term from the result stack. + exprt term = std::move(results.back()); + results.pop_back(); + // Process :named attribute pairs, matching the token-based + // implementation in function_application_with_id(). Other + // attributes are not supported here. + for(std::size_t i = 2; i < n.get_sub().size();) + { + const std::string &kw = n.get_sub()[i].id_string(); + if(kw == ":named") + { + if(i + 1 >= n.get_sub().size()) + throw error("expected value after :named"); + if(!term.is_boolean()) + throw error("named terms must be Boolean"); + const std::string &name = n.get_sub()[i + 1].id_string(); + symbol_exprt symbol_expr(name, bool_typet()); + named_terms.emplace( + symbol_expr.identifier(), named_termt(term, symbol_expr)); + i += 2; + } + else + throw error("unknown term attribute"); + } + results.push_back(std::move(term)); + frames.pop_back(); + continue; + } + + // Regular function application: pop operands, dispatch. + const std::size_t nops = n.get_sub().size() - 1; + exprt::operandst ops(nops); + for(std::size_t i = nops; i-- > 0;) + { + ops[i] = std::move(results.back()); + results.pop_back(); + } + + // The handler table expects operands via operands(); we make them + // available through precollected_operands. + precollected_operands = std::move(ops); + try + { + results.push_back(function_application_with_id(head_id)); + } + catch(...) + { + precollected_operands.reset(); + throw; + } + precollected_operands.reset(); + frames.pop_back(); + continue; + } + + // head is a complex sub-expression — ((_ extract ...) op) or + // ((as const T) v). Pop operands first. + const std::size_t nops = n.get_sub().size() - 1; + exprt::operandst ops(nops); + for(std::size_t i = nops; i-- > 0;) + { + ops[i] = std::move(results.back()); + results.pop_back(); + } + + const irept &head_head = head.get_sub().front(); + if(is_leaf(head_head) && head_head.id_string() == "_") + { + // ((_ +) +) + if(head.get_sub().size() < 2) + throw error("malformed indexed identifier"); + const irep_idt id = head.get_sub()[1].id_string(); + + if(id == "extract") + { + if(head.get_sub().size() != 4 || ops.size() != 1) + throw error("extract takes two indices and one operand"); + auto upper = std::stoll(head.get_sub()[2].id_string()); + auto lower = std::stoll(head.get_sub()[3].id_string()); + if(upper < lower) + throw error("extract got bad indices"); + auto lower_e = from_integer(lower, integer_typet()); + unsignedbv_typet t(upper - lower + 1); + results.push_back(extractbits_exprt(ops[0], lower_e, t)); + frames.pop_back(); + continue; + } + + if( + id == "rotate_left" || id == "rotate_right" || id == ID_repeat || + id == "sign_extend" || id == ID_zero_extend) + { + if(head.get_sub().size() != 3 || ops.size() != 1) + throw error() << id << " takes one index and one operand"; + auto index = string2integer(head.get_sub()[2].id_string()); + if(id == "rotate_left") + { + auto dist = from_integer(index, integer_typet()); + results.push_back( + binary_exprt(ops[0], ID_rol, dist, ops[0].type())); + } + else if(id == "rotate_right") + { + auto dist = from_integer(index, integer_typet()); + results.push_back( + binary_exprt(ops[0], ID_ror, dist, ops[0].type())); + } + else if(id == "sign_extend") + { + const auto width = to_unsignedbv_type(ops[0].type()).get_width(); + const signedbv_typet small_signed_type{width}; + const signedbv_typet large_signed_type{width + index}; + const unsignedbv_typet unsigned_type{width + index}; + results.push_back(typecast_exprt( + typecast_exprt( + typecast_exprt(ops[0], small_signed_type), large_signed_type), + unsigned_type)); + } + else if(id == ID_zero_extend) + { + auto width = to_unsignedbv_type(ops[0].type()).get_width(); + unsignedbv_typet unsigned_type{width + index}; + results.push_back(zero_extend_exprt{ops[0], unsigned_type}); + } + else + { + auto i = from_integer(index, integer_typet()); + auto width = to_unsignedbv_type(ops[0].type()).get_width() * index; + results.push_back( + replication_exprt(i, ops[0], unsignedbv_typet(width))); + } + frames.pop_back(); + continue; + } + + if(id == "fp.to_sbv" || id == "fp.to_ubv") + { + if(head.get_sub().size() != 3 || ops.size() != 2) + throw error() << id << " takes one index and two operands"; + auto width = std::stoll(head.get_sub()[2].id_string()); + if(ops[1].type().id() != ID_floatbv) + throw error() << id << " takes a FloatingPoint operand"; + if(id == "fp.to_sbv") + results.push_back(typecast_exprt( + floatbv_typecast_exprt(ops[1], ops[0], signedbv_typet(width)), + unsignedbv_typet(width))); + else + results.push_back( + floatbv_typecast_exprt(ops[1], ops[0], unsignedbv_typet(width))); + frames.pop_back(); + continue; + } + + // For `to_fp` / `to_fp_unsigned` the existing implementation + // depends on whether the source operand is real, integer, bitvector + // or floating-point, and in the real-or-integer case on the + // constant representation. This is handled via the S_START + // fallback to the recursive expression() path. + UNREACHABLE; + } + + if(is_leaf(head_head) && head_head.id_string() == "as") + { + // ((as const T) v) — handled via the S_START fallback. + UNREACHABLE; + } + + throw error("unsupported s-expression head in stage S_CHILDREN_DONE"); + } + + if(top.stage == S_LET_BINDINGS_DONE) + { + // All binding values have been evaluated. The queueing step pushed + // the bindings right-to-left, so the bindings were processed + // left-to-right (LIFO). This means the TOP of results is the + // rightmost binding's value, and the oldest entry on results is + // the leftmost binding's value. + const irept &bindings = n.get_sub()[1]; + const std::size_t nb = bindings.get_sub().size(); + + top.bindings.resize(nb); + for(std::size_t i = 0; i < nb; i++) + { + top.bindings[i].first = bindings.get_sub()[i].get_sub()[0].id_string(); + } + // Pop values in reverse order: top of results is bindings[nb-1]. + for(std::size_t i = nb; i-- > 0;) + { + top.bindings[i].second = std::move(results.back()); + results.pop_back(); + } + + // Install bindings in id_map; record shadows for restoration. + for(const auto &b : top.bindings) + { + auto ins = id_map.insert({b.first, idt{idt::BINDING, b.second}}); + if(!ins.second) + { + top.saved_ids.emplace_back( + ins.first->first, std::move(ins.first->second)); + ins.first->second = idt{idt::BINDING, b.second}; + } + } + + top.stage = S_LET_BODY_DONE; + frames.push_back({&n.get_sub()[2]}); // body + continue; + } + + if(top.stage == S_LET_BODY_DONE) + { + exprt body = std::move(results.back()); + results.pop_back(); + + binding_exprt::variablest variables; + exprt::operandst values; + variables.reserve(top.bindings.size()); + values.reserve(top.bindings.size()); + for(const auto &b : top.bindings) + { + variables.emplace_back(b.first, b.second.type()); + values.push_back(b.second); + } + + for(const auto &b : top.bindings) + id_map.erase(b.first); + for(auto &s : top.saved_ids) + id_map.insert(std::move(s)); + + results.push_back( + let_exprt(std::move(variables), std::move(values), std::move(body))); + frames.pop_back(); + continue; + } + + UNREACHABLE; + } + + POSTCONDITION(results.size() == 1); + return std::move(results.front()); +} + exprt smt2_parsert::expression() { + // Deeply nested (let ((x v)) (let ((y w)) ...)) expressions — common in + // SMT-COMP benchmarks — would otherwise descend recursively once per + // nested let and overflow the call stack. Collect such nested lets on an + // explicit frame stack first, then parse the innermost non-let body, and + // finally walk the frame stack back out to build the let_exprt chain. + // + // Binding values and the innermost body are still parsed recursively; a + // later change breaks recursion for those too. + struct let_framet + { + std::vector> bindings; + std::vector> saved_ids; + }; + std::vector let_stack; + + auto apply_let_frames = [&](exprt body) -> exprt + { + for(auto it = let_stack.rbegin(); it != let_stack.rend(); ++it) + { + if(next_token() != smt2_tokenizert::CLOSE) + throw error("expected ')' after let"); + + binding_exprt::variablest variables; + exprt::operandst values; + variables.reserve(it->bindings.size()); + values.reserve(it->bindings.size()); + for(const auto &b : it->bindings) + { + variables.emplace_back(b.first, b.second.type()); + values.push_back(b.second); + } + + for(const auto &b : it->bindings) + id_map.erase(b.first); + for(auto &saved : it->saved_ids) + id_map.insert(std::move(saved)); + + body = + let_exprt(std::move(variables), std::move(values), std::move(body)); + } + return body; + }; + + while(smt2_tokenizer.peek() == smt2_tokenizert::OPEN) + { + next_token(); // consume '(' + + if(smt2_tokenizer.peek() != smt2_tokenizert::SYMBOL) + { + // '(' not followed by SYMBOL — this is a nested function application + // such as ((_ extract 3 0) op) or bare double parentheses. Let the + // existing function_application() helper consume the head token and + // dispatch. It expects the outer '(' to already be consumed, which + // matches our state here. + return apply_let_frames(function_application()); + } + + next_token(); // consume the head SYMBOL + const auto id = smt2_tokenizer.get_buffer(); + + if(id != "let") + { + // Not a let — dispatch the function application using the already + // consumed head symbol. + return apply_let_frames(function_application_with_id(id)); + } + + // It is a let — parse the bindings and push a frame. + let_framet frame; + + if(next_token() != smt2_tokenizert::OPEN) + throw error("expected bindings after let"); + + while(smt2_tokenizer.peek() == smt2_tokenizert::OPEN) + { + next_token(); // consume '(' + + if(next_token() != smt2_tokenizert::SYMBOL) + throw error("expected symbol in binding"); + + irep_idt bind_id = smt2_tokenizer.get_buffer(); + + // note that the previous bindings are _not_ visible yet + exprt value = expression(); + + if(next_token() != smt2_tokenizert::CLOSE) + throw error("expected ')' after value in binding"); + + frame.bindings.emplace_back(bind_id, std::move(value)); + } + + if(next_token() != smt2_tokenizert::CLOSE) + throw error("expected ')' at end of bindings"); + + // add the bindings to id_map so that they are visible for the body + for(const auto &b : frame.bindings) + { + auto insert_result = + id_map.insert({b.first, idt{idt::BINDING, b.second}}); + if(!insert_result.second) // already there + { + auto &id_entry = *insert_result.first; + frame.saved_ids.emplace_back( + id_entry.first, std::move(id_entry.second)); + id_entry.second = idt{idt::BINDING, b.second}; + } + } + + let_stack.push_back(std::move(frame)); + // loop back to check whether the body of this let is itself a let + } + + // The next token is not '(' — parse an atom. switch(next_token()) { case smt2_tokenizert::SYMBOL: @@ -1019,7 +1710,7 @@ exprt smt2_parsert::expression() // in the expression table? const auto e_it = expressions.find(identifier); if(e_it != expressions.end()) - return e_it->second(); + return apply_let_frames(e_it->second()); // rummage through id_map auto id_it = id_map.find(identifier); @@ -1028,7 +1719,7 @@ exprt smt2_parsert::expression() symbol_exprt symbol_expr(identifier, id_it->second.type); if(smt2_tokenizer.token_is_quoted_symbol()) symbol_expr.set(ID_C_quoted, true); - return std::move(symbol_expr); + return apply_let_frames(std::move(symbol_expr)); } // don't know, give up @@ -1045,7 +1736,7 @@ exprt smt2_parsert::expression() const std::size_t width = 4 * (buffer.size() - 2); CHECK_RETURN(width != 0 && width % 4 == 0); unsignedbv_typet type(width); - return from_integer(value, type); + return apply_let_frames(from_integer(value, type)); } else if(buffer.size() >= 2 && buffer[0] == '#' && buffer[1] == 'b') { @@ -1054,20 +1745,18 @@ exprt smt2_parsert::expression() const std::size_t width = buffer.size() - 2; CHECK_RETURN(width != 0); unsignedbv_typet type(width); - return from_integer(value, type); + return apply_let_frames(from_integer(value, type)); } else { - return constant_exprt(buffer, integer_typet()); + return apply_let_frames(constant_exprt(buffer, integer_typet())); } } - case smt2_tokenizert::OPEN: // function application - return function_application(); - case smt2_tokenizert::END_OF_FILE: throw error("EOF in an expression"); + case smt2_tokenizert::OPEN: case smt2_tokenizert::CLOSE: case smt2_tokenizert::STRING_LITERAL: case smt2_tokenizert::NONE: diff --git a/src/solvers/smt2/smt2_parser.h b/src/solvers/smt2/smt2_parser.h index cc923e6b67e..36b3a218226 100644 --- a/src/solvers/smt2/smt2_parser.h +++ b/src/solvers/smt2/smt2_parser.h @@ -9,14 +9,17 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_SOLVERS_SMT2_SMT2_PARSER_H #define CPROVER_SOLVERS_SMT2_SMT2_PARSER_H -#include -#include - #include #include #include "smt2_tokenizer.h" +#include +#include +#include + +class irept; + class smt2_parsert { public: @@ -150,12 +153,41 @@ class smt2_parsert void setup_expressions(); exprt expression(); exprt function_application(); + exprt function_application_with_id(const irep_idt &id); exprt function_application_ieee_float_op( const irep_idt &, const exprt::operandst &); exprt function_application_ieee_float_eq(const exprt::operandst &); exprt function_application_fp(const exprt::operandst &); exprt::operandst operands(); + + /// When set, the next call to operands() takes these as its result rather + /// than reading further from the tokenizer. Used by the iterative + /// walker in convert_irep_to_exprt() to feed pre-computed operand + /// exprts to the expressions[] / id_map dispatch logic in + /// function_application_with_id(). + std::optional precollected_operands; + + /// Convert a generic S-expression irept (as produced by smt2irep()) + /// into the corresponding exprt without using the C++ call stack for + /// tree traversal: both operand collection and nested 'let' scoping are + /// driven by an explicit work-list of frames. For simple function + /// applications the existing tokenizer-based machinery is reused by + /// dispatching through function_application_with_id() with + /// precollected_operands populated from the walk's result stack. + exprt convert_irep_to_exprt(const irept &); + + /// Append the SMT-LIB text form of \p ir to \p out, using the same + /// conventions as smt2irep(): leaves are emitted verbatim, interior + /// nodes are wrapped in parentheses with children space-separated. + static void serialize_irept(const irept &ir, std::string &out); + + /// Fallback used by convert_irep_to_exprt(): serialize \p ir back to + /// SMT-LIB text, temporarily redirect the parser's tokenizer to that + /// text, and evaluate via expression(). Used for constructs that the + /// iterative walker does not implement directly (quantifiers, 'as const', + /// indexed identifiers such as to_fp). + exprt convert_irept_via_recursive(const irept &ir); typet function_signature_declaration(); signature_with_parameter_idst function_signature_definition(); void check_matching_operand_types(const exprt::operandst &) const; diff --git a/src/solvers/smt2/smt2_solver.cpp b/src/solvers/smt2/smt2_solver.cpp index 9d0652f7989..50e18170add 100644 --- a/src/solvers/smt2/smt2_solver.cpp +++ b/src/solvers/smt2/smt2_solver.cpp @@ -73,46 +73,73 @@ void smt2_solvert::define_constants() void smt2_solvert::expand_function_applications(exprt &expr) { - for(exprt &op : expr.operands()) - expand_function_applications(op); - - if(expr.id()==ID_function_application) + // Post-order walk, but iterative: the recursive form would overflow the + // call stack on deeply-nested expressions produced by the parser (e.g. + // chains of thousands of bvand / store operations in SMT-COMP QF_ABV + // benchmarks). We do the rewrite in two passes over an explicit stack + // of exprt pointers: first collect every node in post-order, then + // process them bottom-up. Each node's operands have already been + // rewritten by the time we get to it, matching the old recursive + // semantics. + std::vector post_order; { - auto &app=to_function_application_expr(expr); - - if(app.function().id() == ID_symbol) + std::vector work; + work.push_back(&expr); + while(!work.empty()) { - // look up the symbol - auto identifier = to_symbol_expr(app.function()).identifier(); - auto f_it = id_map.find(identifier); + exprt *cur = work.back(); + work.pop_back(); + post_order.push_back(cur); + for(exprt &op : cur->operands()) + work.push_back(&op); + } + } + // post_order now has the root first and leaves last; reverse-iterate + // to process leaves before their ancestors. + for(auto it = post_order.rbegin(); it != post_order.rend(); ++it) + { + exprt &e = **it; + if(e.id() != ID_function_application) + continue; - if(f_it != id_map.end()) - { - const auto &f = f_it->second; + auto &app = to_function_application_expr(e); - DATA_INVARIANT( - f.type.id() == ID_mathematical_function, - "type of function symbol must be mathematical_function_type"); + if(app.function().id() != ID_symbol) + continue; - const auto &domain = to_mathematical_function_type(f.type).domain(); + // look up the symbol + auto identifier = to_symbol_expr(app.function()).identifier(); + auto f_it = id_map.find(identifier); - DATA_INVARIANT( - domain.size() == app.arguments().size(), - "number of parameters must match number of arguments"); + if(f_it == id_map.end()) + continue; - // Does it have a definition? It's otherwise uninterpreted. - if(!f.definition.is_nil()) - { - exprt body = f.definition; + const auto &f = f_it->second; - if(body.id() == ID_lambda) - body = to_lambda_expr(body).application(app.arguments()); + DATA_INVARIANT( + f.type.id() == ID_mathematical_function, + "type of function symbol must be mathematical_function_type"); - expand_function_applications(body); // rec. call - expr = body; - } - } - } + const auto &domain = to_mathematical_function_type(f.type).domain(); + + DATA_INVARIANT( + domain.size() == app.arguments().size(), + "number of parameters must match number of arguments"); + + // Does it have a definition? It's otherwise uninterpreted. + if(f.definition.is_nil()) + continue; + + exprt body = f.definition; + + if(body.id() == ID_lambda) + body = to_lambda_expr(body).application(app.arguments()); + + // The body may itself contain function applications that need + // expanding. It has not been part of our walk, so recurse here. + // Bodies are typically shallow — this is the pre-existing behaviour. + expand_function_applications(body); + e = body; } } diff --git a/src/solvers/smt2/smt2irep.cpp b/src/solvers/smt2/smt2irep.cpp index 9eeeb58921a..a3277f3da77 100644 --- a/src/solvers/smt2/smt2irep.cpp +++ b/src/solvers/smt2/smt2irep.cpp @@ -14,74 +14,82 @@ Author: Daniel Kroening, kroening@kroening.com #include "smt2_tokenizer.h" -class smt2irept:public smt2_tokenizert +class smt2irept { public: - smt2irept(std::istream &_in, message_handlert &message_handler) - : smt2_tokenizert(_in), log(message_handler) + explicit smt2irept(smt2_tokenizert &_tokenizer) + : tokenizer(_tokenizer) { } std::optional operator()(); protected: - messaget log; + smt2_tokenizert &tokenizer; }; std::optional smt2irept::operator()() { - try - { - std::stack stack; + std::stack stack; - while(true) + while(true) + { + switch(tokenizer.next_token()) { - switch(next_token()) + case smt2_tokenizert::END_OF_FILE: + if(stack.empty()) + return {}; + else + throw tokenizer.error("unexpected end of file"); + + case smt2_tokenizert::STRING_LITERAL: + case smt2_tokenizert::NUMERAL: + case smt2_tokenizert::SYMBOL: + if(stack.empty()) + return irept(tokenizer.get_buffer()); // all done! + else + stack.top().get_sub().push_back(irept(tokenizer.get_buffer())); + break; + + case smt2_tokenizert::OPEN: // '(' + // produce sub-irep + stack.push(irept()); + break; + + case smt2_tokenizert::CLOSE: // ')' + // done with sub-irep + if(stack.empty()) + throw tokenizer.error("unexpected ')'"); + else { - case END_OF_FILE: - if(stack.empty()) - return {}; - else - throw error("unexpected end of file"); + irept tmp = stack.top(); + stack.pop(); - case STRING_LITERAL: - case NUMERAL: - case SYMBOL: if(stack.empty()) - return irept(buffer); // all done! - else - stack.top().get_sub().push_back(irept(buffer)); - break; + return tmp; // all done! - case OPEN: // '(' - // produce sub-irep - stack.push(irept()); + stack.top().get_sub().push_back(tmp); break; - - case CLOSE: // ')' - // done with sub-irep - if(stack.empty()) - throw error("unexpected ')'"); - else - { - irept tmp = stack.top(); - stack.pop(); - - if(stack.empty()) - return tmp; // all done! - - stack.top().get_sub().push_back(tmp); - break; - } - - case NONE: - case KEYWORD: - throw error("unexpected token"); } + + case smt2_tokenizert::NONE: + case smt2_tokenizert::KEYWORD: + throw tokenizer.error("unexpected token"); } } - catch(const smt2_errort &e) +} + +std::optional +smt2irep(std::istream &in, message_handlert &message_handler) +{ + try + { + smt2_tokenizert tokenizer{in}; + return smt2irept{tokenizer}(); + } + catch(const smt2_tokenizert::smt2_errort &e) { + messaget log{message_handler}; log.error().source_location.set_line(e.get_line_no()); log.error() << e.what() << messaget::eom; return {}; @@ -89,7 +97,7 @@ std::optional smt2irept::operator()() } std::optional -smt2irep(std::istream &in, message_handlert &message_handler) +smt2irep(smt2_tokenizert &tokenizer) { - return smt2irept(in, message_handler)(); + return smt2irept{tokenizer}(); } diff --git a/src/solvers/smt2/smt2irep.h b/src/solvers/smt2/smt2irep.h index bc2a03748c3..c402f1b5f7d 100644 --- a/src/solvers/smt2/smt2irep.h +++ b/src/solvers/smt2/smt2irep.h @@ -16,8 +16,16 @@ Author: Daniel Kroening, kroening@kroening.com class irept; class message_handlert; -/// returns an irep for an SMT-LIB2 expression read from a given stream -/// returns {} when EOF is encountered before reading non-whitespace input +/// Returns an irep for an SMT-LIB2 expression read from a given stream +/// Returns {} when EOF is encountered before reading non-whitespace input +/// or on other parsing errors. std::optional smt2irep(std::istream &, message_handlert &); +class smt2_tokenizert; + +/// Returns an irep for an SMT-LIB2 expression read from a given tokenizer. +/// Returns {} when EOF is encountered before reading non-whitespace input. +/// Throws smt2_errort on parsing errors. +std::optional smt2irep(smt2_tokenizert &); + #endif // CPROVER_SOLVERS_SMT2_SMT2IREP_H