From fa4b6510f8a6c7ee79dbc8f66a028eb7956e8861 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Mon, 26 Oct 2026 17:21:49 +0000 Subject: [PATCH] conform: a program at each of section 10's least limits, compiled and run --- diff --git a/conform/run/LimitAssign.expect b/conform/run/LimitAssign.expect new file mode 100644 index 0000000..52bd8e4 --- /dev/null +++ b/conform/run/LimitAssign.expect @@ -0,0 +1 @@ +120 diff --git a/conform/run/LimitAssign.raz b/conform/run/LimitAssign.raz new file mode 100644 index 0000000..6deac12 --- /dev/null +++ b/conform/run/LimitAssign.raz @@ -0,0 +1,11 @@ +(* 15 variables assigned together. + The least an implementation must accept (report section 10, Limits). *) +module LimitAssign; +import Out; +proc f(): (INT, INT, INT, INT, INT, INT, INT, INT, INT, INT, INT, INT, INT, INT, INT); +begin return 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15; end; +var a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15: INT; +begin + a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 := f(); + Out.int(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15); Out.char('\n'); +end LimitAssign. diff --git a/conform/run/LimitDefers.expect b/conform/run/LimitDefers.expect new file mode 100644 index 0000000..77fa883 --- /dev/null +++ b/conform/run/LimitDefers.expect @@ -0,0 +1 @@ +1098765432109876543210987654321 diff --git a/conform/run/LimitDefers.raz b/conform/run/LimitDefers.raz new file mode 100644 index 0000000..7caf97a --- /dev/null +++ b/conform/run/LimitDefers.raz @@ -0,0 +1,39 @@ +(* 31 deferred statements in force in one procedure. + The least an implementation must accept (report section 10, Limits). *) +module LimitDefers; +import Out; +proc p; +begin + defer Out.int(1); + defer Out.int(2); + defer Out.int(3); + defer Out.int(4); + defer Out.int(5); + defer Out.int(6); + defer Out.int(7); + defer Out.int(8); + defer Out.int(9); + defer Out.int(0); + defer Out.int(1); + defer Out.int(2); + defer Out.int(3); + defer Out.int(4); + defer Out.int(5); + defer Out.int(6); + defer Out.int(7); + defer Out.int(8); + defer Out.int(9); + defer Out.int(0); + defer Out.int(1); + defer Out.int(2); + defer Out.int(3); + defer Out.int(4); + defer Out.int(5); + defer Out.int(6); + defer Out.int(7); + defer Out.int(8); + defer Out.int(9); + defer Out.int(0); + defer Out.int(1); +end; +begin p; Out.char('\n'); end LimitDefers. diff --git a/conform/run/LimitElements.expect b/conform/run/LimitElements.expect new file mode 100644 index 0000000..c8eecc9 --- /dev/null +++ b/conform/run/LimitElements.expect @@ -0,0 +1 @@ +1047552 diff --git a/conform/run/LimitElements.raz b/conform/run/LimitElements.raz new file mode 100644 index 0000000..a1a6700 --- /dev/null +++ b/conform/run/LimitElements.raz @@ -0,0 +1,12 @@ +(* 1023 elements in one array literal, a constant's and an expression's. + The least an implementation must accept (report section 10, Limits). *) +module LimitElements; +import Out; +var s, i: INT; +var v: [1023]INT; +const A: [1023]INT = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023]; +begin + v := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023]; + for i := 0 to 1022 do s := s + A[i] + v[i]; end; + Out.int(s); Out.char('\n'); +end LimitElements. diff --git a/conform/run/LimitLabels.expect b/conform/run/LimitLabels.expect new file mode 100644 index 0000000..ace9d03 --- /dev/null +++ b/conform/run/LimitLabels.expect @@ -0,0 +1 @@ +255 diff --git a/conform/run/LimitLabels.raz b/conform/run/LimitLabels.raz new file mode 100644 index 0000000..d2fbb99 --- /dev/null +++ b/conform/run/LimitLabels.raz @@ -0,0 +1,267 @@ +(* 255 labels in one match. + The least an implementation must accept (report section 10, Limits). *) +module LimitLabels; +import Out; +var x: INT; +begin + x := 255; + match x of + | 1: Out.int(1); + | 2: Out.int(2); + | 3: Out.int(3); + | 4: Out.int(4); + | 5: Out.int(5); + | 6: Out.int(6); + | 7: Out.int(7); + | 8: Out.int(8); + | 9: Out.int(9); + | 10: Out.int(10); + | 11: Out.int(11); + | 12: Out.int(12); + | 13: Out.int(13); + | 14: Out.int(14); + | 15: Out.int(15); + | 16: Out.int(16); + | 17: Out.int(17); + | 18: Out.int(18); + | 19: Out.int(19); + | 20: Out.int(20); + | 21: Out.int(21); + | 22: Out.int(22); + | 23: Out.int(23); + | 24: Out.int(24); + | 25: Out.int(25); + | 26: Out.int(26); + | 27: Out.int(27); + | 28: Out.int(28); + | 29: Out.int(29); + | 30: Out.int(30); + | 31: Out.int(31); + | 32: Out.int(32); + | 33: Out.int(33); + | 34: Out.int(34); + | 35: Out.int(35); + | 36: Out.int(36); + | 37: Out.int(37); + | 38: Out.int(38); + | 39: Out.int(39); + | 40: Out.int(40); + | 41: Out.int(41); + | 42: Out.int(42); + | 43: Out.int(43); + | 44: Out.int(44); + | 45: Out.int(45); + | 46: Out.int(46); + | 47: Out.int(47); + | 48: Out.int(48); + | 49: Out.int(49); + | 50: Out.int(50); + | 51: Out.int(51); + | 52: Out.int(52); + | 53: Out.int(53); + | 54: Out.int(54); + | 55: Out.int(55); + | 56: Out.int(56); + | 57: Out.int(57); + | 58: Out.int(58); + | 59: Out.int(59); + | 60: Out.int(60); + | 61: Out.int(61); + | 62: Out.int(62); + | 63: Out.int(63); + | 64: Out.int(64); + | 65: Out.int(65); + | 66: Out.int(66); + | 67: Out.int(67); + | 68: Out.int(68); + | 69: Out.int(69); + | 70: Out.int(70); + | 71: Out.int(71); + | 72: Out.int(72); + | 73: Out.int(73); + | 74: Out.int(74); + | 75: Out.int(75); + | 76: Out.int(76); + | 77: Out.int(77); + | 78: Out.int(78); + | 79: Out.int(79); + | 80: Out.int(80); + | 81: Out.int(81); + | 82: Out.int(82); + | 83: Out.int(83); + | 84: Out.int(84); + | 85: Out.int(85); + | 86: Out.int(86); + | 87: Out.int(87); + | 88: Out.int(88); + | 89: Out.int(89); + | 90: Out.int(90); + | 91: Out.int(91); + | 92: Out.int(92); + | 93: Out.int(93); + | 94: Out.int(94); + | 95: Out.int(95); + | 96: Out.int(96); + | 97: Out.int(97); + | 98: Out.int(98); + | 99: Out.int(99); + | 100: Out.int(100); + | 101: Out.int(101); + | 102: Out.int(102); + | 103: Out.int(103); + | 104: Out.int(104); + | 105: Out.int(105); + | 106: Out.int(106); + | 107: Out.int(107); + | 108: Out.int(108); + | 109: Out.int(109); + | 110: Out.int(110); + | 111: Out.int(111); + | 112: Out.int(112); + | 113: Out.int(113); + | 114: Out.int(114); + | 115: Out.int(115); + | 116: Out.int(116); + | 117: Out.int(117); + | 118: Out.int(118); + | 119: Out.int(119); + | 120: Out.int(120); + | 121: Out.int(121); + | 122: Out.int(122); + | 123: Out.int(123); + | 124: Out.int(124); + | 125: Out.int(125); + | 126: Out.int(126); + | 127: Out.int(127); + | 128: Out.int(128); + | 129: Out.int(129); + | 130: Out.int(130); + | 131: Out.int(131); + | 132: Out.int(132); + | 133: Out.int(133); + | 134: Out.int(134); + | 135: Out.int(135); + | 136: Out.int(136); + | 137: Out.int(137); + | 138: Out.int(138); + | 139: Out.int(139); + | 140: Out.int(140); + | 141: Out.int(141); + | 142: Out.int(142); + | 143: Out.int(143); + | 144: Out.int(144); + | 145: Out.int(145); + | 146: Out.int(146); + | 147: Out.int(147); + | 148: Out.int(148); + | 149: Out.int(149); + | 150: Out.int(150); + | 151: Out.int(151); + | 152: Out.int(152); + | 153: Out.int(153); + | 154: Out.int(154); + | 155: Out.int(155); + | 156: Out.int(156); + | 157: Out.int(157); + | 158: Out.int(158); + | 159: Out.int(159); + | 160: Out.int(160); + | 161: Out.int(161); + | 162: Out.int(162); + | 163: Out.int(163); + | 164: Out.int(164); + | 165: Out.int(165); + | 166: Out.int(166); + | 167: Out.int(167); + | 168: Out.int(168); + | 169: Out.int(169); + | 170: Out.int(170); + | 171: Out.int(171); + | 172: Out.int(172); + | 173: Out.int(173); + | 174: Out.int(174); + | 175: Out.int(175); + | 176: Out.int(176); + | 177: Out.int(177); + | 178: Out.int(178); + | 179: Out.int(179); + | 180: Out.int(180); + | 181: Out.int(181); + | 182: Out.int(182); + | 183: Out.int(183); + | 184: Out.int(184); + | 185: Out.int(185); + | 186: Out.int(186); + | 187: Out.int(187); + | 188: Out.int(188); + | 189: Out.int(189); + | 190: Out.int(190); + | 191: Out.int(191); + | 192: Out.int(192); + | 193: Out.int(193); + | 194: Out.int(194); + | 195: Out.int(195); + | 196: Out.int(196); + | 197: Out.int(197); + | 198: Out.int(198); + | 199: Out.int(199); + | 200: Out.int(200); + | 201: Out.int(201); + | 202: Out.int(202); + | 203: Out.int(203); + | 204: Out.int(204); + | 205: Out.int(205); + | 206: Out.int(206); + | 207: Out.int(207); + | 208: Out.int(208); + | 209: Out.int(209); + | 210: Out.int(210); + | 211: Out.int(211); + | 212: Out.int(212); + | 213: Out.int(213); + | 214: Out.int(214); + | 215: Out.int(215); + | 216: Out.int(216); + | 217: Out.int(217); + | 218: Out.int(218); + | 219: Out.int(219); + | 220: Out.int(220); + | 221: Out.int(221); + | 222: Out.int(222); + | 223: Out.int(223); + | 224: Out.int(224); + | 225: Out.int(225); + | 226: Out.int(226); + | 227: Out.int(227); + | 228: Out.int(228); + | 229: Out.int(229); + | 230: Out.int(230); + | 231: Out.int(231); + | 232: Out.int(232); + | 233: Out.int(233); + | 234: Out.int(234); + | 235: Out.int(235); + | 236: Out.int(236); + | 237: Out.int(237); + | 238: Out.int(238); + | 239: Out.int(239); + | 240: Out.int(240); + | 241: Out.int(241); + | 242: Out.int(242); + | 243: Out.int(243); + | 244: Out.int(244); + | 245: Out.int(245); + | 246: Out.int(246); + | 247: Out.int(247); + | 248: Out.int(248); + | 249: Out.int(249); + | 250: Out.int(250); + | 251: Out.int(251); + | 252: Out.int(252); + | 253: Out.int(253); + | 254: Out.int(254); + | 255: Out.int(255); + | else: Out.int(0); + end; + Out.char('\n'); +end LimitLabels. diff --git a/conform/run/LimitModules.expect b/conform/run/LimitModules.expect new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/conform/run/LimitModules.expect @@ -0,0 +1 @@ +15 diff --git a/conform/run/LimitModules.raz b/conform/run/LimitModules.raz new file mode 100644 index 0000000..54c8f1a --- /dev/null +++ b/conform/run/LimitModules.raz @@ -0,0 +1,8 @@ +(* A chain of 15 modules, each importing the next. + The least an implementation must accept (report section 10, Limits). *) +module LimitModules; +import Out; +import LimChain01; +begin + Out.int(LimChain01.depth()); Out.char('\n'); +end LimitModules. diff --git a/conform/run/LimitNames.expect b/conform/run/LimitNames.expect new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/conform/run/LimitNames.expect @@ -0,0 +1 @@ +7 diff --git a/conform/run/LimitNames.raz b/conform/run/LimitNames.raz new file mode 100644 index 0000000..4b1accd --- /dev/null +++ b/conform/run/LimitNames.raz @@ -0,0 +1,11 @@ +(* 31 names declared together. + The least an implementation must accept (report section 10, Limits). *) +module LimitNames; +import Out; +var a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31: INT; +var s: INT; +begin + a1 := 3; a31 := 4; + s := a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15 + a16 + a17 + a18 + a19 + a20 + a21 + a22 + a23 + a24 + a25 + a26 + a27 + a28 + a29 + a30 + a31; + Out.int(s); Out.char('\n'); +end LimitNames. diff --git a/conform/run/LimitParens.expect b/conform/run/LimitParens.expect new file mode 100644 index 0000000..1191247 --- /dev/null +++ b/conform/run/LimitParens.expect @@ -0,0 +1,2 @@ +1 +2 diff --git a/conform/run/LimitParens.raz b/conform/run/LimitParens.raz new file mode 100644 index 0000000..5068237 --- /dev/null +++ b/conform/run/LimitParens.raz @@ -0,0 +1,13 @@ +(* 63 levels of parentheses, and 63 calls nested, in one expression. + The least an implementation must accept (report section 10, Limits). *) +module LimitParens; +import Out; +proc id(x: INT): INT; +begin return x; end; +var x: INT; +begin + x := (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); + x := id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(2))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + Out.int(x); Out.char('\n'); +end LimitParens. diff --git a/conform/run/LimitStatements.expect b/conform/run/LimitStatements.expect new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/conform/run/LimitStatements.expect @@ -0,0 +1 @@ +7 diff --git a/conform/run/LimitStatements.raz b/conform/run/LimitStatements.raz new file mode 100644 index 0000000..ccff4e2 --- /dev/null +++ b/conform/run/LimitStatements.raz @@ -0,0 +1,136 @@ +(* 63 levels of statements nested in one procedure. + The least an implementation must accept (report section 10, Limits). *) +module LimitStatements; +import Out; +proc p; +var x: INT; +begin + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + if true then + x := 7; Out.int(x); Out.char('\n'); + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; + end; +end; +begin p; end LimitStatements. diff --git a/conform/run/LimitTypeArgs.expect b/conform/run/LimitTypeArgs.expect new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/conform/run/LimitTypeArgs.expect @@ -0,0 +1 @@ +5 diff --git a/conform/run/LimitTypeArgs.raz b/conform/run/LimitTypeArgs.raz new file mode 100644 index 0000000..9813319 --- /dev/null +++ b/conform/run/LimitTypeArgs.raz @@ -0,0 +1,8 @@ +(* 8 type arguments to a generic module. + The least an implementation must accept (report section 10, Limits). *) +module LimitTypeArgs; +import Out; +import M := LimitMany(INT, INT, INT, INT, INT, INT, INT, INT); +begin + M.put(5); Out.int(M.get()); Out.char('\n'); +end LimitTypeArgs. diff --git a/conform/run/mods/LimChain01.raz b/conform/run/mods/LimChain01.raz new file mode 100644 index 0000000..7d1e6bd --- /dev/null +++ b/conform/run/mods/LimChain01.raz @@ -0,0 +1,5 @@ +module LimChain01; +import N := LimChain02; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain01. diff --git a/conform/run/mods/LimChain02.raz b/conform/run/mods/LimChain02.raz new file mode 100644 index 0000000..da8588e --- /dev/null +++ b/conform/run/mods/LimChain02.raz @@ -0,0 +1,5 @@ +module LimChain02; +import N := LimChain03; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain02. diff --git a/conform/run/mods/LimChain03.raz b/conform/run/mods/LimChain03.raz new file mode 100644 index 0000000..3cce80f --- /dev/null +++ b/conform/run/mods/LimChain03.raz @@ -0,0 +1,5 @@ +module LimChain03; +import N := LimChain04; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain03. diff --git a/conform/run/mods/LimChain04.raz b/conform/run/mods/LimChain04.raz new file mode 100644 index 0000000..092216b --- /dev/null +++ b/conform/run/mods/LimChain04.raz @@ -0,0 +1,5 @@ +module LimChain04; +import N := LimChain05; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain04. diff --git a/conform/run/mods/LimChain05.raz b/conform/run/mods/LimChain05.raz new file mode 100644 index 0000000..a51ff0e --- /dev/null +++ b/conform/run/mods/LimChain05.raz @@ -0,0 +1,5 @@ +module LimChain05; +import N := LimChain06; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain05. diff --git a/conform/run/mods/LimChain06.raz b/conform/run/mods/LimChain06.raz new file mode 100644 index 0000000..9485d94 --- /dev/null +++ b/conform/run/mods/LimChain06.raz @@ -0,0 +1,5 @@ +module LimChain06; +import N := LimChain07; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain06. diff --git a/conform/run/mods/LimChain07.raz b/conform/run/mods/LimChain07.raz new file mode 100644 index 0000000..12123a7 --- /dev/null +++ b/conform/run/mods/LimChain07.raz @@ -0,0 +1,5 @@ +module LimChain07; +import N := LimChain08; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain07. diff --git a/conform/run/mods/LimChain08.raz b/conform/run/mods/LimChain08.raz new file mode 100644 index 0000000..8573b9d --- /dev/null +++ b/conform/run/mods/LimChain08.raz @@ -0,0 +1,5 @@ +module LimChain08; +import N := LimChain09; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain08. diff --git a/conform/run/mods/LimChain09.raz b/conform/run/mods/LimChain09.raz new file mode 100644 index 0000000..c9a8585 --- /dev/null +++ b/conform/run/mods/LimChain09.raz @@ -0,0 +1,5 @@ +module LimChain09; +import N := LimChain10; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain09. diff --git a/conform/run/mods/LimChain10.raz b/conform/run/mods/LimChain10.raz new file mode 100644 index 0000000..ad76f67 --- /dev/null +++ b/conform/run/mods/LimChain10.raz @@ -0,0 +1,5 @@ +module LimChain10; +import N := LimChain11; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain10. diff --git a/conform/run/mods/LimChain11.raz b/conform/run/mods/LimChain11.raz new file mode 100644 index 0000000..63fd10c --- /dev/null +++ b/conform/run/mods/LimChain11.raz @@ -0,0 +1,5 @@ +module LimChain11; +import N := LimChain12; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain11. diff --git a/conform/run/mods/LimChain12.raz b/conform/run/mods/LimChain12.raz new file mode 100644 index 0000000..7d71d09 --- /dev/null +++ b/conform/run/mods/LimChain12.raz @@ -0,0 +1,5 @@ +module LimChain12; +import N := LimChain13; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain12. diff --git a/conform/run/mods/LimChain13.raz b/conform/run/mods/LimChain13.raz new file mode 100644 index 0000000..2ab9702 --- /dev/null +++ b/conform/run/mods/LimChain13.raz @@ -0,0 +1,5 @@ +module LimChain13; +import N := LimChain14; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain13. diff --git a/conform/run/mods/LimChain14.raz b/conform/run/mods/LimChain14.raz new file mode 100644 index 0000000..bb7d746 --- /dev/null +++ b/conform/run/mods/LimChain14.raz @@ -0,0 +1,5 @@ +module LimChain14; +import N := LimChain15; +proc depth*: INT; +begin return N.depth() + 1; end; +end LimChain14. diff --git a/conform/run/mods/LimChain15.raz b/conform/run/mods/LimChain15.raz new file mode 100644 index 0000000..a974d1a --- /dev/null +++ b/conform/run/mods/LimChain15.raz @@ -0,0 +1,4 @@ +module LimChain15; +proc depth*: INT; +begin return 1; end; +end LimChain15. diff --git a/conform/run/mods/LimitMany.raz b/conform/run/mods/LimitMany.raz new file mode 100644 index 0000000..07de67e --- /dev/null +++ b/conform/run/mods/LimitMany.raz @@ -0,0 +1,6 @@ +module LimitMany(T1, T2, T3, T4, T5, T6, T7, T8); +var v: T1; +proc put*(x: T1); begin v := x; end; +proc get*: T1; +begin return v; end; +end LimitMany.