CoolFace
Datasetpublic

GSaha567/seq_level_training_data

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes52downloads
shard_000011.csv94878 linesDownload Raw Back to root
1text,length,is_long_context,metric_val,label_metric2"TYPES: BEGIN OF t_input,3         row TYPE string,4       END OF t_input.5 6* Input declaration7DATA: lv_input TYPE TABLE OF t_input,8      wa_input LIKE LINE OF lv_input.9 10* Assign with the puzzle input.11lv_input = VALUE #(12 ( row = 'acc +15' )13 ( row = 'jmp +461' )14 ( row = 'acc +6' )15 ( row = 'nop +445' )16 ( row = 'jmp +324' )17 ( row = 'jmp +253' )18 ( row = 'acc -4' )19 ( row = 'acc +22' )20 ( row = 'acc +11' )21 ( row = 'jmp +471' )22 ( row = 'jmp +145' )23 ( row = 'acc +19' )24 ( row = 'jmp -7' )25 ( row = 'jmp +431' )26 ( row = 'nop +66' )27 ( row = 'acc +48' )28 ( row = 'jmp +409' )29 ( row = 'jmp +514' )30 ( row = 'jmp +1' )31 ( row = 'acc +32' )32 ( row = 'jmp +552' )33 ( row = 'acc +21' )34 ( row = 'jmp +317' )35 ( row = 'nop +488' )36 ( row = 'jmp +500' )37 ( row = 'jmp +214' )38 ( row = 'acc +41' )39 ( row = 'jmp +17' )40 ( row = 'acc +19' )41 ( row = 'jmp +1' )42 ( row = 'acc +28' )43 ( row = 'jmp +74' )44 ( row = 'acc +37' )45 ( row = 'acc +46' )46 ( row = 'acc -10' )47 ( row = 'jmp +455' )48 ( row = 'acc +33' )49 ( row = 'jmp +585' )50 ( row = 'acc -13' )51 ( row = 'acc +18' )52 ( row = 'jmp +19' )53 ( row = 'jmp +601' )54 ( row = 'acc +30' )55 ( row = 'jmp +272' )56 ( row = 'acc +18' )57 ( row = 'acc +50' )58 ( row = 'acc +1' )59 ( row = 'acc +29' )60 ( row = 'jmp +50' )61 ( row = 'nop +573' )62 ( row = 'jmp +562' )63 ( row = 'nop +274' )64 ( row = 'jmp +1' )65 ( row = 'acc +6' )66 ( row = 'jmp +1' )67 ( row = 'jmp +64' )68 ( row = 'jmp +1' )69 ( row = 'acc +37' )70 ( row = 'jmp +161' )71 ( row = 'nop +549' )72 ( row = 'acc +21' )73 ( row = 'jmp +1' )74 ( row = 'nop +325' )75 ( row = 'jmp +331' )76 ( row = 'acc +0' )77 ( row = 'acc +25' )78 ( row = 'jmp +431' )79 ( row = 'nop +349' )80 ( row = 'jmp +45' )81 ( row = 'acc +37' )82 ( row = 'acc +9' )83 ( row = 'jmp +354' )84 ( row = 'jmp +132' )85 ( row = 'jmp +307' )86 ( row = 'jmp +1' )87 ( row = 'nop +465' )88 ( row = 'jmp +386' )89 ( row = 'acc +13' )90 ( row = 'acc +20' )91 ( row = 'jmp -20' )92 ( row = 'acc -15' )93 ( row = 'nop +158' )94 ( row = 'jmp +415' )95 ( row = 'acc +33' )96 ( row = 'acc +40' )97 ( row = 'acc +38' )98 ( row = 'acc -2' )99 ( row = 'jmp +81' )100 ( row = 'acc +44' )101 ( row = 'acc +9' )102 ( row = 'acc +15' )103 ( row = 'nop +139' )104 ( row = 'jmp -18' )105 ( row = 'nop +187' )106 ( row = 'acc +47' )107 ( row = 'acc +45' )108 ( row = 'acc +40' )109 ( row = 'jmp +456' )110 ( row = 'acc +48' )111 ( row = 'jmp +1' )112 ( row = 'jmp -75' )113 ( row = 'acc +11' )114 ( row = 'acc -13' )115 ( row = 'nop +222' )116 ( row = 'jmp +202' )117 ( row = 'acc +38' )118 ( row = 'acc +31' )119 ( row = 'acc -11' )120 ( row = 'acc +1' )121 ( row = 'jmp +431' )122 ( row = 'acc +37' )123 ( row = 'nop +195' )124 ( row = 'jmp +118' )125 ( row = 'acc -8' )126 ( row = 'jmp +1' )127 ( row = 'jmp +154' )128 ( row = 'acc +7' )129 ( row = 'acc +13' )130 ( row = 'jmp +43' )131 ( row = 'jmp +507' )132 ( row = 'acc -2' )133 ( row = 'acc +11' )134 ( row = 'jmp +465' )135 ( row = 'acc -12' )136 ( row = 'nop -103' )137 ( row = 'jmp +50' )138 ( row = 'acc +2' )139 ( row = 'nop +4' )140 ( row = 'acc +46' )141 ( row = 'acc +17' )142 ( row = 'jmp +100' )143 ( row = 'nop +149' )144 ( row = 'jmp +397' )145 ( row = 'nop -28' )146 ( row = 'jmp +236' )147 ( row = 'acc +0' )148 ( row = 'nop +465' )149 ( row = 'acc +19' )150 ( row = 'acc -5' )151 ( row = 'jmp +91' )152 ( row = 'jmp +118' )153 ( row = 'acc -3' )154 ( row = 'nop +176' )155 ( row = 'acc +8' )156 ( row = 'jmp +24' )157 ( row = 'jmp +235' )158 ( row = 'acc -7' )159 ( row = 'nop -1' )160 ( row = 'nop +347' )161 ( row = 'acc +33' )162 ( row = 'jmp +165' )163 ( row = 'acc -18' )164 ( row = 'acc +9' )165 ( row = 'acc -8' )166 ( row = 'jmp +179' )167 ( row = 'acc -3' )168 ( row = 'acc +40' )169 ( row = 'jmp +1' )170 ( row = 'acc +5' )171 ( row = 'jmp +475' )172 ( row = 'jmp +70' )173 ( row = 'acc +50' )174 ( row = 'acc -1' )175 ( row = 'acc -11' )176 ( row = 'acc +43' )177 ( row = 'jmp +283' )178 ( row = 'nop +114' )179 ( row = 'jmp +161' )180 ( row = 'acc -19' )181 ( row = 'acc +50' )182 ( row = 'acc +47' )183 ( row = 'acc +49' )184 ( row = 'jmp +381' )185 ( row = 'jmp +1' )186 ( row = 'jmp -94' )187 ( row = 'nop +373' )188 ( row = 'acc +26' )189 ( row = 'acc +7' )190 ( row = 'jmp +41' )191 ( row = 'acc -7' )192 ( row = 'jmp +264' )193 ( row = 'nop -40' )194 ( row = 'acc +23' )195 ( row = 'jmp -60' )196 ( row = 'acc +15' )197 ( row = 'acc +19' )198 ( row = 'acc +39' )199 ( row = 'acc -16' )200 ( row = 'jmp +283' )201 ( row = 'acc +4' )202 ( row = 'jmp +258' )203 ( row = 'acc +0' )204 ( row = 'acc +38' )205 ( row = 'acc -6' )206 ( row = 'jmp +32' )207 ( row = 'acc +33' )208 ( row = 'jmp +1' )209 ( row = 'acc -4' )210 ( row = 'acc +17' )211 ( row = 'jmp +149' )212 ( row = 'acc -17' )213 ( row = 'acc +39' )214 ( row = 'nop +75' )215 ( row = 'jmp -136' )216 ( row = 'acc +6' )217 ( row = 'acc +10' )218 ( row = 'jmp +1' )219 ( row = 'acc +9' )220 ( row = 'jmp +390' )221 ( row = 'jmp +363' )222 ( row = 'acc +32' )223 ( row = 'jmp +95' )224 ( row = 'jmp -71' )225 ( row = 'acc +12' )226 ( row = 'jmp +86' )227 ( row = 'acc +49' )228 ( row = 'acc +2' )229 ( row = 'acc +0' )230 ( row = 'jmp +139' )231 ( row = 'nop +363' )232 ( row = 'acc +21' )233 ( row = 'jmp +366' )234 ( row = 'jmp +1' )235 ( row = 'acc +16' )236 ( row = 'acc -13' )237 ( row = 'jmp +55' )238 ( row = 'jmp -159' )239 ( row = 'acc +46' )240 ( row = 'acc +50' )241 ( row = 'jmp +266' )242 ( row = 'acc +2' )243 ( row = 'jmp -180' )244 ( row = 'jmp -181' )245 ( row = 'acc +41' )246 ( row = 'acc -3' )247 ( row = 'nop -176' )248 ( row = 'jmp +121' )249 ( row = 'acc +23' )250 ( row = 'jmp +281' )251 ( row = 'acc +5' )252 ( row = 'acc +14' )253 ( row = 'acc -8' )254 ( row = 'jmp +128' )255 ( row = 'jmp +281' )256 ( row = 'nop +81' )257 ( row = 'jmp +1' )258 ( row = 'acc +36' )259 ( row = 'acc +34' )260 ( row = 'jmp -176' )261 ( row = 'acc +8' )262 ( row = 'jmp +309' )263 ( row = 'acc +11' )264 ( row = 'nop -77' )265 ( row = 'jmp -40' )266 ( row = 'acc +0' )267 ( row = 'acc +8' )268 ( row = 'acc +14' )269 ( row = 'jmp +296' )270 ( row = 'nop +197' )271 ( row = 'nop -124' )272 ( row = 'acc +38' )273 ( row = 'acc +9' )274 ( row = 'jmp +310' )275 ( row = 'jmp -183' )276 ( row = 'jmp +353' )277 ( row = 'acc +28' )278 ( row = 'acc -18' )279 ( row = 'nop +120' )280 ( row = 'jmp -217' )281 ( row = 'acc +49' )282 ( row = 'acc +38' )283 ( row = 'jmp -243' )284 ( row = 'nop -68' )285 ( row = 'acc +9' )286 ( row = 'acc +15' )287 ( row = 'nop +43' )288 ( row = 'jmp -46' )289 ( row = 'acc -4' )290 ( row = 'jmp +262' )291 ( row = 'jmp +176' )292 ( row = 'nop -139' )293 ( row = 'acc +38' )294 ( row = 'acc +35' )295 ( row = 'acc -8' )296 ( row = 'jmp -225' )297 ( row = 'acc +37' )298 ( row = 'acc +49' )299 ( row = 'acc +42' )300 ( row = 'nop +278' )301 ( row = 'jmp +264' )302 ( row = 'acc -11' )303 ( row = 'nop +291' )304 ( row = 'acc +21' )305 ( row = 'nop -221' )306 ( row = 'jmp +80' )307 ( row = 'acc +15' )308 ( row = 'acc +13' )309 ( row = 'acc +2' )310 ( row = 'nop -40' )311 ( row = 'jmp +309' )312 ( row = 'acc -18' )313 ( row = 'acc -5' )314 ( row = 'acc +24' )315 ( row = 'jmp -70' )316 ( row = 'acc +12' )317 ( row = 'jmp -261' )318 ( row = 'acc +4' )319 ( row = 'acc -2' )320 ( row = 'acc +3' )321 ( row = 'jmp +1' )322 ( row = 'jmp +302' )323 ( row = 'acc -7' )324 ( row = 'jmp +1' )325 ( row = 'acc +39' )326 ( row = 'jmp +73' )327 ( row = 'jmp +18' )328 ( row = 'acc +3' )329 ( row = 'jmp +277' )330 ( row = 'acc +4' )331 ( row = 'nop +125' )332 ( row = 'nop -284' )333 ( row = 'acc +41' )334 ( row = 'jmp -312' )335 ( row = 'acc +13' )336 ( row = 'jmp -183' )337 ( row = 'nop -35' )338 ( row = 'jmp -137' )339 ( row = 'jmp -76' )340 ( row = 'acc +1' )341 ( row = 'acc +31' )342 ( row = 'acc +39' )343 ( row = 'jmp +56' )344 ( row = 'jmp +290' )345 ( row = 'jmp +1' )346 ( row = 'acc +12' )347 ( row = 'nop +71' )348 ( row = 'acc +43' )349 ( row = 'jmp -296' )350 ( row = 'jmp +68' )351 ( row = 'acc -14' )352 ( row = 'acc +35' )353 ( row = 'nop -290' )354 ( row = 'jmp -24' )355 ( row = 'acc +39' )356 ( row = 'acc -8' )357 ( row = 'nop +110' )358 ( row = 'jmp +1' )359 ( row = 'jmp +78' )360 ( row = 'acc +11' )361 ( row = 'acc +9' )362 ( row = 'acc -11' )363 ( row = 'acc +50' )364 ( row = 'jmp +167' )365 ( row = 'acc +50' )366 ( row = 'acc +19' )367 ( row = 'acc +0' )368 ( row = 'jmp -221' )369 ( row = 'acc -4' )370 ( row = 'acc -6' )371 ( row = 'nop +11' )372 ( row = 'acc +49' )373 ( row = 'jmp -348' )374 ( row = 'nop +197' )375 ( row = 'acc +6' )376 ( row = 'jmp -196' )377 ( row = 'nop -155' )378 ( row = 'jmp -76' )379 ( row = 'acc +50' )380 ( row = 'acc -8' )381 ( row = 'jmp -89' )382 ( row = 'acc +9' )383 ( row = 'jmp +255' )384 ( row = 'acc +25' )385 ( row = 'jmp +199' )386 ( row = 'jmp -35' )387 ( row = 'acc +46' )388 ( row = 'acc +25' )389 ( row = 'jmp +1' )390 ( row = 'acc +32' )391 ( row = 'jmp -31' )392 ( row = 'acc -3' )393 ( row = 'acc -5' )394 ( row = 'jmp +73' )395 ( row = 'acc +7' )396 ( row = 'acc +22' )397 ( row = 'acc -15' )398 ( row = 'jmp +145' )399 ( row = 'nop -97' )400 ( row = 'acc +47' )401 ( row = 'acc +22' )402 ( row = 'jmp -110' )403 ( row = 'acc +44' )404 ( row = 'acc +4' )405 ( row = 'jmp -383' )406 ( row = 'acc +34' )407 ( row = 'jmp +1' )408 ( row = 'jmp +16' )409 ( row = 'nop -128' )410 ( row = 'acc +43' )411 ( row = 'jmp -34' )412 ( row = 'nop +95' )413 ( row = 'acc +3' )414 ( row = 'jmp +4' )415 ( row = 'acc +13' )416 ( row = 'acc -2' )417 ( row = 'jmp -90' )418 ( row = 'acc +39' )419 ( row = 'jmp +187' )420 ( row = 'acc +24' )421 ( row = 'acc +23' )422 ( row = 'acc +42' )423 ( row = 'jmp -11' )424 ( row = 'jmp -281' )425 ( row = 'jmp +1' )426 ( row = 'acc +25' )427 ( row = 'jmp -157' )428 ( row = 'acc +3' )429 ( row = 'acc -3' )430 ( row = 'nop -24' )431 ( row = 'acc -13' )432 ( row = 'jmp -46' )433 ( row = 'acc +10' )434 ( row = 'acc +16' )435 ( row = 'nop -7' )436 ( row = 'jmp -289' )437 ( row = 'nop -408' )438 ( row = 'acc -5' )439 ( row = 'acc +23' )440 ( row = 'nop +91' )441 ( row = 'jmp -234' )442 ( row = 'acc +0' )443 ( row = 'acc +4' )444 ( row = 'acc +15' )445 ( row = 'acc -15' )446 ( row = 'jmp -367' )447 ( row = 'acc +32' )448 ( row = 'acc -9' )449 ( row = 'acc +13' )450 ( row = 'jmp -194' )451 ( row = 'acc +38' )452 ( row = 'nop +126' )453 ( row = 'acc +1' )454 ( row = 'nop +124' )455 ( row = 'jmp -275' )456 ( row = 'acc -14' )457 ( row = 'acc +26' )458 ( row = 'jmp +55' )459 ( row = 'jmp -388' )460 ( row = 'acc +3' )461 ( row = 'acc +8' )462 ( row = 'acc +31' )463 ( row = 'acc +34' )464 ( row = 'jmp -372' )465 ( row = 'acc +45' )466 ( row = 'jmp -115' )467 ( row = 'acc -6' )468 ( row = 'acc +47' )469 ( row = 'acc -17' )470 ( row = 'acc +29' )471 ( row = 'jmp -438' )472 ( row = 'acc +33' )473 ( row = 'jmp -113' )474 ( row = 'jmp -301' )475 ( row = 'jmp -396' )476 ( row = 'acc +46' )477 ( row = 'jmp -284' )478 ( row = 'acc -14' )479 ( row = 'acc +11' )480 ( row = 'acc +20' )481 ( row = 'nop -356' )482 ( row = 'jmp -445' )483 ( row = 'acc +20' )484 ( row = 'acc -6' )485 ( row = 'acc -8' )486 ( row = 'jmp +134' )487 ( row = 'nop +54' )488 ( row = 'acc +33' )489 ( row = 'jmp +1' )490 ( row = 'acc +3' )491 ( row = 'jmp +108' )492 ( row = 'acc +14' )493 ( row = 'nop +67' )494 ( row = 'nop -66' )495 ( row = 'acc +45' )496 ( row = 'jmp +117' )497 ( row = 'acc +45' )498 ( row = 'acc +42' )499 ( row = 'acc +25' )500 ( row = 'acc -18' )501 ( row = 'jmp -354' )502 ( row = 'acc +8' )503 ( row = 'jmp -240' )504 ( row = 'nop -373' )505 ( row = 'acc -8' )506 ( row = 'jmp +72' )507 ( row = 'jmp -95' )508 ( row = 'jmp -350' )509 ( row = 'jmp -62' )510 ( row = 'acc +6' )511 ( row = 'acc -18' )512 ( row = 'jmp +108' )513 ( row = 'acc +14' )514 ( row = 'acc +11' )515 ( row = 'nop -164' )516 ( row = 'acc +4' )517 ( row = 'jmp +6' )518 ( row = 'acc +24' )519 ( row = 'acc +11' )520 ( row = 'acc -7' )521 ( row = 'acc +27' )522 ( row = 'jmp -171' )523 ( row = 'acc +23' )524 ( row = 'acc +36' )525 ( row = 'acc +20' )526 ( row = 'acc +42' )527 ( row = 'jmp -51' )528 ( row = 'acc +28' )529 ( row = 'acc +10' )530 ( row = 'jmp -218' )531 ( row = 'nop +63' )532 ( row = 'jmp -294' )533 ( row = 'acc -10' )534 ( row = 'nop +44' )535 ( row = 'jmp +43' )536 ( row = 'jmp -444' )537 ( row = 'acc +20' )538 ( row = 'acc +39' )539 ( row = 'acc +29' )540 ( row = 'jmp -507' )541 ( row = 'jmp -265' )542 ( row = 'jmp -471' )543 ( row = 'nop +17' )544 ( row = 'acc +39' )545 ( row = 'acc +4' )546 ( row = 'jmp -54' )547 ( row = 'acc +1' )548 ( row = 'nop -448' )549 ( row = 'acc -18' )550 ( row = 'acc +3' )551 ( row = 'jmp -495' )552 ( row = 'acc +17' )553 ( row = 'acc +16' )554 ( row = 'jmp +6' )555 ( row = 'acc +6' )556 ( row = 'acc +0' )557 ( row = 'jmp +1' )558 ( row = 'acc -15' )559 ( row = 'jmp -317' )560 ( row = 'jmp -77' )561 ( row = 'acc +4' )562 ( row = 'acc +30' )563 ( row = 'acc -3' )564 ( row = 'jmp -187' )565 ( row = 'acc -11' )566 ( row = 'nop -189' )567 ( row = 'nop -488' )568 ( row = 'jmp -140' )569 ( row = 'acc +50' )570 ( row = 'jmp -142' )571 ( row = 'nop -211' )572 ( row = 'jmp -166' )573 ( row = 'acc -12' )574 ( row = 'acc +7' )575 ( row = 'acc +32' )576 ( row = 'acc +40' )577 ( row = 'jmp -384' )578 ( row = 'jmp -186' )579 ( row = 'nop -261' )580 ( row = 'acc +32' )581 ( row = 'acc +19' )582 ( row = 'acc +44' )583 ( row = 'jmp +16' )584 ( row = 'acc +15' )585 ( row = 'acc +30' )586 ( row = 'nop -476' )587 ( row = 'acc +9' )588 ( row = 'jmp -299' )589 ( row = 'acc -17' )590 ( row = 'acc -17' )591 ( row = 'acc -4' )592 ( row = 'acc +44' )593 ( row = 'jmp -133' )594 ( row = 'jmp -58' )595 ( row = 'acc +21' )596 ( row = 'acc +4' )597 ( row = 'acc -19' )598 ( row = 'jmp -170' )599 ( row = 'acc +32' )600 ( row = 'acc -3' )601 ( row = 'jmp -363' )602 ( row = 'acc +48' )603 ( row = 'acc +9' )604 ( row = 'acc +48' )605 ( row = 'jmp +5' )606 ( row = 'acc +30' )607 ( row = 'acc +40' )608 ( row = 'jmp -450' )609 ( row = 'jmp -282' )610 ( row = 'jmp -388' )611 ( row = 'acc +12' )612 ( row = 'jmp -361' )613 ( row = 'acc -6' )614 ( row = 'jmp -237' )615 ( row = 'acc +27' )616 ( row = 'acc +16' )617 ( row = 'acc -19' )618 ( row = 'acc -5' )619 ( row = 'jmp -145' )620 ( row = 'acc +38' )621 ( row = 'jmp -565' )622 ( row = 'nop -341' )623 ( row = 'jmp +11' )624 ( row = 'acc +22' )625 ( row = 'nop -219' )626 ( row = 'jmp -597' )627 ( row = 'acc +33' )628 ( row = 'jmp -572' )629 ( row = 'jmp -292' )630 ( row = 'acc +7' )631 ( row = 'acc -14' )632 ( row = 'acc +33' )633 ( row = 'jmp -432' )634 ( row = 'acc +47' )635 ( row = 'jmp -41' )636 ( row = 'nop -306' )637 ( row = 'jmp -85' )638 ( row = 'jmp +1' )639 ( row = 'nop -215' )640 ( row = 'acc +30' )641 ( row = 'acc +9' )642 ( row = 'jmp -71' )643 ( row = 'acc +42' )644 ( row = 'acc +49' )645 ( row = 'jmp -553' )646 ( row = 'acc +28' )647 ( row = 'acc +43' )648 ( row = 'jmp +1' )649 ( row = 'jmp -147' )650 ( row = 'acc +44' )651 ( row = 'acc +26' )652 ( row = 'nop -176' )653 ( row = 'jmp -582' )654 ( row = 'acc +7' )655 ( row = 'acc -14' )656 ( row = 'acc +16' )657 ( row = 'acc +34' )658 ( row = 'jmp +1' ) ).659 660TYPES: BEGIN OF t_checklist,661         instruction_index TYPE i,662       END OF t_checklist.663 664DATA: lv_cur_position TYPE i VALUE 1,665      lv_accumulator  TYPE i VALUE 0,666      lt_checklist    TYPE TABLE OF t_checklist,667      lv_prefix       TYPE string,668      wa_checklist    LIKE LINE OF lt_checklist.669 670DO.671  READ TABLE lv_input INTO wa_input INDEX lv_cur_position.672 673  IF line_exists( lt_checklist[ instruction_index = lv_cur_position ] ).674    EXIT.675  ELSE. "" Store the instruction as executed.676    wa_checklist-instruction_index = lv_cur_position.677    APPEND wa_checklist TO lt_checklist.678  ENDIF.679 680  SPLIT wa_input-row AT ' ' INTO TABLE DATA(lv_instruction).681  READ TABLE lv_instruction INTO DATA(lv_operation) INDEX 1.682  READ TABLE lv_instruction INTO DATA(lv_argument) INDEX 2.683 684  CASE lv_operation.685    WHEN 'jmp'. "" Jump to a position686      lv_prefix = lv_argument+0(1).687      REPLACE '+' WITH '' INTO lv_argument.688      REPLACE '-' WITH '' INTO lv_argument.689      CONDENSE lv_argument NO-GAPS.690 691      CASE lv_prefix.692        WHEN '+'.693          lv_cur_position = lv_cur_position + lv_argument. "" Adds the argument number694        WHEN '-'.695          lv_cur_position = lv_cur_position - lv_argument. "" Subs the argument number696      ENDCASE.697    WHEN 'acc'. "" Add / Sub value to the accumulator and goes to the next line698      lv_prefix = lv_argument+0(1).699      REPLACE '+' WITH '' INTO lv_argument.700      REPLACE '-' WITH '' INTO lv_argument.701      CONDENSE lv_argument NO-GAPS.702 703      CASE lv_prefix.704        WHEN '+'.705          lv_accumulator = lv_accumulator + lv_argument. "" Adds the argument number706        WHEN '-'.707          lv_accumulator = lv_accumulator - lv_argument. "" Subs the argument number708      ENDCASE.709 710      lv_cur_position = lv_cur_position + 1.711    WHEN 'nop'. "" No Operation, just go to the next line.712      lv_cur_position = lv_cur_position + 1.713  ENDCASE.714ENDDO.715WRITE: 'Result accumulator: ' && lv_accumulator.716",7064,True,2655.060763865732,median717"////718    Licensed to the Apache Software Foundation (ASF) under one or more719    contributor license agreements.  See the NOTICE file distributed with720    this work for additional information regarding copyright ownership.721    The ASF licenses this file to You under the Apache License, Version 2.0722    (the ""License""); you may not use this file except in compliance with723    the License.  You may obtain a copy of the License at724 725         http://www.apache.org/licenses/LICENSE-2.0726 727    Unless required by applicable law or agreed to in writing, software728    distributed under the License is distributed on an ""AS IS"" BASIS,729    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.730    See the License for the specific language governing permissions and731    limitations under the License.732////733= Layouts734Ralph Goers <rgoers@apache.org>; Gary Gregory <ggregory@apache.org>735 736An Appender uses a Layout to format a LogEvent into a form that meets737the needs of whatever will be consuming the log event. In Log4j 1.x and738Logback Layouts were expected to transform an event into a String. In739Log4j 2 Layouts return a byte array. This allows the result of the740Layout to be useful in many more types of Appenders. However, this means741you need to configure most Layouts with a742https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html[`Charset`]743to ensure the byte array contains correct values.744 745The root class for layouts that use a Charset is746`org.apache.logging.log4j.core.layout.AbstractStringLayout` where the747default is UTF-8. Each layout that extends `AbstractStringLayout` can748provide its own default. See each layout below.749 750A custom character encoder was added to Log4j 2.4.1 for the ISO-8859-1751and US-ASCII charsets, to bring some of the performance improvements752built-in to Java 8 to Log4j for use on Java 7. For applications that log753only ISO-8859-1 characters, specifying this charset will improve754performance significantly.755 756[#CSVLayouts]757== CSV Layouts758 759As of Log4j 2.11.0, CSV support has moved from the existing module760`logj-core` to the new module `log4j-csv`.761 762This layout creates763https://en.wikipedia.org/wiki/Comma-separated_values[Comma Separated764Value (CSV)] records and requires765https://commons.apache.org/proper/commons-csv/[Apache Commons CSV] 1.4.766 767The CSV layout can be used in two ways: First, using768`CsvParameterLayout` to log event parameters to create a custom769database, usually to a logger and file appender uniquely configured for770this purpose. Second, using `CsvLogEventLayout` to log events to create771a database, as an alternative to using a full DBMS or using a JDBC772driver that supports the CSV format.773 774The `CsvParameterLayout` converts an event's parameters into a CSV775record, ignoring the message. To log CSV records, you can use the usual776Logger methods `info()`, `debug()`, and so on:777 778[source,java]779----780logger.info(""Ignored"", value1, value2, value3);781----782 783Which will create the CSV record:784 785....786value1, value2, value3787....788 789Alternatively, you can use a `ObjectArrayMessage`, which only carries790parameters:791 792[source,java]793----794logger.info(new ObjectArrayMessage(value1, value2, value3));795----796 797The layouts `CsvParameterLayout` and `CsvLogEventLayout` are configured798with the following parameters:799 800.CsvParameterLayout and CsvLogEventLayout801[cols=""1m,1,4""]802|===803|Parameter Name |Type |Description804 805|format806|String807|One of the predefined formats: `Default`, `Excel`,808`MySQL`, `RFC4180`, `TDF`. See809https://commons.apache.org/proper/commons-csv/archives/1.4/apidocs/org/apache/commons/csv/CSVFormat.Predefined.html[CSVFormat.Predefined].810 811|delimiter812|Character813|Sets the delimiter of the format to the specified character.814 815|escape816|Character817|Sets the escape character of the format to the specified character.818 819|quote820|Character821|Sets the quoteChar of the format to the specified822character.823 824|quoteMode825|String826|Sets the output quote policy of the format to the827specified value. One of: `ALL`, `MINIMAL`, `NON_NUMERIC`, `NONE`.828 829|nullString830|String831|Writes null as the given nullString when writing records.832 833|recordSeparator834|String835|Sets the record separator of the format to the specified String.836 837|charset838|Charset839|The output Charset.840 841|header842|Sets the header to include when the stream is opened.843|Desc.844 845|footer846|Sets the footer to include when the stream is closed.847|Desc.848|===849 850Logging as a CSV events looks like this:851 852[source,java]853----854logger.debug(""one={}, two={}, three={}"", 1, 2, 3);855----856 857Produces a CSV record with the following fields:858 8591.  Time Nanos8602.  Time Millis8613.  Level8624.  Thread ID8635.  Thread Name8646.  Thread Priority8657.  Formatted Message8668.  Logger FQCN8679.  Logger Name86810. Marker86911. Thrown Proxy87012. Source87113. Context Map87214. Context Stack873 874....8750,1441617184044,DEBUG,main,""one=1, two=2, three=3"",org.apache.logging.log4j.spi.AbstractLogger,,,,org.apache.logging.log4j.core.layout.CsvLogEventLayoutTest.testLayout(CsvLogEventLayoutTest.java:98),{},[]876....877 878Additional link:../runtime-dependencies.html[runtime dependencies] are879required for using CSV layouts.880 881[#GELFLayout]882== GELF Layout883 884Lays out events in the Graylog Extended Log Format (GELF) 1.1.885 886This layout compresses JSON to GZIP or ZLIB (the `compressionType`) if887log event data is larger than 1024 bytes (the `compressionThreshold`).888This layout does not implement chunking.889 890Configure as follows to send to a Graylog 2.x server with UDP:891 892[source,xml]893----894<Appenders>895  <Socket name=""Graylog"" protocol=""udp"" host=""graylog.domain.com"" port=""12201"">896      <GelfLayout host=""someserver"" compressionType=""ZLIB"" compressionThreshold=""1024""/>897  </Socket>898</Appenders>899----900 901Configure as follows to send to a Graylog 2.x server with TCP:902 903[source,xml]904----905<Appenders>906  <Socket name=""Graylog"" protocol=""tcp"" host=""graylog.domain.com"" port=""12201"">907      <GelfLayout host=""someserver"" compressionType=""OFF"" includeNullDelimiter=""true""/>908  </Socket>909</Appenders>910----911 912.GelfLayout Parameters913[cols=""1m,1,4""]914|===915|Parameter Name |Type |Description916 917|host918|String919|The value of the `host` property (optional, defaults to local host name).920 921|compressionType922|`GZIP`, `ZLIB` or `OFF`923|Compression to use (optional, defaults to `GZIP`)924 925|compressionThreshold926|int927|Compress if data is larger than this number of bytes (optional, defaults to 1024)928 929|includeStacktrace930|boolean931|Whether to include full stacktrace of logged Throwables (optional, default to true).932If set to false, only the class name and message of the933https://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html[Throwable]934will be included.935 936|includeThreadContext937|boolean938|Whether to include thread context as additional fields (optional, default to true).939 940|includeNullDelimiter941|boolean942|Whether to include NULL byte as delimiter after each event (optional, default to false).943Useful for Graylog GELF TCP input. Cannot be used with compression.944|===945 946To include any custom field in the output, use following syntax:947 948[source,xml]949----950<GelfLayout>951  <KeyValuePair key=""additionalField1"" value=""constant value""/>952  <KeyValuePair key=""additionalField2"" value=""$${ctx:key}""/>953</GelfLayout>954----955 956Custom fields are included in the order they are declared. The values957support link:lookups.html[lookups].958 959See also:960 961* The http://docs.graylog.org/en/latest/pages/gelf.html#gelf[GELF962specification]963 964[#HTMLLayout]965== HTML Layout966 967The HtmlLayout generates an HTML page and adds each LogEvent to a row in968a table.969 970.HtmlLayout Parameters971[cols=""1m,1,4""]972|===973|Parameter Name |Type |Description974 975|charset976|String977|The character set to use when converting the HTML978String to a byte array. The value must be a valid979http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html[Charset].980If not specified, this layout uses UTF-8.981 982|contentType983|String984|The value to assign to the Content-Type header.985The default is ""text/html"".986 987|locationInfo988|boolean989a|[[HtmlLocationInfo]]990 991If true, the filename and line number will be included in the HTML992output. The default value is false.993 994Generating link:#LocationInformation[location information] is an995expensive operation and may impact performance. Use with caution.996 997|title998|String999|A String that will appear as the HTML title.1000 1001|fontName1002|String1003|The `font-family` to use. The default is ""arial,sans-serif"".1004 1005|fontSize1006|String1007|The `font-size` to use. The default is ""small"".1008|===1009 1010[#JSONLayout]1011== JSON Layout1012 1013Appends a series of JSON events as strings serialized as bytes.1014 1015=== Complete well-formed JSON vs. fragment JSON1016 1017If you configure `complete=""true""`, the appender outputs a well-formed1018JSON document. By default, with `complete=""false""`, you should include1019the output as an _external file_ in a separate file to form a1020well-formed JSON document.1021 1022If `complete=""false""`, the appender does not write the JSON open array1023character ""["" at the start of the document, ""]"" and the end, nor comma1024"","" between records.1025 1026Log event follows this pattern:1027 1028[source,json]1029----1030{1031  ""instant"" : {1032    ""epochSecond"" : 1493121664,1033    ""nanoOfSecond"" : 1180000001034  },1035  ""thread"" : ""main"",1036  ""level"" : ""INFO"",1037  ""loggerName"" : ""HelloWorld"",1038  ""marker"" : {1039    ""name"" : ""child"",1040    ""parents"" : [ {1041      ""name"" : ""parent"",1042      ""parents"" : [ {1043        ""name"" : ""grandparent""1044      } ]1045    } ]1046  },1047  ""message"" : ""Hello, world!"",1048  ""thrown"" : {1049    ""commonElementCount"" : 0,1050    ""message"" : ""error message"",1051    ""name"" : ""java.lang.RuntimeException"",1052    ""extendedStackTrace"" : [ {1053      ""class"" : ""logtest.Main"",1054      ""method"" : ""main"",1055      ""file"" : ""Main.java"",1056      ""line"" : 29,1057      ""exact"" : true,1058      ""location"" : ""classes/"",1059      ""version"" : ""?""1060    } ]1061  },1062  ""contextStack"" : [ ""one"", ""two"" ],1063  ""endOfBatch"" : false,1064  ""loggerFqcn"" : ""org.apache.logging.log4j.spi.AbstractLogger"",1065  ""contextMap"" : {1066    ""bar"" : ""BAR"",1067    ""foo"" : ""FOO""1068  },1069  ""threadId"" : 1,1070  ""threadPriority"" : 5,1071  ""source"" : {1072    ""class"" : ""logtest.Main"",1073    ""method"" : ""main"",1074    ""file"" : ""Main.java"",1075    ""line"" : 291076  }1077}1078----1079 1080If `complete=""false""`, the appender does not write the JSON open array1081character ""["" at the start of the document, ""]"" and the end, nor comma1082"","" between records.1083 1084=== Pretty vs. compact JSON1085 1086By default, the JSON layout is not compact (a.k.a. not ""pretty"") with1087`compact=""false""`, which means the appender uses end-of-line characters1088and indents lines to format the text. If `compact=""true""`, then no1089end-of-line or indentation is used. Message content may contain, of1090course, escaped end-of-lines.1091 1092.JsonLayout Parameters1093[cols=""1m,1,4""]1094|===1095|Parameter Name |Type |Description1096 1097|charset1098|String1099|The character set to use when converting to a byte1100array. The value must be a valid1101http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html[Charset].1102If not specified, UTF-8 will be used.1103 1104|compact1105|boolean1106|If true, the appender does not use end-of-lines and1107indentation. Defaults to false.1108 1109|eventEol1110|boolean1111|If true, the appender appends an end-of-line after1112each record. Defaults to false. Use with eventEol=true and compact=true1113to get one record per line.1114 1115|complete1116|boolean1117|If true, the appender includes the JSON header and1118footer, and comma between records. Defaults to false.1119 1120|properties1121|boolean1122|If true, the appender includes the thread context1123map in the generated JSON. Defaults to false.1124 1125|propertiesAsList1126|boolean1127|If true, the thread context map is included1128as a list of map entry objects, where each entry has a ""key"" attribute1129(whose value is the key) and a ""value"" attribute (whose value is the1130value). Defaults to false, in which case the thread context map is1131included as a simple map of key-value pairs.1132 1133|locationInfo1134|boolean1135a|1136If true, the appender includes the location information in the generated1137JSON. Defaults to false.1138 1139Generating link:#LocationInformation[location information] is an1140expensive operation and may impact performance. Use with caution.1141 1142|includeStacktrace1143|boolean1144|If true, include full stacktrace of any logged1145https://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html[Throwable]1146(optional, default to true).1147 1148|stacktraceAsString1149|boolean1150|Whether to format the stacktrace as a1151string, and not a nested object (optional, defaults to false).1152 1153|includeNullDelimiter1154|boolean1155|Whether to include NULL byte as1156delimiter after each event (optional, default to false).1157 1158|objectMessageAsJsonObject1159|boolean1160|If true, ObjectMessage is1161serialized as JSON object to the ""message"" field of the output log.1162Defaults to false.1163|===1164 1165To include any custom field in the output, use following syntax:1166 1167[source,xml]1168----1169<JsonLayout>1170  <KeyValuePair key=""additionalField1"" value=""constant value""/>1171  <KeyValuePair key=""additionalField2"" value=""$${ctx:key}""/>1172</JsonLayout>1173----1174 1175Custom fields are always last, in the order they are declared. The1176values support link:lookups.html[lookups].1177 1178Additional link:../runtime-dependencies.html[runtime dependencies] are1179required for using JsonLayout.1180 1181[#PatternLayout]1182== Pattern Layout1183 1184A flexible layout configurable with pattern string. The goal of this1185class is to format a LogEvent and return the results. The format of the1186result depends on the _conversion pattern_.1187 1188The conversion pattern is closely related to the conversion pattern of1189the printf function in C. A conversion pattern is composed of literal1190text and format control expressions called _conversion specifiers_.1191 1192_Note that any literal text, including *Special Characters*, may be1193included in the conversion pattern._ Special Characters include *\\t*,1194*\\n*, *\\r*, *\\f*. Use *\\\\* to insert a single backslash into the output.1195 1196Each conversion specifier starts with a percent sign (%) and is followed1197by optional _format modifiers_ and a _conversion character_. The1198conversion character specifies the type of data, e.g. category,1199priority, date, thread name. The format modifiers control such things as1200field width, padding, left and right justification. The following is a

Showing the first 1,200 of 94878 lines. Download the file for the rest.