TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Discriminant_Associations_Include_Defaults

Expanded Name Asis.Environment.Discriminant_Associations_Include-
_Defaults

Returns a Boolean value indicating whether discriminant association lists include defaulted parameters.

Description

ASIS implementations can choose to always include defaulted parameters in discriminant lists.

If True is returned, discriminant lists will always include defaults and the lists may contain expressions that are not in the actual variable declaration or constraint.

Parameters

Rational ASIS returns False.

Errors

None.

Examples

For example:

The definition of Normal allows the discriminant Length to take on its default value. If Discriminant_Associations_Include-
_Defaults
returns True, the discriminant list for Normal will include Length. If False is returned, the ASIS application can control the Normalized parameter to the Type_Definitions.Discriminant_Associations function.

Cross-References

Related subprogram:

Related concept:


Function Discriminant_Associations_Normalized

Expanded Name Asis.Environment.Discriminant_Associations_Normalized

Returns a Boolean value indicating whether the ASIS implementation always includes formal-parameter names and defaulted expressions in discriminant parameter lists.

Description

If True is returned, the Type_Definitions.Discriminant_Associations function will always behave as if its Normalized parameter is True. If False is returned, the ASIS application can control the Normalized parameter to the function.

Parameters

Rational ASIS returns False.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concept:


Type Error_Kinds

Expanded Name Asis.Environment.Error_Kinds

Describes the kinds of errors that can be returned by Status.

Enumerations

ASIS has reached some internal or system-imposed capacity limit.

A library or some other file is damaged.

A call to Initialize, Finalize, Libraries.Associate, or Libraries-
.Open
was made with an invalid parameter value.

An ASIS subprogram was called before ASIS was initialized.

An internal error has been detected in ASIS internal processing and should be reported to the vendor.

A library or some other file could not be opened. The Name parameter in Libraries.Open may not have contained sufficient information to open the library.

No error has been recorded or the last error has been cleared.

The subprogram or option is not implemented. Refer to the Rational ASIS release notes for a summary of subprogram and options not yet available.

An attempt to use information stored in a unit or an element failed because the semantic information is obsolete.

An invalid Parameter string value was provided to the Initialize procedure.

ASIS has reached a system-imposed limit on storage capacity. ASIS has caught the exception and recovered to the extent possible. The requested operation did not complete but ASIS use may continue.

An unexpected exception was raised during ASIS processing. It has been caught and converted to this error. This indicates an ASIS internal error and should be reported to the vendor.

A library or some other file could not be opened. The named library, named compilation unit, or some other library component cannot be accessed.

An argument to an ASIS subprogram was inappropriate, uninitialized, or otherwise invalid.

Cross-References

Related subprograms:


Procedure Finalize

Expanded Name Asis.Environment.Finalize

Performs any necessary ASIS termination activities; should be the last ASIS procedure called by an application.

Description

Performs any necessary ASIS termination activities. The Finalize procedure releases all ASIS resources and closes all open libraries. Use of elements (see package Elements, "Element Kinds and Properties," for more information) or other resources after Finalize has been called is erroneous. ASIS attempts to detect such usage and to raise Asis_Failed. This cannot be guaranteed, however, and unpredictable application behavior may result.

Finalize should be the last ASIS procedure called by an application. The call does not produce an error if ASIS is not currently initialized. Calls to ASIS subprograms, other than those in package Environment, after calls to Finalize are erroneous.

If an ASIS application aborts, the operating system closes all open libraries and releases all memory allocated to ASIS.

Parameters

Specifies any vendor-specific parameters needed to finalize the ASIS environment.

Rational ASIS does not define any parameters and raises Asis-
_Failed if Asis.Nil_Asis_String is not passed.

Errors

Asis_Failed is raised if the ASIS environment fails to finalize or if Parameters is not Asis.Nil_Asis_String. The Status will be Internal_Error or Parameter_Error.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Function_Call_Parameters_Include_Defaults

Expanded Name Asis.Environment.Function_Call_Parameters_Include-
_Defaults

Returns a Boolean value indicating whether function-call parameter lists always include defaulted parameters.

Description

ASIS implementations can choose to always include defaulted parameters in parameter lists.

If True is returned, parameter lists will always include defaults and the list may contain expressions that are not in the actual text of the function call.

Parameters

Rational ASIS returns False.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concept:


Function Function_Call_Parameters_Normalized

Expanded Name Asis.Environment.Function_Call_Parameters_Normalized

Returns a Boolean value indicating whether the ASIS implementation always includes formal-parameter names and defaulted expressions in function-call parameter lists.

Description

If True is returned, the Expressions.Function_Call_Parameters function will always behave as if its Normalized parameter is True. If False is returned, the ASIS application can control the Normalized parameter.

Parameters

Rational ASIS returns False.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concept:


Function Generic_Parameters_Include_Defaults

Expanded Name Asis.Environment.Generic_Parameters_Include_Defaults

Returns a Boolean value indicating whether generic-instantiation parameter lists always include defaulted parameters.

Description

ASIS implementation can choose to always include defaulted parameters in generic-instantiation parameter lists.

If True is returned, parameter lists will always include defaults and the lists may contain expressions that are not in the actual generic instantiation.

Parameters

Rational ASIS returns False.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concept:


Function Generic_Parameters_Normalized

Expanded Name Asis.Environment.Generic_Parameters_Normalized

Returns a Boolean value indicating whether the ASIS implementation always includes formal-parameter names and defaulted expressions in generic-instantiation parameter lists.

Description

If True is returned, the Declarations.Generic_Parameters function will always behave as if its Normalized parameter is True. If False is returned, the ASIS application can control the Normalized parameter to the function.

Parameters

Rational ASIS returns False.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concept:


Procedure Initialize

Expanded Name Asis.Environment.Initialize

Initializes the ASIS environment.

Description

Initialize must be called before the use of any subprogram except those in package Environment and Portable_Transfer. It typically is the first ASIS procedure to be called.

If ASIS has already been initialized, the call has no effect and does not produce an error.

The Parameters string can be used to specify implementation-defined processing options as described in the Parameters section.

Note: ASIS applications can only be executed in an Apex shell. ASIS fails to initialize if the application is started elsewhere.


Caution: ASIS is not tasking safe. An application must not call ASIS subprograms concurrently.


Processing Nonterminal Symbols

Rational Apex allows nonterminals, or prompts, to appear in compilation units. For example, [statement] might appear in a unit where a statement is required. These nonterminals represent incomplete implementations and are normally present during iterative development.

You control whether nonterminals represent valid elements with the Enable_Nonterminals keyword.

If Enable_Nonterminals is False:

If Enable_Nonterminals is specified as True, nonterminals are treated as if they represented a normal element:

Additionally, nonterminals:

You can identify an element that represents a nonterminal with the following code fragment:

(continued) Procedure Initialize

Parameters

Specifies vendor-specific parameters that must be provided to initialize the ASIS environment. In Rational ASIS, the parameters string specifies:

These values are specified with keywords. The possible keywords, their purposes, and their default values are:
Keyword
Purpose
Maximum_Asis_Text_Files
Specifies the maximum number of file descriptors that Rational ASIS can use when working with Asis.Lines values. If you specify a value that is too large, Asis_Failed can be raised with a Status of Capacity_Error when subprograms in package Text are called. If you specify a value that is too small, your application will run slowly as files are opened and closed so as not to exceed the specified limit. The default value is 4.
Enable_Nonterminals
Specifies whether nonterminals appearing in compilation units should be treated as valid elements. If False is specified, references to nonterminals cause Asis_Failed to be raised with a Status of Obsolete_reference_Error. If True is specified, nonterminals are treated as they where any other element. See "Processing Nonterminal Symbols" for more information. The default value is False.

Standard Rational syntax is used to specify keyword parameters:

Errors

Asis_Failed is raised and Status will be Environment_Error or Parameter_Error if the ASIS environment fails to initialize or if Parameters contains an invalid keyword or value.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Commentary_Supported

Expanded Name Asis.Environment.Is_Commentary_Supported

Returns a Boolean value indicating whether the ASIS implementation can return comments.

Description

If True is returned, the ASIS implementation can return comments. If False is returned, the Text.Comment_Image function will always return Asis.Nil_Asis_String and the Text.Image function will not include any comment text.

Parameters

Rational ASIS returns True.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Finalized

Expanded Name Asis.Environment.Is_Finalized

Returns a Boolean value indicating whether the ASIS environment is finalized or has not been initialized.

Description

The ASIS environment is finalized before Initialize is called and after a call to Finalize.

Parameters

If True is returned, the ASIS environment has not been initialized or has been finalized.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Formal_Parameter_Named-
_Notation_Supported

Expanded Name Asis.Environment.Is_Formal_Parameter_Named-
_Notation_Supported

Returns a Boolean value indicating whether the ASIS implementation can identify the use of named notation.

Description

If True is returned, the ASIS implementations can identify the use of named notation. In named notation, the name of the formal parameter, component, or discriminant is included with the value. Ada uses named notation in the following constructs:

If False is returned, the implementation cannot identify use of named notation and will always return parameter lists using either named (normalized) or positional notation. In this case, the Statements.Formal_Parameter function always returns Asis.Nil_Element unless the parameter list was obtained with Normalized set to True.

Parameters

Rational ASIS returns True.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Initialized

Expanded Name Asis.Environment.Is_Initialized

Returns a Boolean value indicating whether the ASIS environment is currently initialized.

Description

If True is returned, the ASIS environment is currently initialized.

If calls to subprograms in packages other than Environment are made when ASIS is not initialized, ASIS raises Asis_Failed and sets Status to Initialization_Error.

Parameters

If True is returned, the ASIS environment is currently initialized.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Line_Number_Supported

Expanded Name Asis.Environment.Is_Line_Number_Supported

Returns a Boolean value indicating whether the ASIS implementation supports the retrieval of source-code line numbers for program elements.

Description

If True is returned, the ASIS implementation can retrieve the line numbers where program elements appeared in the source file. If False is returned, the functions in package Text that return Line_Numbers, Line_Lists, or Spans will always return 0, Asis.Nil_Line_List, or Asis.Nil_Span.

Parameters

Rational ASIS returns True.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Prefix_Call_Supported

Expanded Name Asis.Environment.Is_Prefix_Call_Supported

Returns a Boolean value indicating whether the ASIS implementation can identify the use of prefix notation for function calls.

Description

If True is returned, the ASIS implementation can identify function calls that used prefix notation (as opposed to infix notation). If False is returned, the function Expressions.Is_Prefix_Call will always return False.

For example:

The addition of B and C uses infix notation and will never be reported as prefix notation.

The addition of Y and Z uses prefix notation. If False is returned from Is_Prefix_Call_Supported, ASIS reports this as infix notation; otherwise, ASIS reports it as prefix notation.

Parameters

Rational ASIS returns True.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concept:


Function Is_Span_Column_Position_Supported

Expanded Name Asis.Environment.Is_Span_Column_Position_Supported

Returns a Boolean value indicating whether the ASIS implementation can provide column locations for program elements.

Description

If True is returned, the ASIS implementation can return valid column positions for program elements. If False is returned, the functions in package Text that return a Span return Asis.Nil-
_Span. This function always returns False if Is_Line_Number_Supported returns False.

Parameters

Rational ASIS returns True.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Minimal_Inconsistent_Units

Expanded Name Asis.Environment.Minimal_Inconsistent_Units

Returns a Boolean value indicating whether the ASIS implementation returns unit relationships in minimal form.

Description

If True is returned, a Compilation_Units.Relationship contains a minimal set of relationships.

If False is returned, a Relationship is returned as a maximal set of relationships.

See package Compilation_Units, "The Inconsistent Units List," for a description of the minimal and maximal organizations of the inconsistent-units list.

Parameters

Rational ASIS returns True.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concept:


Procedure Set_Status

Expanded Name Asis.Environment.Set_Status

Allows an application to set the current ASIS status value and diagnosis text.

Description

The default status and diagnosis values, or values provided by the user, are saved by ASIS and overwrite any existing values. These values are returned by subsequent calls to the Status or Diagnosis functions until ASIS raises an exception, which provides new values, or another call is made to Set_Status.

If Status is set to Not_An_Error and Diagnosis is not Asis.Nil_Asis_String, Asis_Failed is raised and the status will be set to Internal_Error.

This procedure sets the status but does not normally raise an exception. If your application is using Set_Status as a means of passing status, it should typically raise an exception after making the call. Alternatively, Set_Status can be used to clear the current error status.

Parameters

Specifies the Error_Kinds that should be returned when the Status function is called.

If Status is being set to Not_An_Error, Diagnosis must be set to Asis.Nil_Asis_String.

Specifies the text that should be returned when the Diagnosis function is called. In Rational ASIS there is no limit (other than heap memory size) on the size of the diagnosis text.

Errors

Asis_Failed is raised with a status of Internal_Error and a
diagnosis of Asis.Nil_Asis_String if the Status parameter is set
to Not_An_Error and the Diagnosis parameter is not
Nil_Asis_String.

Examples

Cross-References

Related subprograms:

Related concept:


Function Status

Expanded Name Asis.Environment.Status

Returns an Error_Kinds indicating the last ASIS error.

Description

Returns an indication of the last ASIS error. ASIS errors are the result of invalid parameter values, capacity limitations, internal errors, or other causes.

When ASIS detects an error, two things occur in sequence: the error condition is saved both as an Error_Kinds and an Asis-
_String, and then an exception is raised.

An application may set Status by calling Set_Status.

Parameters

Returns an indication of the last ASIS error.

Examples

Cross-References

Related subprograms and types:

Related concept:


Package Operations

Expanded Name Asis.Environment.Operations

Package Operations provides a simple way to obtain visibility to operators for types used in package Environment. The package typically is referenced in a use clause by an application.

Cross-References

Related subprograms and types:

Related concept:


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS