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
|
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on May, 22 2008 by texi2html 1.64-gnat-1 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>ASIS-for-GNAT Reference Manual: Implementation-Specific Features and Implementation Permissions</TITLE>
<META NAME="description" CONTENT="ASIS-for-GNAT Reference Manual: Implementation-Specific Features and Implementation Permissions">
<META NAME="keywords" CONTENT="ASIS-for-GNAT Reference Manual: Implementation-Specific Features and Implementation Permissions">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64-gnat-1">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC10"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC9"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC11"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 3. Implementation-Specific Features and Implementation Permissions </H1>
<!--docid::SEC10::-->
<P>
ASIS permits four kinds of implementation-specific behavior.
</P><P>
First, ASIS subprograms that define an interface between an ASIS
implementation and the underlying Ada implementation have
implementation-specific parameters. There are three such queries ---
<CODE>Asis.Implementation.Initialize</CODE>,
<A NAME="IDX10"></A>
<CODE>Asis.Implementation.Finalize</CODE> and
<A NAME="IDX11"></A>
<CODE>Asis.Ada_Environments.Associate</CODE>.
<A NAME="IDX12"></A>
Each has a string parameter
named <CODE>Parameters</CODE> with an implementation-specific meaning. The meaning
of the <CODE>Parameters</CODE> string in ASIS-for-GNAT is discussed in
<A HREF="asis_rm_4.html#SEC11">3.1 Interacting with the Underlying Ada Implementation</A>.
</P><P>
Second, in some areas the ASIS standard explicitly grants the
implementation permission to provide restricted functionality;
generally this allows omitting features that could present
considerable implementation difficulty.
Such permissions usually affect more than one ASIS query.
The ASIS package <CODE>Asis.Implementation.Permissions</CODE>
<A NAME="IDX13"></A>
contains boolean
queries identifying the choices made by a given ASIS implementation.
The ASIS-for-GNAT approach to these implementation permissions is discussed in
<A HREF="asis_rm_4.html#SEC16">3.2 Implementation Permissions</A>.
</P><P>
Third, the ASIS standard defines specific implementation permissions
for some queries.
Also, the result of a query may be implementation specific because of the
nature of the query.
See
<A HREF="asis_rm_4.html#SEC21">3.3 ASIS Queries Having Specific Implementation Permissions or Implementation-Specific Results</A>.
</P><P>
Finally, ASIS-for-GNAT provides special <CODE>Context</CODE> manipulation mechanisms
that supplement those defined in the ASIS standard.
These additional <CODE>Context</CODE> modes may be useful for
some ASIS applications.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC11">3.1 Interacting with the Underlying Ada Implementation</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC16">3.2 Implementation Permissions</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC21">3.3 ASIS Queries Having Specific Implementation Permissions or Implementation-Specific Results</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC30">3.4 Dynamic <CODE>Context</CODE> Modes</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Interacting with the Underlying Ada Implementation"></A>
<HR SIZE="6">
<A NAME="SEC11"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC12"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.1 Interacting with the Underlying Ada Implementation </H2>
<!--docid::SEC11::-->
<P>
This section describes how to use the <CODE>Parameters</CODE> string to
pass implementation-specific information to several ASIS subprograms.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC12">3.1.1 Format of the <CODE>Parameters</CODE> String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC13">3.1.2 Parameters of <CODE>Asis.Implementation.Initialize</CODE></A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC14">3.1.3 Parameters of <CODE>Asis.Implementation.Finalize</CODE></A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC15">3.1.4 Parameters of <CODE>Asis.Ada_Environments.Associate</CODE></A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Format of the Parameters String"></A>
<HR SIZE="6">
<A NAME="SEC12"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC11"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC13"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.1.1 Format of the <CODE>Parameters</CODE> String </H3>
<!--docid::SEC12::-->
<P>
A <CODE>Parameters</CODE> string is passed to three ASIS
subprograms: <CODE>Asis.Implementation.Initialize</CODE>,
<A NAME="IDX14"></A>
<CODE>Asis.Implementation.Finalize</CODE>,
<A NAME="IDX15"></A>
and <CODE>Asis.Ada_Environments.Associate</CODE>.
<A NAME="IDX16"></A>
</P><P>
The <CODE>Parameters</CODE> string comprises substrings delimited by separators.
The substrings are called <EM>parameters</EM> (with lower-case 'p') below.
A separator is a non-empty string comprising characters from the set
<CODE>{ <CODE><Space></CODE>,<CODE><LF></CODE>, <CODE><CR></CODE>}</CODE>.
There may be 0 or more parameters in a <CODE>Parameters</CODE> string, and there
may be separators before the first and/or after the last parameter.
</P><P>
Each of the queries <CODE>Asis.Implementation.Initialize</CODE>,
<CODE>Asis.Implementation.Finalize</CODE>, and
<CODE>Asis.Ada_Environments.Associate</CODE> has specific rules for the
format of its parameters.
If some parameter is not well-formed,
then either a warning message is generated or else
the <CODE>ASIS_Failed</CODE>
<A NAME="IDX17"></A>
exception is raised with the <CODE>Parameter_Error</CODE> status.
<A NAME="IDX18"></A>
The descriptions below explain the situations where
<CODE>ASIS_Failed</CODE> is raised.
</P><P>
<A NAME="Parameters of Asis.Implementation.Initialize"></A>
<HR SIZE="6">
<A NAME="SEC13"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC12"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC14"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC14"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.1.2 Parameters of <CODE>Asis.Implementation.Initialize</CODE> </H3>
<!--docid::SEC13::-->
<P>
The allowed parameters for <CODE>Asis.Implementation.Initialize</CODE> are as
follows:
</P><P>
<DL COMPACT>
<DT><CODE>-d<flag></CODE>
<DD>The specific ASIS-for-GNAT debug flag named <CODE><flag></CODE> is set ON
<A NAME="IDX19"></A>
<P>
<DT><CODE>-dall</CODE>
<DD>All the ASIS-for-GNAT debug flags are set ON
<P>
<DT><CODE>-k</CODE>
<DD>Keep going even if an internal implementation error is detected.
When a non-ASIS exception is raised, it is replaced by
raising <CODE>ASIS_Failed</CODE> with <CODE>Unhandled_Exception_Error</CODE> status (this
is the only case when <CODE>Unhandled_Exception_Error</CODE> is set) and the
<CODE>Diagnosis</CODE> string containing the name and the message from the
non-ASIS exception originally raised
<P>
<DT><CODE>-nbb</CODE>
<DD>No bug box. Do not output to <CODE>Standard_Error</CODE> the bug box
containing the description of the internal implementation bug.
Implies <CODE>-k</CODE>
<P>
<DT><CODE>-vs</CODE>
<DD>Set the strong GNAT/ASIS version check when reading the tree files
<P>
<DT><CODE>-we</CODE>
<DD>All ASIS warnings are treated as errors.
<A NAME="IDX20"></A>
When execution reaches the point where the warning would occur,
the <CODE>ASIS_Failed</CODE>
<A NAME="IDX21"></A>
exception is raised;
the warning message is the ASIS <CODE>Diagnosis</CODE> string.
<A NAME="IDX22"></A>
<P>
<DT><CODE>-ws</CODE>
<DD>All ASIS warning messages are suppressed.
</DL>
<P>
The <CODE><flag></CODE> value for the <SAMP>`-d'</SAMP> parameter
may be any lower case letter from <CODE>a</CODE> through <CODE>z</CODE> or any digit
from <CODE>0</CODE> through <CODE>9</CODE>, although
not all of the 36 possible flags are implemented.
For more information,
refer to the documentation in the source file <TT>`a4g-a_debug.adb'</TT>.
See also <A HREF="asis_rm_5.html#SEC33">4.2 ASIS Debug Flags</A>.
</P><P>
If more then one parameter controlling the warning mode
<A NAME="IDX23"></A>
is set in the <CODE>Parameters</CODE> string, all but the last one are ignored.
</P><P>
<A NAME="Parameters of Asis.Implementation.Finalize"></A>
<HR SIZE="6">
<A NAME="SEC14"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC13"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC15"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC15"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.1.3 Parameters of <CODE>Asis.Implementation.Finalize</CODE> </H3>
<!--docid::SEC14::-->
<P>
No parameters are allowed for <CODE>Asis.Implementation.Finalize</CODE>.
</P><P>
<CODE>Asis.Implementation.Finalize</CODE> resets all the general
ASIS-for-GNAT parameters to their default values (that is, all the debug flags
are set OFF, and the warning mode is set to the default warning mode).
</P><P>
<A NAME="Parameters of Asis.Ada_Environments.Associate"></A>
<HR SIZE="6">
<A NAME="SEC15"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC14"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.1.4 Parameters of <CODE>Asis.Ada_Environments.Associate</CODE> </H3>
<!--docid::SEC15::-->
<P>
The following parameters are allowed:
</P><P>
<DL COMPACT>
<DT><CODE>-C1</CODE>
<DD>The <CODE>Context</CODE> comprises a single tree file,
<A NAME="IDX24"></A>
whose name is given as the next parameter in the <CODE>Parameters</CODE> string.
<P>
<DT><CODE>-CN</CODE>
<DD>The <CODE>Context</CODE> comprises a set of one or more tree files, whose names are
given as the next set of parameters in the <CODE>Parameters</CODE> string.
<P>
<DT><CODE>-CA</CODE>
<DD>The <CODE>Context</CODE> comprises all the tree files in the tree search path.
<P>
<DT><CODE>-FS</CODE>
<DD>All the trees considered as making up a given <CODE>Context</CODE> are created
"on the fly", whether or not the corresponding tree file already exists.
Once created, a tree file then is reused as long as the <CODE>Context</CODE> remains
open.
<P>
<DT><CODE>-FT</CODE>
<DD>Only pre-created trees are used; no tree files are created by ASIS.
<P>
<DT><CODE>-FM</CODE>
<DD>Mixed approach: if a needed tree does not exist, an attempt is made to create
it "on the fly".
<P>
<DT><CODE>-SA</CODE>
<DD>Source files for all the <CODE>Compilation_Unit</CODE>s belonging to the
<CODE>Context</CODE> (except
the predefined <CODE>Standard</CODE> package) are considered in the consistency
check when opening the <CODE>Context</CODE>.
<A NAME="IDX25"></A>
<P>
<DT><CODE>-SE</CODE>
<DD>Only existing source files for all the <CODE>Compilation_Units</CODE> belonging to
the <CODE>Context</CODE> are considered in the consistency check when opening the
<CODE>Context</CODE>.
<P>
<DT><CODE>-SN</CODE>
<DD>No source files from the underlying file system are taken into account when
checking the consistency of the set of tree files making up the
<CODE>Context</CODE>.
<P>
<DT><CODE>-I<dir></CODE>
<DD>Defines the directory in which to search for source files when compiling
sources to create a tree "on the fly".
<P>
<DT><CODE>--GCC=<VAR>compiler_name</VAR></CODE>
<DD>Defines the program to be called to create the tree on the fly
<P>
<DT><CODE>-gnatec<file></CODE>
<DD>Defines the additional configuration file to be used when calling GNAT to
create the tree on the fly for <SAMP>`-FS'</SAMP> or <SAMP>`-FM'</SAMP> Context
<P>
<DT><CODE>-gnatA</CODE>
<DD>Avoid processing <TT>`gnat.adc'</TT> when calling GNAT to create
the tree on the fly for <SAMP>`-FS'</SAMP> or <SAMP>`-FM'</SAMP> Context
<P>
<DT><CODE>-T<dir></CODE>
<DD>Defines the directory in which to search for a tree file.
<P>
<DT><CODE><file_name></CODE>
<DD>Defines the name of a tree file (used in conjunction with <SAMP>`-C1'</SAMP> or
<SAMP>`-CN'</SAMP>).
</DL>
<P>
For the <SAMP>`-I'</SAMP> and <SAMP>`-T'</SAMP> parameters, <CODE><dir></CODE> should denote an
existing directory in the underlying file system. The "." and ".."
notations are allowed, as well as relative or absolute directory names.
If <CODE><dir></CODE> does not denote an existing directory, <CODE>ASIS_Failed</CODE>
<A NAME="IDX26"></A>
with <CODE>Parameter_Error</CODE> status is raised.
</P><P>
For ASIS <SAMP>`-FS'</SAMP> or <SAMP>`-FM'</SAMP> Context, Context parameters <SAMP>`-I'</SAMP>,
<SAMP>`-gnatec'</SAMP> and <SAMP>`-gnatA'</SAMP> are passed to the GNAT call to create
the tree on the fly and these parameters have exactly the same meaning as they
have for GNAT.
</P><P>
A tree file name given by a <CODE><file_name></CODE> parameter may or may not
contain directory information.
</P><P>
Any relative directory name or file name containing relative directory
information should start from "." or "..".
</P><P>
If a directory or a file name used as a part of some Context parameter contains
space characters, this name should be quoted.
</P><P>
The search path
<A NAME="IDX27"></A>
associated with an ASIS <CODE>Context</CODE> consists of the directories
listed as parameters for the <CODE>Asis.Ada_Environments.Associate</CODE> query, in
the same order as they are included in the actual <CODE>Parameters</CODE> string.
The ASIS source search path consists only of the directories following
<SAMP>`-I'</SAMP>, and the ASIS tree search path consists only of the directories
following <SAMP>`-T'</SAMP>. If no source (tree) directories are present in the
value of the <CODE>Parameters</CODE> string, then the ASIS source (tree) search path
consists of the current directory only. Otherwise the current directory is
included in the ASIS search path if and only if it is set explicitly as
<SAMP>`-I.'</SAMP> or <SAMP>`-T.'</SAMP> respectively.
</P><P>
If an ASIS <CODE>Context</CODE> is associated with an <SAMP>`-FS'</SAMP> or <SAMP>`-FM'</SAMP>
option, the <CODE>Context</CODE> source search path is used to locate sources of the
units for which tree files need to be created, and to locate other source
files needed during compilation. For example, if we have:
</P><P>
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=+0><pre>Asis.Ada_Environments.Associate
(My_Context,
"My_Context_Name",
"-CA -FS -I./dir -I.");
</FONT></pre></td></tr></table></P><P>
then, when processing a call:
</P><P>
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=+0><pre>My_Unit := Asis.Compilation_Units.Library_Unit_Declaration
("Foo", My_Context);
</FONT></pre></td></tr></table></P><P>
ASIS first tries to locate the source file <TT>`foo.ads'</TT> in <TT>`./dir'</TT>, and
if this attempt fails, it tries to locate it in the current directory. If
there is no such file in the current directory, ASIS continues the search by
looking into the directories listed in the value of <CODE>ADA_INCLUDE_PATH</CODE>
environment variable. If the source file is found (say in the current
directory), ASIS creates the tree file by calling the compiler:
</P><P>
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=+0><pre>$ gcc -c -gnatc -gnatt -I./dir -I. -I- foo.ads
</FONT></pre></td></tr></table></P><P>
If an ASIS <CODE>Context</CODE> is associated with <SAMP>`-CA'</SAMP> option, then, when
this <CODE>Context</CODE> is opened, ASIS processes all the tree files located in
the tree search path associated with the <CODE>Context</CODE>.
</P><P>
The following further rules define the required combinations of parameters
in the actual <CODE>Parameters</CODE> string:
</P><P>
<UL>
<LI>
<SAMP>`-C1'</SAMP> and <SAMP>`-CN'</SAMP> require <SAMP>`-FT'</SAMP>
<P>
<LI>
<SAMP>`-FS'</SAMP> and <SAMP>`-FM'</SAMP> require <SAMP>`-SA'</SAMP>
</UL>
<P>
In case an incompatible combination is set, <CODE>ASIS_Failed</CODE>
<A NAME="IDX28"></A>
with <CODE>Parameter_Error</CODE>
<A NAME="IDX29"></A>
status is raised.
</P><P>
If the actual <CODE>Parameters</CODE> string passed to
<CODE>Associate</CODE> contains no parameters, the default parameters
are <SAMP>`-CA'</SAMP>, <SAMP>`-FT'</SAMP>, and <SAMP>`-SA'</SAMP>.
</P><P>
The <SAMP>`-FS'</SAMP> and <SAMP>`-FM'</SAMP> options define <EM>dynamic Context modes</EM>;
<A NAME="IDX30"></A>
they allow the content of a <CODE>Context</CODE> (that is, the set
of ASIS <CODE>Compilation_Unit</CODE>s contained in the <CODE>Context</CODE>) to be
changed while the <CODE>Context</CODE> is open. See <A HREF="asis_rm_4.html#SEC30">3.4 Dynamic <CODE>Context</CODE> Modes</A> for
more details.
</P><P>
For the <CODE>Name</CODE> parameter
<A NAME="IDX31"></A>
of the <CODE>Asis.Ada_Environments.Associate</CODE>
query, any string can be passed as an actual parameter.
No verification is performed on the contents, and no semantics are
associated with this parameter.
</P><P>
<A NAME="Implementation Permissions"></A>
<HR SIZE="6">
<A NAME="SEC16"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC15"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC17"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.2 Implementation Permissions </H2>
<!--docid::SEC16::-->
<P>
This section describes how ASIS-for-GNAT deals with
implementation permissions.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC17">3.2.1 <CODE>Asis.Implementation.Permissions</CODE> Queries</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC18">3.2.2 Processing Implicit <CODE>Element</CODE>s</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC19">3.2.3 Processing Several Contexts at a Time</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_4.html#SEC20">3.2.4 Implementation-Defined Types and Values</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Asis.Implementation.Permissions Queries"></A>
<HR SIZE="6">
<A NAME="SEC17"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC18"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.2.1 <CODE>Asis.Implementation.Permissions</CODE> Queries </H3>
<!--docid::SEC17::-->
<P>
The Boolean queries defined in the <CODE>Asis.Implementation.Permissions</CODE>
package return the following results:
</P><P>
<TABLE>
<TR><TD><EM>Query</EM> </TD><TD> <EM>Value</EM></TD>
</TR>
<TR><TD><CODE>Is_Formal_Parameter_Named_Notation_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR>
<TR><TD><CODE>Default_In_Mode_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR>
<TR><TD><CODE>Generic_Actual_Part_Normalized</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Record_Component_Associations_Normalized</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Is_Prefix_Call_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR>
<TR><TD><CODE>Function_Call_Parameters_Normalized</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Call_Statement_Parameters_Normalized</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Discriminant_Associations_Normalized</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Is_Line_Number_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR>
<TR><TD><CODE>Is_Span_Column_Position_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR>
<TR><TD><CODE>Is_Commentary_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR>
<TR><TD><CODE>Attributes_Are_Supported</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Implicit_Components_Supported</CODE> </TD><TD> <CODE>False</CODE> (*)</TD>
</TR>
<TR><TD><CODE>Object_Declarations_Normalized</CODE> </TD><TD> <CODE>False</CODE></TD>
</TR>
<TR><TD><CODE>Predefined_Operations_Supported</CODE> </TD><TD> <CODE>False</CODE> (*)</TD>
</TR>
<TR><TD><CODE>Inherited_Declarations_Supported</CODE> </TD><TD> <CODE>True</CODE> (*)</TD>
</TR>
<TR><TD><CODE>Inherited_Subprograms_Supported</CODE> </TD><TD> <CODE>True</CODE> (*)</TD>
</TR>
<TR><TD><CODE>Generic_Macro_Expansion_Supported</CODE> </TD><TD> <CODE>True</CODE></TD>
</TR></TABLE>
<P>
(*) See also <A HREF="asis_rm_4.html#SEC18">3.2.2 Processing Implicit <CODE>Element</CODE>s</A>.
</P><P>
<A NAME="Processing Implicit Elements"></A>
<HR SIZE="6">
<A NAME="SEC18"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC17"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC19"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC19"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.2.2 Processing Implicit <CODE>Element</CODE>s </H3>
<!--docid::SEC18::-->
<P>
ASIS <CODE>Element</CODE>s represent both explicit and implicit<A NAME="DOCF4" HREF="asis_rm_fot.html#FOOT4">(4)</A>
components of Ada programs.
Some ASIS queries can return implicit <CODE>Element</CODE>s (that is,
<CODE>Element</CODE>s representing implicit Ada constructs). Any syntactic or
semantic query should accept an implicit <CODE>Element</CODE> as an <CODE>Element</CODE>
parameter, but the ASIS Standard allows an implementation not to support
implicit <CODE>Element</CODE>s at all, or to support them only partially. If an
implementation does not support the implicit <CODE>Element</CODE> representing
a particular kind of construct, then an ASIS query that is supposed to process
this implicit <CODE>Element</CODE> should return either a <CODE>Nil_Element</CODE> or a
<CODE>Nil_Element_List</CODE> depending on whether the query returns a single
<CODE>Element</CODE> or an <CODE>Element_List</CODE>.
</P><P>
Implicit <CODE>Element</CODE>s are partially supported by ASIS-for-GNAT.
</P><P>
ASIS-for-GNAT supports implicit <CODE>Element</CODE>s for the following constructs:
</P><P>
<UL>
<LI>Derived user-defined subprograms
<LI>Derived enumeration literals
<LI>Derived record components
</UL>
<P>
ASIS-for-GNAT does not
support implicit <CODE>Element</CODE>s representing implicit declarations of
predefined type operations (such as "<CODE>=</CODE>", or the "<CODE>+</CODE>"
operation for numeric types).
</P><P>
<A NAME="Processing Several Contexts at a Time"></A>
<HR SIZE="6">
<A NAME="SEC19"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC18"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC20"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC20"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.2.3 Processing Several Contexts at a Time </H3>
<!--docid::SEC19::-->
<P>
According to the ASIS Standard, the number of ASIS <CODE>Context</CODE>s that can be
associated and opened at a time, as well as the number of ASIS
<CODE>Compilation_Unit</CODE>s that can be processed at a time, are
implementation specific.
ASIS-for-GNAT does not impose any restriction on the number of
<CODE>Context</CODE>s opened at the same time, or on the number of
<CODE>Compilation_Unit</CODE>s that can be obtained from all the opened
<CODE>Context</CODE>s, as long as the application does not go beyond general
system resource limitations.
<A NAME="IDX32"></A>
</P><P>
However, for a <CODE>Context</CODE> associated with an <SAMP>`-FS'</SAMP> or <SAMP>`-FM'</SAMP>
option, all the trees created "on the fly" while obtaining
<CODE>Compilation_Unit</CODE>s from this <CODE>Context</CODE> are placed in the current
directory. If the current directory also contains
some tree files belonging to another <CODE>Context</CODE>, the latter may become
corrupted. To process more than one <CODE>Context</CODE> safely, an application
should have at most one <CODE>Context</CODE> associated with the <SAMP>`-FS'</SAMP> or
<SAMP>`-FM'</SAMP> option. Moreover, if among <CODE>Context</CODE>s processed at the same
time there is one that can create trees "on the fly", then the other
<CODE>Context</CODE>s should not use tree files located in the current directory.
</P><P>
<A NAME="Implementation-Defined Types and Values"></A>
<HR SIZE="6">
<A NAME="SEC20"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC19"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 3.2.4 Implementation-Defined Types and Values </H3>
<!--docid::SEC20::-->
<P>
All the implementation-defined types, subtypes and values depend on the
subtype <CODE>Implementation_Defined_Integer_Type</CODE>
<A NAME="IDX33"></A>
and on the
<CODE>Implementation_Defined_Integer_Constant</CODE>
<A NAME="IDX34"></A>
defined in package <CODE>Asis</CODE>.
ASIS-for-GNAT's declarations for these entities are the same as in the ASIS
Standard:
</P><P>
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=+0><pre>subtype Implementation_Defined_Integer_Type is Integer;
Implementation_Defined_Integer_Constant : constant := 2**31-1;
</FONT></pre></td></tr></table></P><P>
All the ASIS (sub)types used as list indexes for ASIS array types have
<CODE>Implementation_Defined_Integer_Constant</CODE> as an upper bound.
</P><P>
<A NAME="ASIS Queries Having Specific Implementation Permissions or Implementation-Specific Results"></A>
<HR SIZE="6">
<A NAME="SEC21"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC20"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC30"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC30"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.3 ASIS Queries Having Specific Implementation Permissions or Implementation-Specific Results </H2>
<!--docid::SEC21::-->
<P>
This section documents
queries having implementation permissions (given under <CODE>--|IP</CODE> sentinel
in the ASIS definition) and queries whose behavior is otherwise
implementation specific. Such queries are presented below
in their order of appearance in the ASIS Standard.
The clause and subclause numbers shown are those from the ASIS Standard.
</P><P>
The results returned by the ASIS <CODE>Debug_Image</CODE>
<A NAME="IDX35"></A>
queries are discussed in
<A HREF="asis_rm_5.html#SEC32">4.1 Interpreting Debug Images</A>.
</P><P>
<A NAME="SEC22"></A>
<H3> <CITE>ASIS 8</CITE> <CODE>package Asis.Ada_Environments</CODE> </H3>
<!--docid::SEC22::-->
<P>
<CITE>ASIS 8.1</CITE> <CODE>function Default_Name</CODE>
<A NAME="IDX36"></A>
<UL>
<LI>
Null string is returned.
</UL>
<P>
<CITE>ASIS 8.2</CITE> <CODE>function Default_Parameters</CODE>
<A NAME="IDX37"></A>
<UL>
<LI>
Null string is returned;.
</UL>
<P>
<CITE>ASIS 8.4</CITE> <CODE>procedure Open</CODE>
<A NAME="IDX38"></A>
<UL>
<LI>
For a <CODE>Context</CODE> associated with the <SAMP>`-CA'</SAMP> option:
<P>
<UL>
<LI>
If <SAMP>`-FS'</SAMP> is also set, nothing is done.
<P>
<LI>
If the <SAMP>`-FT'</SAMP> or <SAMP>`-FM'</SAMP> is set, all the tree files (that is,
files having <TT>`.adt'</TT> suffix) in the tree search path
associated with the <CODE>Context</CODE> are processed.
ASIS reads in each tree file and checks
that it was created with
the <SAMP>`-gnatc'</SAMP> option. Tree files that cannot be read in or
that were not created with the <SAMP>`-gnatc'</SAMP> option are ignored.
For each other tree ASIS collects some "black-box"
information about the <CODE>Compilation_Unit</CODE>s that it represents,
and performs a consistency check
<A NAME="IDX39"></A>
for every unit it encounters in the tree (see <CITE>ASIS-for-GNAT
User's Guide</CITE> for a discussion of the consistency
problem). If any consistency check fails, <CODE>ASIS_Failed</CODE>
<A NAME="IDX40"></A>
is raised and the <CODE>Context</CODE> remains closed.
</UL>
<P>
<LI>
For a <CODE>Context</CODE> associated with a <SAMP>`-C1'</SAMP> or <SAMP>`-CN'</SAMP> option,
ASIS processes all the tree files associated with the <CODE>Context</CODE>,
collecting "black-box" information and performing consistency
checks for all the encountered Compilation Units.
If for any reason a tree file cannot be
successfully read in for a <CODE>Context</CODE> associated with a <SAMP>`-C1'</SAMP>
option, <CODE>ASIS_Failed</CODE> is raised and the <CODE>Context</CODE> remains
closed.
If a tree read fails for a <CODE>Context</CODE> associated with a
<SAMP>`-CN'</SAMP> option, an ASIS warning
<A NAME="IDX41"></A>
is generated and the <CODE>Context</CODE> opening process continues.
If any consistency check fails, <CODE>ASIS_Failed</CODE>
<A NAME="IDX42"></A>
is raised and the <CODE>Context</CODE> remains closed.
</UL>
<P>
<A NAME="SEC23"></A>
<H3> <CITE>ASIS 9</CITE> <CODE>package Asis.Ada_Environments.Containers</CODE> </H3>
<!--docid::SEC23::-->
<P>
<UL>
<LI>
ASIS-for-GNAT supports the trivial <CODE>Container</CODE> model. Every
<CODE>Context</CODE> contains exactly one <CODE>Container</CODE>, whose content and name
are the same as its enclosing <CODE>Context</CODE>
</UL>
<P>
<A NAME="SEC24"></A>
<H3> <CITE>ASIS 10</CITE> <CODE>package Asis.Compilation_Units</CODE> </H3>
<!--docid::SEC24::-->
<P>
<CITE>ASIS 10.3</CITE> <CODE>function Unit_Origin</CODE>
<A NAME="IDX43"></A>
</P><P>
<UL>
<LI>
<CODE>A_Predefined_Unit</CODE> origin is returned for those compilation units
<A NAME="IDX44"></A>
listed in RM95, Annex A(2), and only for these units.
<P>
<LI>
<CODE>An_Implementation_Unit</CODE> origin is returned for compilation
<A NAME="IDX45"></A>
units that are the components of the GNAT Run-Time
Library, but that are not listed in RM95, Annex A(2).
<P>
<LI>
<CODE>An_Application_Unit</CODE> origin is returned for all other
<A NAME="IDX46"></A>
compilation units.
</UL>
<P>
<CITE>ASIS 10.6</CITE> <CODE>function Library_Unit_Declaration</CODE> and <CITE>ASIS 10.7</CITE>
<CODE>function Compilation_Unit_Body</CODE>
<A NAME="IDX47"></A>
<A NAME="IDX48"></A>
</P><P>
<UL>
<LI>
When processing a <CODE>Context</CODE> associated with an <SAMP>`-FS'</SAMP> or
<SAMP>`-FM'</SAMP> option, if ASIS cannot find a needed unit in the tree files
that have been already processed, it tries to create the needed tree by
locating the source of the unit and compiling it "on the fly". If this
attempt fails for any reason, <CODE>Nil_Compilation_Unit</CODE> is returned.
</UL>
<P>
<CITE>ASIS 10.13</CITE> <CODE>function Corresponding_Declaration</CODE>
<A NAME="IDX49"></A>
</P><P>
<UL>
<LI>
ASIS-for-GNAT does not make use of ASIS <CODE>Compilation_Unit</CODE>s
of <CODE>An_Unknown_Unit</CODE> kind.
<A NAME="IDX50"></A>
<P>
<LI>
If an argument is of <CODE>A_Public_Declaration_And_Body</CODE> class,
<CODE>Nil_Compilation_Unit</CODE> is returned.
</UL>
<P>
<CITE>ASIS 10.14</CITE> <CODE>function Corresponding_Body</CODE>
<A NAME="IDX51"></A>
</P><P>
<UL>
<LI>
ASIS-for-GNAT does not make use of ASIS <CODE>Compilation_Unit</CODE>s
of <CODE>An_Unknown_Unit</CODE> kind.
</UL>
<P>
<CITE>ASIS 10.22</CITE> <CODE>function Can_Be_Main_Program</CODE>
<A NAME="IDX52"></A>
</P><P>
<UL>
<LI>
For GNAT, any parameterless library procedure and any
parameterless library function returning a result of an integer type is
classified by this query as a (possible) main subprogram for a partition.
<P>
<LI>
If for such a library subprogram both spec and body exist as ASIS
<CODE>Compilation_Unit</CODE>s retrievable from a given ASIS <CODE>Context</CODE>, both
are considered as <CODE>Can_Be_Main_Program</CODE>.
</UL>
<P>
<CITE>ASIS 10.24</CITE> <CODE>function Text_Name</CODE>
<A NAME="IDX53"></A>
</P><P>
<UL>
<LI>
This function returns the name of the source file containing the source of
<CODE>Compilation_Unit</CODE>. This name may or may not contain a prefix denoting
the directory in the underlying file system. If present, the directory may be
given in absolute or relative form, depending on the command line options
that were used for the call to GNAT that created the corresponding tree
file.
<P>
<LI>
This function does not check the existence of the corresponding source file in
the underlying file system, it just reflects the situation which was in
effect when the corresponding tree file was created. Thus, if you delete or
move the corresponding source file after creating the tree, the full file
name returned by this function will be incorrect.
<P>
<LI>
Use the query <CODE>Asis.Extensions.Source_File_Status</CODE> to get the information
about the current status of the source file for a <CODE>Compilation_Unit</CODE>.
</UL>
<P>
<CITE>ASIS 10.25</CITE> <CODE>function Text_Form</CODE>
<A NAME="IDX54"></A>
</P><P>
<UL>
<LI>
In the GNAT compilation model all source files are ordinary text files in the
underlying file system. Therefore this function always returns a
<CODE>Nil_Asis_String</CODE> to indicate that <CODE>Text_IO.Open</CODE> uses the default
options for manipulating Ada sources.
</UL>
<P>
<CITE>ASIS 10.26</CITE> <CODE>function Object_Name</CODE>
<A NAME="IDX55"></A>
</P><P>
<UL>
<LI>
Returns a null string. In the GNAT environment, creating an object file has
no connection with creating trees for ASIS.
</UL>
<P>
<CITE>ASIS 10.27</CITE> <CODE>function Object_Form</CODE>
<A NAME="IDX56"></A>
</P><P>
<UL>
<LI>
Returns a null string.
</UL>
<P>
<CITE>ASIS 10.29</CITE> <CODE>function Has_Attribute</CODE>
<A NAME="IDX57"></A>
</P><P>
<UL>
<LI>
Returns <CODE>False</CODE>. ASIS-for-GNAT does not provide any additional attributes
for Compilation Units.
</UL>
<P>
<CITE>ASIS 10.30</CITE> <CODE>function Attribute_Value_Delimiter</CODE>
<A NAME="IDX58"></A>
</P><P>
<UL>
<LI>
Returns a wide string of length one containing the <CODE>LF</CODE> wide
character.
</UL>
<P>
<CITE>ASIS 10.31</CITE> <CODE>function Attribute_Values</CODE>
<A NAME="IDX59"></A>
</P><P>
<UL>
<LI>
A null string is returned.
</UL>
<P>
<A NAME="SEC25"></A>
<H3> <CITE>ASIS 11</CITE> <CODE>package Asis.Compilation_Units.Times</CODE> </H3>
<!--docid::SEC25::-->
<P>
<CITE>ASIS 11.2</CITE> <CODE>function Time_Of_Last_Update</CODE>
<A NAME="IDX60"></A>
</P><P>
<UL>
<LI>
This function returns the time stamp (the time of the latest change)
of the corresponding
source file. The corresponding source file is the source file whose name is
returned by <CODE>Asis.Compilation_Units.Text_Name</CODE>.
</UL>
<P>
<CITE>ASIS 11.3</CITE> <CODE>function Compilation_CPU_Duration</CODE>
<A NAME="IDX61"></A>
</P><P>
<UL>
<LI>
This function always returns zero duration, because the CPU compilation
duration concept does not apply to ASIS-for-GNAT
</UL>
<P>
<CITE>ASIS 11.4</CITE> <CODE>function Attribute_Time</CODE>
<A NAME="IDX62"></A>
</P><P>
<UL>
<LI>
This function always returns <CODE>Nil_ASIS_Time</CODE> because
ASIS-for-GNAT does not provide any <CODE>Compilation_Unit</CODE> attributes
</UL>
<P>
<A NAME="SEC26"></A>
<H3> <CITE>ASIS 13</CITE> <CODE>package Asis.Elements</CODE> </H3>
<!--docid::SEC26::-->
<P>
<CITE>ASIS 13.3</CITE> <CODE>function Context_Clause_Elements</CODE>
<A NAME="IDX63"></A>
</P><P>
<UL>
<LI>
This function returns exactly those clauses and pragmas that are in the
source for the unit.
<P>
<LI>
Returns <CODE>Nil_Element_List</CODE> if the argument unit is of
<CODE>A_Nonexistent_Declaration</CODE>, <CODE>A_Nonexistent_Body</CODE> or
<CODE>An_Unknown_Unit</CODE> kind
<P>
<LI>
Returns <CODE>Nil_Element_List</CODE> for the predefined package <CODE>Standard</CODE>.
For all other predefined Ada compilation units, returns their context clauses
as they appear in the sources held in the GNAT Run-Time
Library.
</UL>
<P>
<CITE>ASIS 13.4</CITE> <CODE>function Configuration_Pragmas</CODE>
<A NAME="IDX64"></A>
</P><P>
<UL>
<LI>
This function always returns <CODE>Nil_Element_List</CODE>, because in the GNAT
compilation environment "a list of pragmas that apply to all future
compilation_unit elements compiled into <CODE>The_Context</CODE>" essentially
depends on the GNAT options set when compiling a unit (in particular the
<SAMP>`-gnatA'</SAMP> and <SAMP>`-gnatec'</SAMP> options), and this cannot be determined
from the content of the given <CODE>Context</CODE>.
</UL>
<P>
<CITE>ASIS 13.5</CITE> <CODE>function Compilation_Pragmas</CODE>
<A NAME="IDX65"></A>
</P><P>
<UL>
<LI>
If the argument unit has been compiled on its own to produce a corresponding
tree file, then the result contains the configuration pragmas from the
GNAT configuration file(s) involved in this compilation. Otherwise (that is,
if the argument unit has been compiled only as an effect of compiling some
other unit), the result contains only those pragmas that belong to
the unit's source file.
<P>
<LI>
A pragma that appears in the unit's context clause is included in the result
list only if it is a configuration pragma.
<P>
<LI>
Returns <CODE>Nil_Element_List</CODE> for the predefined package <CODE>Standard</CODE>.
</UL>
<P>
<CITE>ASIS 13.31</CITE> <CODE>function Is_Equal</CODE>
<A NAME="IDX66"></A>
</P><P>
<UL>
<LI>
Two elements representing configuration pragmas belonging to
<CODE>A_Configuration_Compilation</CODE> unit (or components thereof) are considered
as being equal only if they are created by the same compilation (belong
to the same tree).
</UL>
<P>
<CITE>ASIS 13.36</CITE> <CODE>function Enclosing_Element</CODE>
<A NAME="IDX67"></A>
</P><P>
<UL>
<LI>
ASIS-for-GNAT does not require the <CODE>Element_Context</CODE> parameter.
The <CODE>Enclosing_Element</CODE> function with two parameters just calls the
<CODE>Enclosing_Element</CODE> function with one parameter for its <CODE>Element</CODE>
parameter.
</UL>
<P>
<A NAME="SEC27"></A>
<H3> <CITE>ASIS 15</CITE> <CODE>package Asis.Declarations</CODE> </H3>
<!--docid::SEC27::-->
<P>
<CITE>ASIS 15.24</CITE> <CODE>function Body_Block_Statement</CODE>
<A NAME="IDX68"></A>
</P><P>
<UL>
<LI>
If the body passed as the actual parameter has no declarative items of its
own, <CODE>Asis.Statements.Is_Declare_Block</CODE> returns <CODE>False</CODE>.
</UL>
<P>
<A NAME="SEC28"></A>
<H3> <CITE>ASIS 18</CITE> <CODE>package Asis.Statements</CODE> </H3>
<!--docid::SEC28::-->
<P>
<CITE>ASIS 18.14</CITE> <CODE>function Is_Declare_Block</CODE>
<A NAME="IDX69"></A>
</P><P>
<UL>
<LI>
If the argument represents the dummy block statement created by
<CODE>Asis.Declarations.Body_Block_Statement</CODE> function, the result will be
<CODE>True</CODE> if and only if the corresponding body has declarative items.
</UL>
<P>
<A NAME="SEC29"></A>
<H3> <CITE>ASIS 20</CITE> <CODE>package Asis.Text</CODE> </H3>
<!--docid::SEC29::-->
<P>
<CITE>ASIS 20.1</CITE> <CODE>type Line</CODE>
<A NAME="IDX70"></A>
</P><P>
<UL>
<LI>
Lines in ASIS-for-GNAT do not contain any end-of-line characters
(see RM95, 2.2(2)).
</UL>
<P>
<CITE>ASIS 20.22</CITE> <CODE>function Delimiter_Image</CODE>
<A NAME="IDX71"></A>
</P><P>
<UL>
<LI>
Returns a wide string of length one, containing the <CODE>LF</CODE> wide character.
</UL>
<P>
<A NAME="Dynamic Context Modes"></A>
<HR SIZE="6">
<A NAME="SEC30"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC21"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.4 Dynamic <CODE>Context</CODE> Modes </H2>
<!--docid::SEC30::-->
<P>
If an ASIS <CODE>Context</CODE> is defined with an <SAMP>`-FS'</SAMP> or <SAMP>`-FM'</SAMP>
option, then ASIS may compile sources "on the fly" to obtain
<CODE>Compilation_Unit</CODE>s.
Thus the content of the <CODE>Context</CODE> will not necessarily remain frozen
when the <CODE>Context</CODE> is open -- when ASIS gets a new
<CODE>Compilation_Unit</CODE>, it "adds" it to the <CODE>Context</CODE>.
The <SAMP>`-FS'</SAMP> and <SAMP>`-FM'</SAMP> options
are referred to as <EM>dynamic Context modes</EM>.
</P><P>
The difference between the two modes is as follows:
</P><P>
<DL COMPACT>
<DT><SAMP>`-FS'</SAMP>
<DD>ASIS does not take into account any existing tree file when opening a
<CODE>Context</CODE>.
<P>
<DT><SAMP>`-FM'</SAMP>
<DD>ASIS first processes the tree files in the tree search
path. If a given <CODE>Compilation_Unit</CODE> is present in the existing set of
tree files, these tree files are used; otherwise ASIS tries to locate the
source of the unit and to compile it to produce a tree file.
</DL>
<P>
For both <SAMP>`-FS'</SAMP> and
<SAMP>`-FM'</SAMP> <CODE>Context</CODE>s, once a tree file
<A NAME="IDX72"></A>
is created it is added to the set of tree
files making up the <CODE>Context</CODE> and then it is reused (without recreating
it from sources again) for the queries dealing with <CODE>Compilation_Unit</CODE>s
represented by this tree.
</P><P>
An advantage of these dynamic <CODE>Context</CODE> modes is that you do not have to
create the tree files explicitly; to users of an ASIS application based on
such <CODE>Context</CODE> modes the application appears to operate directly from
source files. But there is also a
drawback, a consequence of the fact that the content of a <CODE>Context</CODE> may
change while the <CODE>Context</CODE> is open: some ASIS queries dealing
with <CODE>Compilation_Unit</CODE>s or returning lists of <CODE>Compilation_Unit</CODE>s
raise the <CODE>ASIS_Failed</CODE>
<A NAME="IDX73"></A>
exception (with <CODE>Use_Error</CODE>
<A NAME="IDX74"></A>
status).
These queries are as follows:
</P><P>
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=+0><pre>Asis.Compilation_Units:
Library_Unit_Declarations
Compilation_Unit_Bodies
Compilation_Units
Corresponding_Children
</FONT></pre></td></tr></table></P><P>
Another limitation of the dynamic <CODE>Context</CODE> mode is that ASIS uses the
standard GNAT naming scheme to compute the name of the source to be compiled
from the name of the corresponding Ada compilation unit. That is, if the name
of the source containing the code of some unit does not follow the GNAT
naming scheme, then ASIS will not locate this source, and it will treat
this unit as <CODE>Nil_Compilation_Unit</CODE>.
</P><P>
<A NAME="Debugging Information"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_5.html#SEC31"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Mail Server</I> on <I>May, 22 2008</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html/"><I>texi2html</I></A>
</BODY>
</HTML>
|