Lichen

Change of docs/wiki/Deduction

810:e08d8986f0e1
docs/wiki/Deduction
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/wiki/Deduction	Tue Apr 11 21:41:22 2017 +0200
     1.3 @@ -0,0 +1,458 @@
     1.4 += Deducing Program Behaviour =
     1.5 +
     1.6 +With information from [[../Inspection|inspection]] available, the isolated observations about operations in a program may now be combined with knowledge about the program's structure to produce deductions about the nature of each operation.
     1.7 +
     1.8 +<<TableOfContents(2,3)>>
     1.9 +
    1.10 +== The Deduction Process ==
    1.11 +
    1.12 +The deduction process takes observations made during the [[../Inspection|inspection process]] and attempts to form deductions about the behaviour of the program primarily in terms of the nature of the attribute '''accesses''', with their corresponding '''accessors''', featuring in the program. Where attributes are used in conjunction with names, accessors are name versions; where attributes are used in conjunction with other expressions, accessors are '''anonymous'''.
    1.13 +
    1.14 +=== Indexes ===
    1.15 +
    1.16 +For efficiency, indexes are defined to establish relationships between the following things:
    1.17 +
    1.18 +{{{#!table
    1.19 +'''Indexes''' || '''Details'''
    1.20 +==
    1.21 +`access_index` || Which accessors (name versions) are involved with access operations
    1.22 +==
    1.23 +`location_index` || Which attribute usage patterns are supported by accessors (name versions)
    1.24 +==
    1.25 +`attr_class_types`<<BR>>`attr_instance_types`<<BR>>`attr_module_types`
    1.26 +|| Which types support which attribute names
    1.27 +==
    1.28 +`assigned_attrs`
    1.29 +|| Which usage patterns involve attribute assignment
    1.30 +==
    1.31 +`reference_assignments`
    1.32 +|| Which accesses involve assignments
    1.33 +==
    1.34 +`reference_invocations`
    1.35 +|| Which accesses involve invocations
    1.36 +==
    1.37 +`alias_index`
    1.38 +|| Which names are aliases for other names, accesses or invocations
    1.39 +}}}
    1.40 +
    1.41 +The objective of deduction is to combine these indexes to establish new relationships between the different participants of these basic index relationships.
    1.42 +
    1.43 +=== Building Indexes ===
    1.44 +
    1.45 +The building of indexes from inspection data is approximately as follows:
    1.46 +
    1.47 +{{{#!graphviz
    1.48 +//format=svg
    1.49 +//transform=notugly
    1.50 +digraph indexes {
    1.51 +  node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Indexes"];
    1.52 +  edge [tooltip="Indexes"];
    1.53 +  rankdir=LR;
    1.54 +
    1.55 +  all_attr_accesses [label="all_attr_accesses\n(anonymous accesses)"];
    1.56 +  attr_usage [label="attr_usage\n(attribute usage)"];
    1.57 +  location_index [label="location_index\n(usage by accessor)"];
    1.58 +
    1.59 +  all_attrs [label="all_class_attrs | all_instance_attrs | all_module attrs | (all attributes)",shape=record];
    1.60 +  attr_types [label="attr_class_types | attr_instance_types | attr_module_types | (types by attribute name)",shape=record];
    1.61 +
    1.62 +  attr_accessors [label="attr_accessors\n(accessors by access)"];
    1.63 +  access_index [label="access_index\n(accessor locations by access location)"];
    1.64 +
    1.65 +  all_attr_access_modifiers [label="all_attr_access_modifiers\n(operations/modifiers by access)"];
    1.66 +  reference_assignments [label="reference_assignments\n(assignment accesses)"];
    1.67 +  reference_invocations [label="reference_invocations\n(invocation accesses)"];
    1.68 +  assigned_attrs [label="assigned_attrs\n(assignment accesses by access)"];
    1.69 +
    1.70 +  all_aliased_names [label="all_aliased_names\n(accesses by alias)"];
    1.71 +  alias_index [label="alias_index\n(access locations by accessor/alias location)"];
    1.72 +
    1.73 +  init_usage_index [label="init_usage_index",shape=ellipse];
    1.74 +  init_attr_type_indexes [label="init_attr_type_indexes",shape=ellipse];
    1.75 +  init_accessors [label="init_accessors",shape=ellipse];
    1.76 +  init_accesses [label="init_accesses",shape=ellipse];
    1.77 +  init_aliases [label="init_aliases",shape=ellipse];
    1.78 +
    1.79 +  all_attr_accesses -> init_usage_index;
    1.80 +  attr_usage -> init_usage_index;
    1.81 +  init_usage_index -> location_index;
    1.82 +
    1.83 +  all_attrs -> init_attr_type_indexes -> attr_types;
    1.84 +
    1.85 +  attr_accessors -> init_accessors -> access_index;
    1.86 +
    1.87 +  all_attr_access_modifiers -> init_accesses;
    1.88 +  init_accesses -> reference_assignments;
    1.89 +  init_accesses -> reference_invocations;
    1.90 +  init_accesses -> assigned_attrs;
    1.91 +
    1.92 +  all_aliased_names -> init_aliases -> alias_index;
    1.93 +}
    1.94 +}}}
    1.95 +
    1.96 +=== Deriving Types from Indexes and Accesses ===
    1.97 +
    1.98 +The indexes are employed in deduction approximately as follows:
    1.99 +
   1.100 +{{{#!graphviz
   1.101 +//format=svg
   1.102 +//transform=notugly
   1.103 +digraph deduction {
   1.104 +  node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Deduction"];
   1.105 +  edge [tooltip="Deduction"];
   1.106 +  rankdir=LR;
   1.107 +
   1.108 +  all_attr_accesses [label="all_attr_accesses\n(anonymous accesses)"];
   1.109 +  location_index [label="location_index\n(usage by accessor)"];
   1.110 +
   1.111 +  attr_types [label="attr_class_types | attr_instance_types | attr_module_types | (types by attribute name)",shape=record];
   1.112 +
   1.113 +  all_initialised_names [label="all_initialised_names\n(types by accessor)"];
   1.114 +
   1.115 +  access_index [label="access_index\n(accessor locations by access location)"];
   1.116 +
   1.117 +  alias_index [label="alias_index\n(access locations by accessor/alias location)"];
   1.118 +
   1.119 +  record_types_for_usage [label="record_types_for_usage",shape=ellipse];
   1.120 +  record_types_for_attribute [label="record_types_for_attribute",shape=ellipse];
   1.121 +
   1.122 +  accessor_types [label="accessor_class_types | accessor_instance_types | accessor_module_types | (types by accessor)",shape=record];
   1.123 +  provider_types [label="provider_class_types | provider_instance_types | provider_module_types | (provider types by accessor)",shape=record];
   1.124 +
   1.125 +  location_index -> record_types_for_usage;
   1.126 +  attr_types -> record_types_for_usage;
   1.127 +  all_initialised_names -> record_types_for_usage;
   1.128 +  access_index -> record_types_for_usage;
   1.129 +  alias_index -> record_types_for_usage; 
   1.130 +
   1.131 +  record_types_for_usage -> provider_types;
   1.132 +  record_types_for_usage -> accessor_types;
   1.133 +
   1.134 +  attr_types -> record_types_for_attribute;
   1.135 +  all_attr_accesses -> record_types_for_attribute;
   1.136 +
   1.137 +  record_types_for_attribute -> provider_types;
   1.138 +  record_types_for_attribute -> accessor_types;
   1.139 +}
   1.140 +}}}
   1.141 +
   1.142 +=== Converting Usage to Types ===
   1.143 +
   1.144 +A particularly important operation in the deduction process is that of converting attribute usage information to a set of types supporting such usage. Taking the mapping of attribute names to types, each attribute name provided by a usage observation can be applied, progressively narrowing the set of types available to support the complete attribute usage collection.
   1.145 +
   1.146 +{{{#!graphviz
   1.147 +//format=svg
   1.148 +//transform=notugly
   1.149 +digraph usage_to_types {
   1.150 +  node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Usage to types"];
   1.151 +  edge [tooltip="Usage to types"];
   1.152 +  rankdir=LR;
   1.153 +
   1.154 +  usage [label="(a, b, c)",style=filled,fillcolor=darkorange];
   1.155 +
   1.156 +  subgraph {
   1.157 +    rank=same;
   1.158 +    attr_a [label="attribute a",style=filled,fillcolor=gold];
   1.159 +    attr_b [label="attribute b",style=filled,fillcolor=gold];
   1.160 +    attr_c [label="attribute c",style=filled,fillcolor=gold];
   1.161 +  }
   1.162 +
   1.163 +  index [label="types by attribute name",shape=ellipse];
   1.164 +
   1.165 +  subgraph {
   1.166 +    rank=same;
   1.167 +    type_P [label="type P"];
   1.168 +    type_Q [label="type Q",style=filled,fillcolor=gold];
   1.169 +    type_R [label="type R"];
   1.170 +    type_S [label="type S"];
   1.171 +  }
   1.172 +
   1.173 +  deduction [label="(a, b, c) needs type Q",style=filled,fillcolor=darkorange];
   1.174 +
   1.175 +  usage -> attr_a;
   1.176 +  usage -> attr_b;
   1.177 +  usage -> attr_c;
   1.178 +
   1.179 +  attr_a -> attr_b -> attr_c [style=dashed,dir=none];
   1.180 +  attr_a -> index -> type_P [style=dashed,dir=none];
   1.181 +  type_P -> type_Q -> type_R -> type_S [style=dashed,dir=none];
   1.182 +
   1.183 +  attr_a -> type_P;
   1.184 +  attr_a -> type_Q;
   1.185 +  attr_b -> type_Q;
   1.186 +  attr_b -> type_R;
   1.187 +  attr_c -> type_Q;
   1.188 +  attr_c -> type_S;
   1.189 +
   1.190 +  type_Q -> deduction;
   1.191 +}
   1.192 +}}}
   1.193 +
   1.194 +The types supporting attribute usage are the attribute '''providers'''. Where providers are classes, the affected accessors in the program may also be instances, since instances also support access to attributes of the instantiated class (and its ancestors).
   1.195 +
   1.196 +Indexes mapping attributes to types must combine consideration of class and instance attributes in order to correctly identify instance providers. Consider the following example:
   1.197 +
   1.198 +{{{#!graphviz
   1.199 +//format=svg
   1.200 +//transform=notugly
   1.201 +digraph instance_providers {
   1.202 +  node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Instance providers"];
   1.203 +  edge [tooltip="Instance providers"];
   1.204 +  rankdir=LR;
   1.205 +
   1.206 +  usage [label="(a, b, c)",style=filled,fillcolor=darkorange];
   1.207 +
   1.208 +  subgraph {
   1.209 +    rank=same;
   1.210 +    combined [label="combined attributes",shape=ellipse];
   1.211 +    attr_a [label="attribute a",style=filled,fillcolor=gold];
   1.212 +    attr_c [label="attribute c",style=filled,fillcolor=gold];
   1.213 +    attr_b [label="attribute b",style=filled,fillcolor=gold];
   1.214 +  }
   1.215 +
   1.216 +  subgraph {
   1.217 +    rank=same;
   1.218 +    class_C [label="class C"];
   1.219 +    attr_Ca [label="attribute C.a",style=filled,fillcolor=gold];
   1.220 +    attr_Cc [label="attribute C.c",style=filled,fillcolor=gold];
   1.221 +    instance_C [label="instance of C"];
   1.222 +    attr_Ib [label="attribute (C).b",style=filled,fillcolor=gold];
   1.223 +  }
   1.224 +
   1.225 +  type_C [label="type C",style=filled,fillcolor=darkorange];
   1.226 +
   1.227 +  combined -> attr_a -> attr_c -> attr_b [style=dashed,dir=none];
   1.228 +  class_C -> attr_Ca -> attr_Cc [style=dashed,dir=none];
   1.229 +  instance_C -> attr_Ib [style=dashed,dir=none];
   1.230 +
   1.231 +  usage -> attr_a -> attr_Ca;
   1.232 +  usage -> attr_b -> attr_Ib;
   1.233 +  usage -> attr_c -> attr_Cc;
   1.234 +
   1.235 +  attr_Ca -> type_C;
   1.236 +  attr_Cc -> type_C;
   1.237 +  attr_Ib -> type_C;
   1.238 +}
   1.239 +}}}
   1.240 +
   1.241 +To recognise support by instance accessors for the usage pattern concerned, attribute details must be obtained from classes as well as instances. Note that the identified type cannot support such usage purely by providing class or instance attributes alone.
   1.242 +
   1.243 +=== Attribute Assignments ===
   1.244 +
   1.245 +Since attribute access operations may occur as part of assignments, the nature of accesses is recorded during inspection. Combining the indexed information for assignment accesses allows the deducer to determine the most pessimistic effects on the program structure of such assignments.
   1.246 +
   1.247 +Taking each attribute usage set employed by accessors involved in assignments, the types are deduced for such accessors, and each individual attribute known to be used in such assignments is then applied to the deduced types, '''mutating''' them in such a way that deductions may no longer assume a fixed identity for such attributes when obtained from these types.
   1.248 +
   1.249 +{{{#!graphviz
   1.250 +//format=svg
   1.251 +//transform=notugly
   1.252 +digraph assignments {
   1.253 +  node [shape=box,fontsize="13.0",fontname="Helvetica",tooltip="Attribute assignments"];
   1.254 +  edge [tooltip="Attribute assignments"];
   1.255 +  rankdir=LR;
   1.256 +
   1.257 +  subgraph {
   1.258 +    rank=same;
   1.259 +    usage [label="(a, b, c)",style=filled,fillcolor=darkorange];
   1.260 +    assigned [label="b is assigned",style=filled,fillcolor=darkorange];
   1.261 +  }
   1.262 +
   1.263 +  deduction [label="(a, b, c) needs type Q",style=filled,fillcolor=gold];
   1.264 +
   1.265 +  subgraph {
   1.266 +    rank=same;
   1.267 +    type_Q [label="type Q",style=filled,fillcolor=gold];
   1.268 +    attr_Qa [label="attribute Q.a"];
   1.269 +    attr_Qb [label="attribute Q.b\n(mutated)",style=filled,fillcolor=darkorange];
   1.270 +    attr_Qc [label="attribute Q.c"];
   1.271 +  }
   1.272 +
   1.273 +  type_Q -> attr_Qa -> attr_Qb -> attr_Qc [style=dashed,dir=none];
   1.274 +  usage -> deduction -> type_Q;
   1.275 +  assigned -> attr_Qb;
   1.276 +}
   1.277 +}}}
   1.278 +
   1.279 +=== Refining Type Deductions ===
   1.280 +
   1.281 +In the context of a specific access, the types may be resolved further:
   1.282 +
   1.283 + * Any name whose initialisation could be determined during inspection can be associated with its initialised type
   1.284 + * Any name referring to a constant object can be associated with the type of that object
   1.285 + * Usage of `self` in methods can result in only compatible class and instance types being retained from the types obtained from usage deductions
   1.286 +
   1.287 +=== Reference Identification ===
   1.288 +
   1.289 +The basic information about every accessor and accessed attribute in a program can now be combined to produce specific '''references''' to identities consistent with the inspection observations. Several different kinds of accessors and access situations exist:
   1.290 +
   1.291 + * Name-based accesses involving attribute usage
   1.292 + * Aliases to names, possibly accompanied by accesses
   1.293 + * Anonymous accesses involving individual attributes
   1.294 + * Constant or previously-identified names, possibly accompanied by accesses
   1.295 +
   1.296 +=== Aliases ===
   1.297 +
   1.298 +Names initialised using other names or attribute accesses, or using the invocation of either of these things, are known as '''aliases'''. Information about aliases originates during inspection when such names are initialised with expression results within the program. During the resolution activity finalising the inspected details, this initialisation information is used to define relationships between aliases and other names and accesses.
   1.299 +
   1.300 +During deduction, attribute accesses are investigated and type information computed for both attribute accesses and accessors. The relationships defined between accesses and aliases can then be employed to propagate such deduced information to the aliases and to define appropriate type characteristics for them.
   1.301 +
   1.302 +Where aliases are used as the basis of attribute accesses, this propagation refines the previously deduced information about the aliases and may also refine the details of the accesses with which the alias is involved.
   1.303 +
   1.304 +=== Invocation Target Suitability ===
   1.305 +
   1.306 +Having identified accessed attributes, invocation information can be applied in cases where such attributes immediately participate in an invocation, comparing the specified argument details against the parameter details defined for the identified attribute, which must be a callable object for this technique to work. Where arguments do not appear to be suitable - either the number of arguments is incorrect or any keyword argument refer to non-existent parameters - the attribute providing the parameter details can be considered unsuitable for the access.
   1.307 +
   1.308 +=== Classifying Accessors ===
   1.309 +
   1.310 +Each accessor, being a particular version of a name, will have type information associated with it as a consequence of the deduction process. Such information takes the following forms:
   1.311 +
   1.312 + * Provider types, indicating which types may provide the attributes used by the accessor
   1.313 + * Accessor types, indicating which types will actually appear as the accessor
   1.314 +
   1.315 +This information can be processed in a number of ways to produce the following:
   1.316 +
   1.317 + * All types (from all kinds of type) of providers able to provide attributes via the accessor
   1.318 + * All types (from all kinds of type) of accessors compatible with the accessor
   1.319 + * The most general types of accessors compatible with the accessor
   1.320 +
   1.321 +Where many types may be associated with an accessor, identifying the most general types involves eliminating those which are derived from others. Given that descendant types may not remove support for attributes provided by their ancestors, then where an ancestor type has been identified as a possible accessor, it should follow that all of its descendants may also have been identified as possible accessors. Since these descendants should be compatible, identifying them individually is unnecessary: merely specifying that the common ancestor or ''any'' descendant could provide an accessor is sufficient.
   1.322 +
   1.323 +==== Defining Guards ====
   1.324 +
   1.325 +A '''guard''' is a constraint supported by a run-time test indicating the compliance of an accessor with a particular type. Thus, where a single accessor type has been identified, a guard may be established for an accessor that tests the type of the accessor against a specific type. Where a single ''general'' accessor type is identified, a guard is established that tests the accessor against a "common" type: that is, an ancestor type with which other descendant types may comply.
   1.326 +
   1.327 +=== Classifying Accesses ===
   1.328 +
   1.329 +At the point of classifying accesses, information is available about the following:
   1.330 +
   1.331 + * The accessors potentially involved in each access
   1.332 + * The types of accessors and the types providing attributes via those accessors
   1.333 + * Any guards applying to the accessors
   1.334 + * Whether an access is constrained by certain program characteristics and is thus guaranteed to be as deduced
   1.335 + * The possible attributes referenced by the access
   1.336 +
   1.337 +This information can be processed in a number of ways to produce the following:
   1.338 +
   1.339 + * The types of accessors, both general and specific, applying to each access
   1.340 + * The attributes that can be provided by each access, consolidating existing referenced attribute details
   1.341 + * The general types providing the attributes
   1.342 +
   1.343 +Since more than one accessor may be involved, information from all accessors must be combined to determine whether guard information still applies to the access, or whether it is possible for an accessor to be used that has an uncertain type at run-time.
   1.344 +
   1.345 +==== Defining Tests ====
   1.346 +
   1.347 +A '''test''' at the access level is a necessary check performed on an accessor before an access to determine whether it belongs to a certain type or group of types.
   1.348 +
   1.349 +Where guards applying to accessors apply by extension to an access, it may not be enough to assume that the the attributes exposed by the accessor are the same as those considered acceptable through deduction. Therefore, attributes are obtained for the access using the applicable guard types as accessors. If this set of attributes does not include potentially accessible attributes (perhaps because the guard types are broadly defined and do not support all attribute usage), a test must be generated.
   1.350 +
   1.351 +Where a single attribute provider can be identified, a test for a specific type is generated. Where a single general type can be identified as a provider, a test against a "common" type is generated. Tests involving the built-in `object` are not generated since it is the root of all classes and such tests would merely identify an accessor as a class. In all cases where a single, specific type cannot be tested for, the general attribute validation mechanism must be used instead.
   1.352 +
   1.353 +== Preparing Access Descriptions ==
   1.354 +
   1.355 +The accumulated deduced knowledge is directed towards producing access descriptions or plans which characterise each access in terms of the following:
   1.356 +
   1.357 + * The initial accessor, being the starting object for attribute accesses, unless a static accessor has been identified
   1.358 + * Details of any test required on the initial accessor
   1.359 + * Details of any type employed by the test
   1.360 + * Any identified static accessor (to be used as the initial accessor)
   1.361 + * Attributes needing to be traversed from the accessor that yield unambiguous objects
   1.362 + * Access modes for each of the unambiguously-traversed attributes
   1.363 + * Remaining attributes needing to be tested and traversed (after having traversed the above attributes)
   1.364 + * Details of the context
   1.365 + * Any test to apply to the context (to ensure its validity)
   1.366 + * The method of obtaining the first attribute
   1.367 + * The method of obtaining the final attribute
   1.368 + * Any identified static final attribute
   1.369 + * The kinds of objects providing the final attribute
   1.370 +
   1.371 +=== Characterising the Accessor ===
   1.372 +
   1.373 +For a given access location, the referenced attribute details established during deduction are used to determine...
   1.374 +
   1.375 + * Whether the initial accessor is static, originating from a constant access or involving an identifiable static object
   1.376 + * Whether the initial accessor is dynamic but has a known, deduced identity
   1.377 +
   1.378 +Some useful information about the accessor and about the actual provider of the first accessed attribute can be defined:
   1.379 +
   1.380 +|| || '''Class''' || '''Instance''' || '''Module''' ||
   1.381 +|| '''Accessor''' || Class accessor || Instance accessor || Module accessor ||
   1.382 +|| '''Provider''' || Class provider || Instance provider || ||
   1.383 +
   1.384 +Depending on which of these criteria are satisfied, some properties of the access operation can be established:
   1.385 +
   1.386 + * Object-relative accesses occur with class accessors or module accessors or when attributes are provided by instances
   1.387 + * Class-relative accesses occur with instance accessors when attributes are provided by classes
   1.388 +
   1.389 +Object-relative accesses merely involve obtaining attributes directly from accessors. Class-relative accesses involve obtaining the class of each accessor and then obtaining an attribute from that class.
   1.390 +
   1.391 +=== Defining the First Access Method ===
   1.392 +
   1.393 +For dynamic or unidentified accessors, the above access properties define the access method on the first attribute in the chain of attributes provided. However, any redefinition of the accessor to a static accessor may influence the first method. For static accessors, the first method is always object-relative since classes and modules do not offer transparent mechanisms to expose the attributes on their own classes.
   1.394 +
   1.395 +Static and identified, dynamic accessors should already be known to support the specified attributes. Other accessors require an access method to be used that also checks whether the accessor supports a given attribute.
   1.396 +
   1.397 +=== Redefining the Accessor ===
   1.398 +
   1.399 +With knowledge about the initial accessor, the attributes involved in the access operation are then considered in the context of the accessor. For each attribute name in the chain described for an access, an attempt is made to obtain the details of the attribute of the given name from the accessor, determining whether these details can be used as an accessor to obtain subsequent attribute details.
   1.400 +
   1.401 +Where more than one attribute identity is obtained, traversal is terminated: all remaining attributes must be traversed at run-time. If an attribute identified during traversal is static, the first access method changes accordingly.
   1.402 +
   1.403 +=== Defining the Final Access Method ===
   1.404 +
   1.405 +An access can also involve an assignment to the accessed attribute or the invocation of the accessed attribute. Such operations change the nature of the access method used on the final attribute in a chain of attribute names.
   1.406 +
   1.407 +=== Identifying Context Information ===
   1.408 +
   1.409 +Final attribute accesses involving callables need to yield context information that can subsequently be used to invoke those callables. Where the nature of an accessed attribute is not known, a simplistic attempt can be made to look up all attributes stored using the attribute name in the program.
   1.410 +
   1.411 +Of particular interest are the following situations:
   1.412 +
   1.413 + * Where class attributes are being accessed via instances, whether the attributes are all methods that can be bound upon access
   1.414 + * Where class attributes may be accessed via instances, whether any attributes could be methods
   1.415 +
   1.416 +Such considerations dictate whether the context information originates from the attribute or from the accessor and whether any run-time test is required to determine this.
   1.417 +
   1.418 +== Preparing Instruction Plans ==
   1.419 +
   1.420 +Instruction plans are sequences of program operations, encoded in a higher-level form than actual program instructions, that describe the steps needed to access attributes. Such sequences are produced from the details provided by individual access plans.
   1.421 +
   1.422 +=== Original Accessor ===
   1.423 +
   1.424 +The expression providing the object from which the first attribute is obtained (or the only attribute if only one is specified) is known as the original accessor. Where this accessor can be identified, the expression describing it in the program can potentially be replaced with a static reference, and subsequent mentions of the accessor can potentially be replaced with such references or names used as expressions.
   1.425 +
   1.426 +|| '''Access Plan Information''' || '''Original Accessor''' ||
   1.427 +|| Static accessor identified || Identified accessor ||
   1.428 +|| Named accessor access, not invocation || Indicated name ||
   1.429 +|| Named accessor invocation, accessor known to provide the attribute || Indicated name ||
   1.430 +|| Named accessor invocation, accessor not known to provide the attribute || Accessor expression ||
   1.431 +|| Other accessors || Accessor expression ||
   1.432 +
   1.433 +By using names or static references, the need to store the result of evaluating an accessor expression is eliminated because such labels can be inserted in the instruction sequence as required.
   1.434 +
   1.435 +=== First Access Operation ===
   1.436 +
   1.437 +Although it may be possible to convert accesses into single instructions that obtain attributes directly, many accesses will involve access operations that must consult an accessor object and obtain an attribute from that object, at least for the first attribute in a chain of attributes. This occurs when the access plan indicates the following situations:
   1.438 +
   1.439 + * Final method is an access (meaning that an attribute cannot be directly obtained)
   1.440 + * Final method is an assignment (requiring the object whose attribute will be updated)
   1.441 + * Attributes (identified or otherwise) need traversing
   1.442 +
   1.443 +=== Accessor Nature ===
   1.444 +
   1.445 +Attribute assignments involve a single '''target accessor''' and potentially many other accessors, depending on how many distinct expressions are evaluated to yield the value to be set in the assignment. Such a target accessor will usually be derived from the evaluation of an expression, and in some cases the expression will be the result of an opaque operation such as the invocation of a function. In such cases, the target accessor is stored in a temporary variable for subsequent use in access operations.
   1.446 +
   1.447 +=== Context ===
   1.448 +
   1.449 +=== Access Tests ===
   1.450 +
   1.451 +=== Traversing Identified Attributes ===
   1.452 +
   1.453 +=== Traversing Unidentified Attributes ===
   1.454 +
   1.455 +=== Final Access Operation ===
   1.456 +
   1.457 +=== Context Testing ===
   1.458 +
   1.459 +== Deduction Products ==
   1.460 +
   1.461 +The deduction process should produce a complete catalogue of accessor and access references that may then be consulted by the [[../Translation|translation]] process needing to know the nature of any operation within the program. Central to the translation process's understanding of references is the '''attribute access plan''' for each reference which characterises each access and provides the basis for the formulation of the '''instruction plan''' used to replicate it in the final program.