declare properties ... as follows
|
Whether the user can interactively draw connections to or from an item
|
declare configuration statements that have different scopes, as shown in these examples:
{ Scope: Follow the KB's workspace hierarchy or class hierarchy ... }
declare properties as follows :
optimizable ;
{ Scope: Only the configured item is affected by the configuration. }
declare properties of this item as follows :
independent-for-all-compilations ;
{ Scope: Within the KB's workspace hierarchy or class hierarchy, any item
of the specified class(es) are to be affected by the configuration. }
declare properties of any tracked-vehicle as follows :
stable-for-dependent-compilations
declare statement found in a configuration placed on an item higher in the hierarchy, begin the statement with the phrase:
declare properties ... as follows : not ...
declare properties as follows :
not optimizable ;
declare properties for this item as follows :
not stable-for-dependent-compilations
declare properties for any tracked-vehicle as follows :
not independent-for-all-compilations
declare properties as follows :
optimizable
To disable optimization:
Enter a configuration statement:
declare properties for any rule as follows :
not optimizable
Item-configuration attribute of those items themselves. You might not want certain items to be compiled with optimization, for these reasons:
optimizable, G2 displays an error message that might refer to an identifier (such as a local name in a procedure) generated by G2. Thus, before debugging that executable item, you should configure that item as not optimizable. When optimization is disabled, G2 reports the error with respect to the identifiers found in the statement itself.
When you inline a procedure, you must also use the configuration clause:
stable-for-dependent-compilation. By default, all items in the current KB are configured as:
declare properties as follows :
not inlineable
To declare that a procedure can be inlined:
Add this item configuration to the procedure:
declare properties as follows: inlineable,
stable-for-dependent-compilation
Declaring a Method to be Inlined
An inlined method is identical to an inlined procedure: its compiled code is embedded in any compiled code that calls the method. When you inline a method, you must also include the configuration clauses stable-hierarchy and stable-for-dependent-compilation. stable-hierarchy guarantees that a more specialized method will not be added below the current method in the method hierarchy. If the method includes return values, the stable-hierarchy declaration additionally guarantees the return value types.
declare properties as follows :
not inlineable
To declare that a method can be inlined:
Add this item configuration to the method:
declare properties as follows: inlineable, stable-hierarchy,
stable-for-dependent-compilation
Declaring Items as Stable Hierarchy
Declaring an item as stable-hierarchy indicates that neither the class hierarchy of the item, nor the item itself, will be specialized. If a method is declared with stable-hierarchy, then G2 may be able to compile more efficiently the procedures or methods that call the inlined method. stable-hierarchy, which may let G2 compile any methods of that class more efficiently.
declare properties as follows :
not stable-hierarchy
To declare an item to have a stable hierarchy:
Enter a configuration statement:
declare properties as follows :
stable-hierarchy
inlineable.
Declaring an Item Independent for All Compilations
Declaring an item as independent-for-all-compilations means that the item's knowledge does not depend on the knowledge in any other item in the KB. This allows G2 to compile that item more efficiently.
declare properties as follows :
not independent-for-all-compilations
To declare an item independent for all compilations:
Enter a configuration statement:
declare properties as follows :
independent-for-all-compilations statement
Declaring an Item Stable for Dependent Compilations
Declaring an item as stable-for-dependent-compilations means that certain parts of the item's knowledge will not change during the KB's processing. This allows G2 to compile more efficiently other items that depend on that knowledge.
declare properties as follows :
not stable-for-dependent-compilations
To declare an item as stable for dependent compilations:
Enter a configuration statement:
declare properties as follows : stable-for-dependent-compilations
Declaring an Activatable Subworkspace for an Item
Most G2 classes can support an activatable subworkspace. Activatable subworkspaces support the programmatic activation and deactivation. You use the activate and deactivate actions to activate and deactivate an activatable subworkspace. By default, all items in the current KB are configured as:
declare properties as follows :
not activatable-subworkspace
To declare that an item supports an activatable subworkspace:
Add this configuration statement to the item:
declare properties as follows : activatable-subworkspace
declare properties as follows: activatable-subworkspace configuration statement. Icon-description attribute of the class's definition defines connection stubs, you can configure items of that class so that G2 automatically creates permanent connection-posts on the subworkspaces of items of that class. Through an item's subworkspace connection-posts, you can connect the item of the configured class to items on the subworkspace. Using subworkspace connection-posts is described in Creating Connection Posts on Subworkspaces Automatically.
By default, this property is configured as:
declare properties as follows :
not subworkspace-connection-posts
To declare that an item supports subworkspace connection posts:
Enter a configuration statement:
declare properties as follows : subworkspace-connection-posts
declare properties as follows : subworkspace-connection-posts configuration statement. By default, this property is configured as:
declare properties as follows :
manual-connections
To declare that an item disallows manual connections:
Enter a configuration statement:
declare properties as follows : not manual-connections
declare properties as follows : manual-connections configuration statement.