1.1 --- a/docs/concepts.txt Sun Jun 21 02:02:53 2009 +0200
1.2 +++ b/docs/concepts.txt Fri Jul 10 00:12:09 2009 +0200
1.3 @@ -225,6 +225,42 @@
1.4
1.5 attrcode, uses-absolute-address, address (or location)
1.6
1.7 +This could be given instead as follows:
1.8 +
1.9 + attrcode, is-class-or-module, location
1.10 +
1.11 +Since uses-absolute-address corresponds to is-class-or-module, and since there
1.12 +is a need to test for classes and modules to prevent assignment to attributes
1.13 +of such objects, this particular information is always required.
1.14 +
1.15 +Comparing Tables as Matrices with Displacement Lists
1.16 +----------------------------------------------------
1.17 +
1.18 +Although displacement lists can provide reasonable levels of compaction for
1.19 +attribute data, the element size is larger than that required for a simple
1.20 +matrix: the attribute code (attrcode) need not be stored since each element
1.21 +unambiguously refers to the availability of an attribute for a particular
1.22 +class or instance of that class, and so the data at a given element need not
1.23 +be tested for relevance to a given attribute access operation.
1.24 +
1.25 +Given a program with 20 object types and 100 attribute types, a matrix would
1.26 +occupy the following amount of space:
1.27 +
1.28 + number of object types * number of attribute types * element size
1.29 + = 20 * 100 * 1 (assuming that a single location is sufficient for an element)
1.30 + = 2000
1.31 +
1.32 +In contrast, given a compaction to 40% of the matrix size (without considering
1.33 +element size) in a displacement list, the amount of space would be as follows:
1.34 +
1.35 + number of elements * element size
1.36 + = 40% * (20 * 100) * 2 (assuming that one additional location is required)
1.37 + = 1600
1.38 +
1.39 +Consequently, the principal overhead of using a displacement list is likely to
1.40 +be in the need to check element relevance when retrieving values from such a
1.41 +list.
1.42 +
1.43 Objects and Structures
1.44 ======================
1.45