SlideShare a Scribd company logo
Index-Based Instance Identification



                                                      Version 1.1
                                              December 27, 2006




PathMATE Technical Notes



                                         Pathfinder Solutions LLC
                                     33 Commercial Drive, Suite 2
                                         Foxboro, MA 02035 USA
                                          www.PathfinderMDA.com
                                                   888-662-7284




          ©2005 by Pathfinder Solutions
Table Of Contents
1.   Introduction .......................................................................................... 1

2.   Usage .................................................................................................... 1

3.   Implementation .................................................................................... 2
     New Mechanism - PfdInstanceMap ............................................................. 2
     Instance creation - array .......................................................................... 2
     Class-based finds .................................................................................... 2
     Instance deletion - array .......................................................................... 2

4.   Implementation Notes .......................................................................... 3




                                                       ii
Index-based Instance Identification




1. Introduction
Index-based instance identification allows for the efficient retrieval of object
instances from an instance population. Object instances using index-based instance
identification contain an “identifier” attribute - indicated by the IndexID marking -
that uniquely identifies the instance. This marking will result in the generation of an
instance population structure that uses the C++ Standard Template Library
std::map, reducing FIND/WHERE constructs based on the id attribute to map lookup
via std::map::find().
Alternatively when used in conjunction with the MaxIndex class marking, this will
result in the generation of an instance population structure using an array, reducing
FIND/WHERE constructs based on the id attribute to a direct array element access.
The following diagram show how the index-based instance population management
manages the instance table. The class is defined to have an attribute named “ID”
which is marked as the instance identifier. When instances of the class are created,
the value of the “ID” attribute is used to determine the location in the population
table where the instance will reside.



                                                         Instance 0
         Instance 0                                        ID = 0

         Instance 1


             …

                                                         Instance n
         Instance n                                   ID = MaxIndex-1


          Instance
         Population
            Table




When PAL FINDs are used to locate an instance using the “ID” attribute in a where
clause, the implementation can perform a rapid index-based retrieval of the object
rather than performing the usual linear table search strategy.

2. Usage
To enable index-based instance identification, one of the class’ attributes must be
marked with the IndexID value set to “TRUE”. Normally, this marking takes place
in the properties.txt file during transformation.
Optionally the class can use the MaxIndex marking to enable array-based instance
management.


                                           1
Index-based Instance Identification



Transformation-time errors are logged using the Transformation Engine’s
LOG_MESSAGE statement in the following cases:
     More than one attribute is marked with the IndexID marking.
     The attribute marked with the IndexID marking is not typed as an integer.
     An attribute is marked with IndexID but the MaxIndex marking is not
       enabled.
At runtime, it is an error to:
     Create an instance whose index is negative or greater than the limits imposed
       by the MaxIndex marking.
     Create multiple instances with the same index value.


3. Implementation
Index-based instance identification affects several areas of the design including:
    how instances plug themselves into the instance population set.
    how WHERE clauses are processed when the index attribute is specified in the
      clause
    how instances unplug themselves from the instance population

      New Mechanism - PfdInstanceMap
      For non-array based storage the PfdInstanceMap class is used. This class
      encapsulates the usage of the std::map.

      Instance creation - array
      The instance “plug-in” handling for object instances changes when the
      IndexID marking is used. Without the index ID marking, an object instance
      is inserted into the first available slot in the table. With the IndexID
      marking, the instance is inserted at the offset specified by the value of the
      index attribute. If the slot is already occupied, the plug-in code should not
      overwrite the existing instance. With the IndexID marking, the instance
      table may be sparsely populated. Any iteration over the instance table must
      guarantee that empty entries are handled gracefully.

      Class-based finds
      The generation of class-based finds will be modified to detect cases where the
      find operation can be optimized with index-based lookups for the instance
      population. Given the case where a find expression’s “WHERE” clause
      contains only the IndexID attribute in an equivalence comparison, the
      implementation can efficiently retrieve the instance from the table without
      having to search the entire population. Additional optimization should be
      possible for where clauses that contain the IndexID attribute when used in
      conjunction with a logical-and operation.

      Instance deletion - array
      The instance deletion (“unplug”) handling must clear the object instance from
      its slot in the instance table. This must be done without altering the offsets of
      any subsequent entries in the instance population.



                                          2
Index-based Instance Identification




4. Implementation Notes
     Assignment to an attribute marked with the IndexID marking is not
      supported. This attribute should be treated as a constant and not changed
      over the lifetime of the instance.




                                        3

More Related Content

Similar to Index Based Instance Identification

ICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code DescriptionsICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code Descriptions
Sebastiano Panichella
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsSaurabh Narula
 
Asp.net boilerplate
Asp.net boilerplateAsp.net boilerplate
Asp.net boilerplate
ChamithSaranga
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
Lukas Vlcek
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
MongoDB
 
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
MongoDB
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkitnikhilyagnic
 
Object-oriented programming
Object-oriented programmingObject-oriented programming
Object-oriented programming
Neelesh Shukla
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
Make School
 
AEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene Indexes
AdobeMarketingCloud
 
Oak Lucene Indexes
Oak Lucene IndexesOak Lucene Indexes
Oak Lucene Indexes
Chetan Mehrotra
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
David Harrison
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
David Harrison
 
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache SparkAttribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
IRJET Journal
 
Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26
kreuter
 
285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt
ntrnbk
 
unit 4,Indexes in database.docx
unit 4,Indexes in database.docxunit 4,Indexes in database.docx
unit 4,Indexes in database.docx
RaviRajput416403
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategies
jlaspada
 
quickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotationsquickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotationsjorgesimao71
 

Similar to Index Based Instance Identification (20)

ICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code DescriptionsICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code Descriptions
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
 
Asp.net boilerplate
Asp.net boilerplateAsp.net boilerplate
Asp.net boilerplate
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
Object-oriented programming
Object-oriented programmingObject-oriented programming
Object-oriented programming
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
 
AEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene Indexes
 
Oak Lucene Indexes
Oak Lucene IndexesOak Lucene Indexes
Oak Lucene Indexes
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache SparkAttribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
 
Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26
 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
 
285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt
 
unit 4,Indexes in database.docx
unit 4,Indexes in database.docxunit 4,Indexes in database.docx
unit 4,Indexes in database.docx
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategies
 
quickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotationsquickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotations
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

Index Based Instance Identification

  • 1. Index-Based Instance Identification Version 1.1 December 27, 2006 PathMATE Technical Notes Pathfinder Solutions LLC 33 Commercial Drive, Suite 2 Foxboro, MA 02035 USA www.PathfinderMDA.com 888-662-7284 ©2005 by Pathfinder Solutions
  • 2. Table Of Contents 1. Introduction .......................................................................................... 1 2. Usage .................................................................................................... 1 3. Implementation .................................................................................... 2 New Mechanism - PfdInstanceMap ............................................................. 2 Instance creation - array .......................................................................... 2 Class-based finds .................................................................................... 2 Instance deletion - array .......................................................................... 2 4. Implementation Notes .......................................................................... 3 ii
  • 3. Index-based Instance Identification 1. Introduction Index-based instance identification allows for the efficient retrieval of object instances from an instance population. Object instances using index-based instance identification contain an “identifier” attribute - indicated by the IndexID marking - that uniquely identifies the instance. This marking will result in the generation of an instance population structure that uses the C++ Standard Template Library std::map, reducing FIND/WHERE constructs based on the id attribute to map lookup via std::map::find(). Alternatively when used in conjunction with the MaxIndex class marking, this will result in the generation of an instance population structure using an array, reducing FIND/WHERE constructs based on the id attribute to a direct array element access. The following diagram show how the index-based instance population management manages the instance table. The class is defined to have an attribute named “ID” which is marked as the instance identifier. When instances of the class are created, the value of the “ID” attribute is used to determine the location in the population table where the instance will reside. Instance 0 Instance 0 ID = 0 Instance 1 … Instance n Instance n ID = MaxIndex-1 Instance Population Table When PAL FINDs are used to locate an instance using the “ID” attribute in a where clause, the implementation can perform a rapid index-based retrieval of the object rather than performing the usual linear table search strategy. 2. Usage To enable index-based instance identification, one of the class’ attributes must be marked with the IndexID value set to “TRUE”. Normally, this marking takes place in the properties.txt file during transformation. Optionally the class can use the MaxIndex marking to enable array-based instance management. 1
  • 4. Index-based Instance Identification Transformation-time errors are logged using the Transformation Engine’s LOG_MESSAGE statement in the following cases:  More than one attribute is marked with the IndexID marking.  The attribute marked with the IndexID marking is not typed as an integer.  An attribute is marked with IndexID but the MaxIndex marking is not enabled. At runtime, it is an error to:  Create an instance whose index is negative or greater than the limits imposed by the MaxIndex marking.  Create multiple instances with the same index value. 3. Implementation Index-based instance identification affects several areas of the design including:  how instances plug themselves into the instance population set.  how WHERE clauses are processed when the index attribute is specified in the clause  how instances unplug themselves from the instance population New Mechanism - PfdInstanceMap For non-array based storage the PfdInstanceMap class is used. This class encapsulates the usage of the std::map. Instance creation - array The instance “plug-in” handling for object instances changes when the IndexID marking is used. Without the index ID marking, an object instance is inserted into the first available slot in the table. With the IndexID marking, the instance is inserted at the offset specified by the value of the index attribute. If the slot is already occupied, the plug-in code should not overwrite the existing instance. With the IndexID marking, the instance table may be sparsely populated. Any iteration over the instance table must guarantee that empty entries are handled gracefully. Class-based finds The generation of class-based finds will be modified to detect cases where the find operation can be optimized with index-based lookups for the instance population. Given the case where a find expression’s “WHERE” clause contains only the IndexID attribute in an equivalence comparison, the implementation can efficiently retrieve the instance from the table without having to search the entire population. Additional optimization should be possible for where clauses that contain the IndexID attribute when used in conjunction with a logical-and operation. Instance deletion - array The instance deletion (“unplug”) handling must clear the object instance from its slot in the instance table. This must be done without altering the offsets of any subsequent entries in the instance population. 2
  • 5. Index-based Instance Identification 4. Implementation Notes  Assignment to an attribute marked with the IndexID marking is not supported. This attribute should be treated as a constant and not changed over the lifetime of the instance. 3