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 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.10" />
<title>Specifications of SigScheme</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
/* Default font. */
body {
font-family: Georgia,serif;
}
/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
font-family: Arial,Helvetica,sans-serif;
}
body {
margin: 1em 5% 1em 5%;
}
a {
color: blue;
text-decoration: underline;
}
a:visited {
color: fuchsia;
}
em {
font-style: italic;
color: navy;
}
strong {
font-weight: bold;
color: #083194;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
padding-top: 0.5em;
}
h3 {
float: left;
}
h3 + * {
clear: left;
}
h5 {
font-size: 1.0em;
}
div.sectionbody {
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
ul, ol, li > p {
margin-top: 0;
}
ul > li { color: #aaa; }
ul > li > * { color: black; }
.monospaced, code, pre {
font-family: "Courier New", Courier, monospace;
font-size: inherit;
color: navy;
padding: 0;
margin: 0;
}
pre {
white-space: pre-wrap;
}
#author {
color: #527bbd;
font-weight: bold;
font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}
#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
#footer-text {
float: left;
padding-bottom: 0.5em;
}
#footer-badges {
float: right;
padding-bottom: 0.5em;
}
#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.0em;
margin-bottom: 2.0em;
margin-right: 10%;
color: #606060;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid #dddddd;
border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid #dddddd;
border-left: 5px solid #f0f0f0;
background: #f8f8f8;
padding: 0.5em;
}
div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #f0f0f0;
color: #888;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock > pre.content {
font-family: inherit;
font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 3px solid #dddddd;
}
div.exampleblock > div.content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: normal;
color: navy;
}
dd > *:first-child {
margin-top: 0.1em;
}
ul, ol {
list-style-position: outside;
}
ol.arabic {
list-style-type: decimal;
}
ol.loweralpha {
list-style-type: lower-alpha;
}
ol.upperalpha {
list-style-type: upper-alpha;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
div.hdlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
div.hdlist tr {
padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
font-weight: bold;
}
td.hdlist1 {
vertical-align: top;
font-style: normal;
padding-right: 0.8em;
color: navy;
}
td.hdlist2 {
vertical-align: top;
}
div.hdlist.compact tr {
margin: 0;
padding-bottom: 0;
}
.comment {
background: yellow;
}
.footnote, .footnoteref {
font-size: 0.8em;
}
span.footnote, span.footnoteref {
vertical-align: super;
}
#footnotes {
margin: 20px 0 20px 0;
padding: 7px 0 0 0;
}
#footnotes div.footnote {
margin: 0 0 5px 0;
}
#footnotes hr {
border: none;
border-top: 1px solid silver;
height: 1px;
text-align: left;
margin-left: 0;
width: 20%;
min-width: 100px;
}
div.colist td {
padding-right: 0.5em;
padding-bottom: 0.3em;
vertical-align: top;
}
div.colist td img {
margin-top: 0.3em;
}
@media print {
#footer-badges { display: none; }
}
#toc {
margin-bottom: 2.5em;
}
#toctitle {
color: #527bbd;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
font-size: 0.9em;
}
div.toclevel3 {
margin-left: 4em;
font-size: 0.9em;
}
div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }
span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }
span.big { font-size: 2em; }
span.small { font-size: 0.6em; }
span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
div.unbreakable { page-break-inside: avoid; }
/*
* xhtml11 specific
*
* */
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead, p.table.header {
font-weight: bold;
color: #527bbd;
}
p.table {
margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
border-style: none;
}
div.tableblock > table[frame="hsides"] {
border-left-style: none;
border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
border-top-style: none;
border-bottom-style: none;
}
/*
* html5 specific
*
* */
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
thead, p.tableblock.header {
font-weight: bold;
color: #527bbd;
}
p.tableblock {
margin-top: 0;
}
table.tableblock {
border-width: 3px;
border-spacing: 0px;
border-style: solid;
border-color: #527bbd;
border-collapse: collapse;
}
th.tableblock, td.tableblock {
border-width: 1px;
padding: 4px;
border-style: solid;
border-color: #527bbd;
}
table.tableblock.frame-topbot {
border-left-style: hidden;
border-right-style: hidden;
}
table.tableblock.frame-sides {
border-top-style: hidden;
border-bottom-style: hidden;
}
table.tableblock.frame-none {
border-style: hidden;
}
th.tableblock.halign-left, td.tableblock.halign-left {
text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
th.tableblock.valign-top, td.tableblock.valign-top {
vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
vertical-align: bottom;
}
/*
* manpage specific
*
* */
body.manpage h1 {
padding-top: 0.5em;
padding-bottom: 0.5em;
border-top: 2px solid silver;
border-bottom: 2px solid silver;
}
body.manpage h2 {
border-style: none;
}
body.manpage div.sectionbody {
margin-left: 3em;
}
@media print {
body.manpage div#toc { display: none; }
}
</style>
<script type="text/javascript">
/*<+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
var iterate = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
var mo = re.exec(i.tagName);
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
}
iterate(i);
}
}
}
iterate(el);
return result;
}
var toc = document.getElementById("toc");
if (!toc) {
return;
}
// Delete existing TOC entries in case we're reloading the TOC.
var tocEntriesToRemove = [];
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
}
for (i = 0; i < tocEntriesToRemove.length; i++) {
toc.removeChild(tocEntriesToRemove[i]);
}
// Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.element.id == "")
entry.element.id = "_toc_" + i;
var a = document.createElement("a");
a.href = "#" + entry.element.id;
a.appendChild(document.createTextNode(entry.text));
var div = document.createElement("div");
div.appendChild(a);
div.className = "toclevel" + entry.toclevel;
toc.appendChild(div);
}
if (entries.length == 0)
toc.parentNode.removeChild(toc);
},
/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////
/* Based on footnote generation code from:
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
*/
footnotes: function () {
// Delete existing footnote entries in case we're reloading the footnodes.
var i;
var noteholder = document.getElementById("footnotes");
if (!noteholder) {
return;
}
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
noteholder.removeChild(entriesToRemove[i]);
}
// Rebuild footnote entries.
var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
var note = spans[i].getAttribute("data-note");
if (!note) {
// Use [\s\S] in place of . so multi-line matches work.
// Because JavaScript has no s (dotall) regex flag.
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
spans[i].innerHTML =
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
spans[i].setAttribute("data-note", note);
}
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
}
if (n == 0)
noteholder.parentNode.removeChild(noteholder);
else {
// Process footnoterefs.
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnoteref") {
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
spans[i].innerHTML =
"[<a href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
}
}
}
},
install: function(toclevels) {
var timerId;
function reinstall() {
asciidoc.footnotes();
if (toclevels) {
asciidoc.toc(toclevels);
}
}
function reinstallAndRemoveTimer() {
clearInterval(timerId);
reinstall();
}
timerId = setInterval(reinstall, 500);
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
else
window.onload = reinstallAndRemoveTimer;
}
}
asciidoc.install();
/*]]>*/
</script>
</head>
<body class="article">
<div id="header">
<h1>Specifications of SigScheme</h1>
</div>
<div id="content">
<div class="sect1">
<h2 id="_general">1. General</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_64_bit_data_models">1.1. 64-bit data models</h3>
<div class="paragraph"><p>Supports LL64, LLP64, LP64 and ILP64 on both storage-fatty and storage-compact.</p></div>
</div>
<div class="sect2">
<h3 id="_addressable_memory_space">1.2. Addressable memory space</h3>
<div class="paragraph"><p>Ordinary storage implementation can address any Scheme object scattered on
whole memory space. Both storage-fatty and storage-compact have no
limitation on any 32 and 64-bit data models. But it may be limited if a
storage implementation is designed to do so for some specific advantages,
as like GNU Emacs' 28-bit tagged pointer does.</p></div>
</div>
<div class="sect2">
<h3 id="_integer_range">1.3. Integer range</h3>
<div class="paragraph"><p>Current implementation only supports fixnum, and its range varies by the
user-selected underlying storage implementation. The range can be known via
R6RS (R5.91RS) compatible <code>(fixnum-width)</code>, <code>(least-fixnum)</code> and
<code>(greatest-fixnum)</code>.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_r5rs_conformance">2. R5RS conformance</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_proper_tail_recursion">2.1. Proper tail recursion</h3>
<div class="paragraph"><p>Supported. But the conformance of <code>eval</code> procedure is uncertain. See the
comments of <code>scm_p_eval()</code> and <code>rec-by-eval</code> of <code>test-tail-rec.scm</code> for further
information about <code>eval</code>.</p></div>
</div>
<div class="sect2">
<h3 id="_continuations">2.2. Continuations</h3>
<div class="paragraph"><p>Limited to nested use due to its setjmp/longjmp implementation. If a
continuation that is not an ancestor of current continuation called, all
continuation objects lying between the curent and the common ancestor of
the destination are invalidated. Calling an invalidated continuation object
causes an error.</p></div>
</div>
<div class="sect2">
<h3 id="_hygienic_macros">2.3. Hygienic macros</h3>
<div class="paragraph"><p>The hygienic macros are fully supported. But although the macro expansion
engine itself works well and can be expected as R5RS-conformant, its
integration into SigScheme is not fully validated yet. It is likely having a
problem on identifier references. So the feature is disabled by default on most
configurations.</p></div>
<div class="paragraph"><p>In addition to the validity problem, there is an architectural inefficiency.
Since SigScheme development had been started as macro-less naive system, it
lacks the concepts <em>compilation</em>, <em>macro-expansion phase</em> and <em>lexical
environment</em>. So current SigScheme implementation adopted runtime macro
expansion. A macro form is kept untransformed in program, and expanded
immediately before each evaluation. For example, following code causes macro
expansion on each <code>map-caddr</code> call.</p></div>
<div class="listingblock">
<div class="title">Macro expansion inefficiency</div>
<div class="content">
<pre><code>(define-syntax compose-internal
(syntax-rules ()
((compose-internal f x) (f x))
((compose-internal f g ...) (f (compose-internal g ...)))))
(define-syntax compose
(syntax-rules ()
((compose) values)
((compose f) f)
((compose f g ...) (lambda (x) (compose-internal f g ... x)))))
(define map-caddr
(lambda (lst)
(map (compose car cdr cdr) lst)))</code></pre>
</div></div>
<div class="paragraph"><p>Since it is considerably inefficient in many cases, keep in mind the expansion
cost. The inefficiency problem is expected to be resolved in SigScheme 0.9.0.</p></div>
</div>
<div class="sect2">
<h3 id="_numbers">2.4. Numbers</h3>
<div class="paragraph"><p>SigScheme supports only the integer part of the numerical tower.</p></div>
<div class="sect3">
<h4 id="_literals">2.4.1. Literals</h4>
<div class="paragraph"><p>SigScheme recognizes only these limited part of numerical forms of "7.1.1
Lexical structure" section of R5RS. Other valid R5RS forms for numbers produce
errors.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> <number> --> <num 2>| <num 8>
| <num 10>| <num 16>
<num R> --> <prefix R> <complex R>
<complex R> --> <real R>
<real R> --> <sign> <ureal R>
<ureal R> --> <uinteger R>
<uinteger R> --> <digit R>+ #* ;; '#' must not occur
<prefix R> --> <radix R>
<sign> --> <empty> | + | -
<radix 2> --> #b
<radix 8> --> #o
<radix 10> --> <empty> | #d
<radix 16> --> #x
<digit 2> --> 0 | 1
<digit 8> --> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
<digit 10> --> <digit>
<digit 16> --> <digit 10> | a | b | c | d | e | f
<digit> --> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9</code></pre>
</div></div>
<div class="paragraph"><p>SigScheme accepts only lower case alphabets as radices as follows. But
hexadecimal digits can be written as either lower or upper.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> #b11 ==> 3
#B11 ==> error
#xa1 ==> 161
#Xa1 ==> error
#xAb ==> 171</code></pre>
</div></div>
<div class="paragraph"><p>SigScheme uses a fixed-size buffer for number literals parsing. Due to the
implementation, it can accept only one optional <em>0</em> prefix for maximum-length
binary number literals. Two or more <em>0</em> prefixes causes an error as follows.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> ;; storage-compact on ILP32 env
(greatest-fixnum) ==> 2147483647
#b11111111000000001111111100000000 ==> 4278255360
#b011111111000000001111111100000000 ==> 4278255360
#b0011111111000000001111111100000000 ==> error
#b00011111111000000001111111100000000 ==> error</code></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_optional_procedures">2.4.2. Optional procedures</h4>
<div class="paragraph"><p>The procedures <em>-</em> and <em>/</em> support following optional form.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> 6.2.5 Numerical operations
optional procedure: - z1 z2 ...
optional procedure: / z1 z2 ...</code></pre>
</div></div>
</div>
</div>
<div class="sect2">
<h3 id="_characters">2.5. Characters</h3>
<div class="paragraph"><p>All character category-sensitive procedures and predicates (such as
char-upcase) work correctly only in ASCII range. i.e. Neither Unicode
processing specified in R6RS nor other non-Unicode multibyte character
processing are supported in such procedures/predicates.</p></div>
</div>
<div class="sect2">
<h3 id="_non_ascii_charcter_acceptance">2.6. Non-ASCII charcter acceptance</h3>
<div class="paragraph"><p><code>integer->char</code> only accepts valid characters of current character codec. If
no multibyte character codec is enabled on configuration, it accepts 0-255.</p></div>
<div class="paragraph"><p>If no multibyte character codec is enabled on configuration, character
literal only covers ASCII.</p></div>
<div class="paragraph"><p>If UTF-8 codec is enabled and is the current codec, character literal covers
all valid Unicode charcters.</p></div>
</div>
<div class="sect2">
<h3 id="_whitespace_charcters">2.7. Whitespace charcters</h3>
<div class="paragraph"><p>SigScheme treats vertical tab (0x0b) as a white space charcter although
R5RS <code>char-whitespace?</code> does not cover it.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> R5RS: 6.3.4 Characters
The whitespace characters are space, tab, line feed, form feed, and
carriage return.</code></pre>
</div></div>
<div class="listingblock">
<div class="content">
<pre><code> R6RS Standard Libraries: 1.1 Characters
A character is whitespace if it is in one of the space, line, or
paragraph separator categories (Zs, Zl or Zp), or if is U+0009
(Horizontal tabulation), U+000A (Line feed), U+000B (Vertical
tabulation), U+000C (Form feed), or U+000D (Carriage return).</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_case_insensitive_character_comparison">2.8. Case-insensitive character comparison</h3>
<div class="paragraph"><p>SigScheme’s case-insensitive comparison conforms to the foldcase’ed
comparison described in R6RS and SRFI-13, although R5RS does not specify
comparison between alphabetic and non-alphabetic char.</p></div>
<div class="paragraph"><p>See the description in sigschemeinternal.h for further details.</p></div>
</div>
<div class="sect2">
<h3 id="_case_sensitive_identifiers">2.9. Case-sensitive identifiers</h3>
<div class="paragraph"><p>SigScheme does distinguish letter case in indentifiers. Although case
insensitivity is required in R5RS as follows, it is hard to accept for the
our application.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> 2. Lexical conventions
Upper and lower case forms of a letter are never distinguished except
within character and string constants. For example, `Foo' is the same
identifier as `FOO', and #x1AB is the same number as #X1ab.</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_constant_string">2.10. Constant string</h3>
<div class="paragraph"><p>SigScheme treats string literals as constant as specified in R5RS.</p></div>
<div class="exampleblock">
<div class="title">Example 1. constant string</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (string-set! "foo" 0 #\F)
Error: in string-set!: attempted to modify immutable string: "foo"</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>sscm> (string-set! (string-copy "foo") 0 #\F)
"Foo"</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_constant_list">2.11. Constant list</h3>
<div class="paragraph"><p>SigScheme inhibits modification of constant list object by default as
specified in R5RS, if the storage implementation suports it. storage-fatty
supports it, but storage-compact does not due to no bit space for pair
object.</p></div>
<div class="paragraph"><p>The behavior can be changed by <code>SCM_CONST_LIST_LITERAL</code>.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> 4.1.2 Literal expressions
`(quote <datum>)' may be abbreviated as '<datum>. The two notations
are equivalent in all respects.
'a ==> a
'#(a b c) ==> #(a b c)
'() ==> ()
'(+ 1 2) ==> (+ 1 2)
'(quote a) ==> (quote a)
''a ==> (quote a)
As noted in section 3.4 Storage model, it is an error to alter a
constant (i.e. the value of a literal expression) using a mutation
procedure like `set-car!' or `string-set!'.
6.3.2 Pairs and lists
procedure: set-car! pair obj
Stores obj in the car field of pair. The value returned by `set-car!'
is unspecified.
(define (g) '(constant-list))
(set-car! (g) 3) ==> error</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_constant_vector">2.12. Constant vector</h3>
<div class="paragraph"><p>SigScheme inhibits modification of constant vector object by default as
specified in R5RS, if the storage implementation suports it. storage-fatty
supports it, but storage-compact is not yet.</p></div>
<div class="paragraph"><p>The behavior can be changed by <code>SCM_CONST_VECTOR_LITERAL</code>.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> 6.3.6 Vectors
procedure: vector-set! vector k obj
(vector-set! '#(0 1 2) 1 "doe")
==> error ; constant vector</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_quote_less_null_list">2.13. Quote-less null list</h3>
<div class="paragraph"><p>SigScheme allows quote-less null list by default for convenience and
performance. But it can be error as specified in R5RS, when <code>SCM_STRICT_R5RS</code>
is enabled.</p></div>
<div class="exampleblock">
<div class="title">Example 2. SCM_STRICT_R5RS disabled</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (null? ())
#t</code></pre>
</div></div>
</div></div>
<div class="exampleblock">
<div class="title">Example 3. SCM_STRICT_R5RS enabled</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (null? ())
Error: eval: () is not a valid R5RS form. use '() instead</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_quote_less_vector_literal">2.14. Quote-less vector literal</h3>
<div class="paragraph"><p>Sigscheme inhibits quote-less vector literal by default, as specified in
R5RS.</p></div>
<div class="paragraph"><p>The behavior can be changed by <code>SCM_STRICT_VECTOR_FORM</code>.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> 6.3.6 Vectors
Vectors are written using the notation #(obj ...). For example, a vector
of length 3 containing the number zero in element 0, the list `(2 2 2 2)'
in element 1, and the string `"Anna"' in element 2 can be written as
following:
#(0 (2 2 2 2) "Anna")
Note that this is the external representation of a vector, not an
expression evaluating to a vector. Like list constants, vector constants
must be quoted:
'#(0 (2 2 2 2) "Anna")
==> #(0 (2 2 2 2) "Anna")</code></pre>
</div></div>
<div class="exampleblock">
<div class="title">Example 4. vector literals</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> #(1 2 3)
Error: eval: #() is not a valid R5RS form. use '#() instead
sscm> '#(1 2 3)
#(1 2 3)</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_environment_specifiers">2.15. Environment specifiers</h3>
<div class="paragraph"><p><code>(null-environment)</code> and <code>(scheme-report-environment)</code> does not return correct
environemnt specified in R5RS. Current implementation returns same object
of <code>(interaction-environment)</code>.</p></div>
</div>
<div class="sect2">
<h3 id="_internal_definitions">2.16. Internal definitions</h3>
<div class="paragraph"><p>SigScheme strictly conforms to the <em>internal definitions</em> defined in R5RS
(cited below) if <code>SCM_STRICT_DEFINE_PLACEMENT</code> is enabled (default). It can be
disabled to get the syntax loosen, shrink the footprint and reduce runtime
cost.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> 5.2.2 Internal definitions
Definitions may occur at the beginning of a <body> (that is, the body of a
lambda, let, let*, letrec, let-syntax, or letrec-syntax expression or that of
a definition of an appropriate form). Such definitions are known as internal
definitions as opposed to the top level definitions described above.</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_superfluous_arguments">2.17. Superfluous arguments</h3>
<div class="paragraph"><p>Superfluous or dotted arguments are strictly rejected as an error if
<code>SCM_STRICT_ARGCHECK</code> is enabled. Otherwise ignored. Resource-sensitive
apprication could disable it.</p></div>
<div class="exampleblock">
<div class="title">Example 5. SCM_STRICT_ARGCHECK enabled</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (car '(1 2) 3 4)
Error: in (function call): superfluous argument(s): (3 4)
sscm> (symbol? 'foo . #t)
Error: in (function call): improper argument list terminator: #t
sscm> (+ 3 4 . 5)
Error: in (reduction): improper argument list terminator: 5</code></pre>
</div></div>
</div></div>
<div class="exampleblock">
<div class="title">Example 6. SCM_STRICT_ARGCHECK disabled</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (car '(1 2) 3 4)
1
sscm> (symbol? 'foo . #t)
#t
sscm> (+ 3 4 . 5)
7</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_promises">2.18. Promises</h3>
<div class="paragraph"><p>SigScheme only supports explicit forcing. And passing non-promise objects to
force is an error.</p></div>
<div class="listingblock">
<div class="content">
<pre><code> (+ (delay (* 3 7)) 13) ==> error</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_syntaxes_procedures_not_implemented">2.19. Syntaxes/procedures not implemented</h3>
<div class="paragraph"><p>Following R5RS syntaxes and procedures are not implemented (yet).</p></div>
<div class="sect3">
<h4 id="_numbers_2">2.19.1. Numbers</h4>
<div class="ulist"><ul>
<li>
<p>
<strong>procedure:</strong> complex? obj
</p>
</li>
<li>
<p>
<strong>procedure:</strong> real? obj
</p>
</li>
<li>
<p>
<strong>procedure:</strong> rational? obj
</p>
</li>
<li>
<p>
<strong>procedure:</strong> exact? z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> inexact? z
</p>
</li>
<li>
<p>
<strong>library procedure:</strong> gcd n1 …
</p>
</li>
<li>
<p>
<strong>library procedure:</strong> lcm n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> numerator q
</p>
</li>
<li>
<p>
<strong>procedure:</strong> denominator q
</p>
</li>
<li>
<p>
<strong>procedure:</strong> floor x
</p>
</li>
<li>
<p>
<strong>procedure:</strong> ceiling x
</p>
</li>
<li>
<p>
<strong>procedure:</strong> truncate x
</p>
</li>
<li>
<p>
<strong>procedure:</strong> round x
</p>
</li>
<li>
<p>
<strong>library procedure:</strong> rationalize x y
</p>
</li>
<li>
<p>
<strong>procedure:</strong> exp z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> log z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> sin z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> cos z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> tan z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> asin z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> acos z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> atan z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> atan y x
</p>
</li>
<li>
<p>
<strong>procedure:</strong> sqrt z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> expt z1 z2
</p>
</li>
<li>
<p>
<strong>procedure:</strong> make-rectangular x1 x2
</p>
</li>
<li>
<p>
<strong>procedure:</strong> make-polar x3 x4
</p>
</li>
<li>
<p>
<strong>procedure:</strong> real-part z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> imag-part z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> magnitude z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> angle z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> exact→inexact z
</p>
</li>
<li>
<p>
<strong>procedure:</strong> inexact→exact z
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="_system_interface">2.19.2. System interface</h4>
<div class="ulist"><ul>
<li>
<p>
<strong>optional procedure:</strong> transcript-on filename
</p>
</li>
<li>
<p>
<strong>optional procedure:</strong> transcript-off
</p>
</li>
</ul></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_srfi_conformance">3. SRFI conformance</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_srfi_0_feature_based_conditional_expansion_construct">3.1. SRFI-0 Feature-based conditional expansion construct</h3>
<div class="paragraph"><p>Supported. But since the macro expansion is performed at evaluation-time and
the expanded form is not stored as the code, the form may be expanded
differently at next time.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_1_list_library">3.2. SRFI-1 List Library</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>It is based on the reference implementation of SRFI-1. Some procedures are
replaced with efficient C implementation. And bugs in <code>delete-duplicates!</code>,
<code>lset-xor</code>, <code>lset-xor!</code> and <code>list=</code> of the reference implementation are fixed.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_2_and_let">3.3. SRFI-2 AND-LET*</h3>
<div class="paragraph"><p>Fully supported.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_6_basic_string_ports">3.4. SRFI-6 Basic String Ports</h3>
<div class="paragraph"><p>Fully supported.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_8_receive">3.5. SRFI-8 receive</h3>
<div class="paragraph"><p>Fully supported.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_9_defining_record_types">3.6. SRFI-9 Defining Record Types</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>It is based on the reference implementation of SRFI-9. But different to the
original implementation, <code>eval</code> procedure of the SigScheme port accepts
<code>(interaction-environment)</code> as environment argument.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_22_running_scheme_scripts_on_unix">3.7. SRFI-22 Running Scheme Scripts on Unix</h3>
<div class="paragraph"><p>SigScheme only supports the prelude line interpretation. All options written in
the line are applied as same as commandline invocation of sscm. But the <code>main</code>
procedure invocation is not supported (yet).</p></div>
<div class="exampleblock">
<div class="title">Example 7. Prelude line is interpreted as follows</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>#! /usr/bin/env sscm -C UTF-8
...</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>==> Character encoding for the file is changed to UTF-8 temporarily.</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_srfi_23_error_reporting_mechanism">3.8. SRFI-23 Error Reporting Mechanism</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>If srfi-34 is provided, the <code>error</code> procedure throws a SigScheme-specific error
object in cooperate with "SRFI-34 Exception Handling for Programs". Otherwise
it simply calls scm_fatal_error(). Since the error objects are represented as a
list, be careful on catching an exception based on its type. If you want to
distinguish the error objects from ordinary lists, use SigScheme-specific
<code>%%error-object?</code> predicate.</p></div>
<div class="exampleblock">
<div class="title">Example 8. Error objects are also caught as a list</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (guard (obj ((pair? obj) obj)) (error "reason" 1 2 3))
#<error "reason" 1 2 3></code></pre>
</div></div>
</div></div>
<div class="exampleblock">
<div class="title">Example 9. Error object internal</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (define err (guard (err (#t err)) (error "reason" 1 2 3)))
err
sscm> err
#<error "reason" 1 2 3>
sscm> (pair? err)
#t
sscm> (car err)
(#<undef> . #<undef>)
sscm> (%%error-object? err)
#t</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_srfi_28_basic_format_strings">3.9. SRFI-28 Basic Format Strings</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>A directive-less tilde at end of a format string causes an error as same as the
reference implementation of SRFI-28.</p></div>
<div class="exampleblock">
<div class="title">Example 10. SigScheme</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>(format "~") ==> error
(format "a~") ==> error</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_srfi_34_exception_handling_for_programs">3.10. SRFI-34 Exception Handling for Programs</h3>
<div class="paragraph"><p>Fully supported.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_38_external_representation_for_data_with_shared_structure">3.11. SRFI-38 External Representation for Data with Shared Structure</h3>
<div class="paragraph"><p>Only <code>write-with-shared-structure</code> is implemented and
<code>read-with-shared-structure</code> is not. The optional alias <code>write/ss</code> described in
SRFI-38 is also defined. The optional <code>optarg</code> argument is simply ignored.</p></div>
<div class="paragraph"><p>The shared index starts with #1 (not #0).</p></div>
<div class="exampleblock">
<div class="title">Example 11. Shared index starts with #1</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>sscm> (define lst (list 'a 'b))
lst
sscm> (set-cdr! lst lst)
#1=(a . #1#)
sscm> lst
#1=(a . #1#)</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_srfi_43_vector_library">3.12. SRFI-43 Vector library</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>It is based on the reference implementation of SRFI-43.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_48_intermediate_format_strings">3.13. SRFI-48 Intermediate Format Strings</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>The <em>d</em> part of <em>~w,dF</em> directive is acceptable, but completely ignored on
output format. Since SigScheme only supports integer currently, number is
always formatted as integer even if the <em>d</em> part is specified.</p></div>
<div class="exampleblock">
<div class="title">Example 12. Proper behavior</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>(format "~3F" 3) ==> " 3"
(format "~3,2F" 3) ==> "3.00"</code></pre>
</div></div>
</div></div>
<div class="exampleblock">
<div class="title">Example 13. SigScheme</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>(format "~3F" 3) ==> " 3"
(format "~3,2F" 3) ==> " 3"</code></pre>
</div></div>
</div></div>
<div class="paragraph"><p>Although the reference implementation of SRFI-48 allows directive-less tilde at
end of a format string, SigScheme rejects it as an error since it decreases
user-code portability, and is confusable due to that the behavior is different
to the reference implementation of SRFI-28.</p></div>
<div class="exampleblock">
<div class="title">Example 14. Reference implementation of SRFI-48</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>(format "~") ==> "~"
(format "a~") ==> "a~"</code></pre>
</div></div>
</div></div>
<div class="exampleblock">
<div class="title">Example 15. SigScheme</div>
<div class="content">
<div class="literalblock">
<div class="content">
<pre><code>(format "~") ==> error
(format "a~") ==> error</code></pre>
</div></div>
</div></div>
</div>
<div class="sect2">
<h3 id="_srfi_55_require_extension">3.14. SRFI-55 require-extension</h3>
<div class="paragraph"><p>Fully supported.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_60_integer_as_bits">3.15. SRFI-60 Integer as Bits</h3>
<div class="paragraph"><p>Only following procedures are implemented.</p></div>
<div class="ulist"><ul>
<li>
<p>
Bitwise Operations
</p>
<div class="ulist"><ul>
<li>
<p>
<strong>procedure:</strong> logand n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bitwise-and n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> logior n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bitwise-ior n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> logxor n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bitwise-xor n1 …
</p>
</li>
<li>
<p>
<strong>procedure:</strong> lognot n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bitwise-not n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bitwise-if mask n0 n1
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bitwise-merge mask n0 n1
</p>
</li>
<li>
<p>
<strong>procedure:</strong> logtest j k
</p>
</li>
<li>
<p>
<strong>procedure:</strong> any-bits-set? j k
</p>
</li>
</ul></div>
</li>
</ul></div>
<div class="paragraph"><p>And the others listed below are not.</p></div>
<div class="ulist"><ul>
<li>
<p>
Integer Properties
</p>
<div class="ulist"><ul>
<li>
<p>
<strong>procedure:</strong> logcount n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bit-count n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> integer-length n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> log2-binary-factors n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> first-set-bit n
</p>
</li>
</ul></div>
</li>
<li>
<p>
Bit Within Word
</p>
<div class="ulist"><ul>
<li>
<p>
<strong>procedure:</strong> logbit? index n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> bit-set? index n
</p>
</li>
<li>
<p>
<strong>procedure:</strong> copy-bit index from bit
</p>
</li>
</ul></div>
</li>
<li>
<p>
Field of Bits
</p>
<div class="ulist"><ul>
<li>
<p>
<strong>procedure:</strong> bit-field n start end
</p>
</li>
<li>
<p>
<strong>procedure:</strong> copy-bit-field to from start end
</p>
</li>
<li>
<p>
<strong>procedure:</strong> ash n count
</p>
</li>
<li>
<p>
<strong>procedure:</strong> arithmetic-shift n count
</p>
</li>
<li>
<p>
<strong>procedure:</strong> rotate-bit-field n count start end
</p>
</li>
<li>
<p>
<strong>procedure:</strong> reverse-bit-field n start end
</p>
</li>
</ul></div>
</li>
<li>
<p>
Bits as Booleans
</p>
<div class="ulist"><ul>
<li>
<p>
<strong>procedure:</strong> integer→list k len
</p>
</li>
<li>
<p>
<strong>procedure:</strong> integer→list k
</p>
</li>
<li>
<p>
<strong>procedure:</strong> list→integer list
</p>
</li>
<li>
<p>
<strong>procedure:</strong> booleans→integer bool1 …
</p>
</li>
</ul></div>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_srfi_69_basic_hash_tables">3.16. SRFI-69 Basic hash tables</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>It is just the reference implementation of SRFI-69. The hash functions are not
yet optimized for SigScheme.</p></div>
</div>
<div class="sect2">
<h3 id="_srfi_95_sorting_and_merging">3.17. SRFI-95 Sorting and Merging</h3>
<div class="paragraph"><p>Fully supported.</p></div>
<div class="paragraph"><p>It is just the reference implementation of SRFI-95 (sort.scm of SLIB).</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_r6rs_conformance">4. R6RS conformance</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_r6rs_characters">4.1. R6RS characters</h3>
<div class="paragraph"><p>R6RS characters are partially implemented based on R5.92RS. But since R6RS
specification is not finalized yet, future SigScheme may change the
specification around R6RS characters.</p></div>
<div class="sect3">
<h4 id="_current_r6rs_characters_status">4.1.1. Current R6RS characters status</h4>
<div class="ulist"><ul>
<li>
<p>
Supports Unicode character literals such as #\λ
</p>
</li>
<li>
<p>
Supports #x<digit16>+ literals
</p>
</li>
<li>
<p>
Supports \x<digit16>+; literals in string
</p>
</li>
<li>
<p>
Supports Unicode identifiers (but lacks character category validation)
</p>
</li>
<li>
<p>
Supports all named chars such as #\backspace, #\esc, and #\nul
</p>
</li>
<li>
<p>
Quoted-symbol by vertical bar (such as '|-symbol|) is not supported yet
</p>
</li>
<li>
<p>
Invalidly accepts non-all-lower-case character names such as #\Tab and #TAB
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="_todos">4.1.2. TODOs</h4>
<div class="ulist"><ul>
<li>
<p>
Support new escapes in string (\<linefeed> and \<space>)
</p>
</li>
<li>
<p>
Confirm symbol escape syntax (not defined in R6RS yet)
</p>
</li>
<li>
<p>
Support Unicode character category validation for identifiers
</p>
</li>
<li>
<p>
Disable #\newline on R6RS-compatible mode
</p>
</li>
</ul></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_sigscheme_extensions">5. SigScheme extensions</h2>
<div class="sectionbody">
<div class="paragraph"><p>If <code>--enable-sscm-extensions</code> is specified for configure script explicitly or
implicitly, these features can be used.</p></div>
<div class="sect2">
<h3 id="_legacy_macro">5.1. Legacy macro</h3>
<div class="paragraph"><p>Legacy and common <code>define-macro</code> is provided to define syntactic closures. But
SigScheme’s implementation is having some limitations.</p></div>
<div class="ulist"><ul>
<li>
<p>
The closure can only be defined with top-level environment due to an
internal implementation trick
</p>
</li>
<li>
<p>
Macro forms are kept untransformed in program, and expanded immediately
before each evaluation, as if they are ordinary syntaxes
</p>
</li>
<li>
<p>
<code>define-macro</code> destructively modifies closure object
</p>
</li>
</ul></div>
<div class="paragraph"><p>To avoid problems related to these limitations, side-effect in macros are
strongly discouraged. See following examples for each limitation.</p></div>
<div class="listingblock">
<div class="title">The closure can only be defined with top-level environment</div>
<div class="content">
<pre><code>(define-macro m
(let ((?var 3))
(lambda ()
?var))) ==> error</code></pre>
</div></div>
<div class="listingblock">
<div class="title">Macro forms are kept untransformed in program</div>
<div class="content">
<pre><code>(define cnt 0)
(define-macro m
(lambda ()
(set! cnt (+ cnt 1))
cnt))
(define proc-m
(lambda ()
(m)))
(proc-m) ==> 1
(proc-m) ==> 2 ;; ordinary Scheme implementation returns 1
(proc-m) ==> 3 ;; ordinary Scheme implementation returns 1</code></pre>
</div></div>
<div class="listingblock">
<div class="title"><code>define-macro</code> destructively modifies closure object</div>
<div class="content">
<pre><code>(define f
(lambda (x) (* x x)))
(f (+ 1 2)) ==> 9
(procedure? f) ==> #t
(define-macro mf f)
(mf (+ 1 2)) ==> error
(mf 3) ==> 9
(f (+ 1 2)) ==> error
(procedure? f) ==> error</code></pre>
</div></div>
<div class="paragraph"><p>See <code>test-legacy-macro.scm</code> to know more detailed specification.</p></div>
</div>
<div class="sect2">
<h3 id="_let_optionals">5.2. let-optionals*</h3>
<div class="paragraph"><p><code>let-optionals*</code> is provided for optional argument processing. The
specification is exactly same as Gauche 0.8.8. See <code>test-sscm-ext.scm</code> for
further information.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_siod_compatibility">6. SIOD compatibility</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_siod_specific_features">6.1. SIOD specific features</h3>
<div class="paragraph"><p>If <code>--enable-compat-siod</code> is specified for configure script explicitly or
implicitly, some SIOD compatible features are provided.</p></div>
<div class="ulist"><ul>
<li>
<p>
symbol-value
</p>
</li>
<li>
<p>
set-symbol-value!
</p>
</li>
<li>
<p>
verbose
</p>
</li>
<li>
<p>
undefine
</p>
</li>
<li>
<p>
eof-val
</p>
</li>
<li>
<p>
%%closure-code
</p>
</li>
<li>
<p>
bit-and
</p>
</li>
<li>
<p>
bit-or
</p>
</li>
<li>
<p>
bit-xor
</p>
</li>
<li>
<p>
bit-not
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_siod_specific_behaviors">6.2. SIOD specific behaviors</h3>
<div class="paragraph"><p>If <code>--enable-compat-siod-bugs</code> is specified for configure script explicitly or
implicitly, some procedures and syntaxes emulate SIOD’s behavior. We call them
<em>bugs</em> for convention although they are not actually bugs on non-R5RS-compliant
SIOD implementation.</p></div>
<div class="ulist"><ul>
<li>
<p>
<code>#f</code> is identical to null list
</p>
</li>
<li>
<p>
<code>(car \'())</code> evaluates to <code>()</code>
</p>
</li>
<li>
<p>
<code>(cdr \'())</code> evaluates to <code>()</code>
</p>
</li>
<li>
<p>
<code>(if #f #t)</code> evaluates to <code>#f</code>
</p>
</li>
<li>
<p>
<code>let</code> and <code>let*</code> accepts value-less binding forms
</p>
</li>
<li>
<p>
<code>=</code> predicate can be applied to non-number objects
</p>
</li>
</ul></div>
<div class="listingblock">
<div class="title">#f is identical to null list</div>
<div class="content">
<pre><code>(null? #f) ==> #t
(null? '()) ==> #t
(boolean? #f) ==> #t
(boolean? '()) ==> #t
(if '() 'true 'false) ==> false</code></pre>
</div></div>
<div class="listingblock">
<div class="title"><code>let</code> and <code>let*</code> accepts value-less binding forms</div>
<div class="content">
<pre><code>(let ((var))
var) ==> #f
(let* ((var))
var) ==> #f
(letrec ((var))
var) ==> error</code></pre>
</div></div>
<div class="listingblock">
<div class="title"><code>=</code> predicate can be applied to non-number objects</div>
<div class="content">
<pre><code>(require-extension (siod))
(= 3 (+ 1 2)) ==> #t
(= 3 (+ 1 2) 3) ==> error ;; only accepts 2 args
(define lst '(0 1 2))
(= lst lst) ==> #t
(= lst (list 0 1 2)) ==> #f
;; '=' is defined as follows if --enable-compat-siod-bugs
(define =
(let ((%= =))
(lambda (x y)
(or (eq? x y)
(%= x y)))))</code></pre>
</div></div>
</div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated
2020-08-24 21:33:41 UTC
</div>
</div>
</body>
</html>
|