SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
UML Foundation for C Self-Trimming
                                                      Version 2.6
                                             September 28, 2003




PathMATE Technical Notes

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




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

2.   System-Level Control ............................................................................. 1

3.   Targeted Implementation Artifacts ........................................................ 1
     Domain ................................................................................................. 1
     Class ..................................................................................................... 2
     State Machine......................................................................................... 2
     Association............................................................................................. 2

4.   Sample................................................................................................... 2

5.   Template Techniques ............................................................................. 3




                                                       ii
www.pathfindermda.com




1. Introduction
This Technical Note describes the optimizations to be deployed in RAM and code
space optimization in the UML Foundation for C implementation architecture. It lists
the target structures and accessor code to be eliminated when it is not needed.
This optimization is heavily affected by the analysis class-based code generation
control property SuppressGeneration (TRUE/FALSE). Any class that is "suppressed"
(not generated) because its SuppressGeneration == "TRUE" may potentially
eliminate the access/reference/use of some other non-suppressed artifacts. The
property SuppressGeneration is available for class services (however if a class has
SuppressGeneration == " TRUE", all class services will automatically have their
SuppressGeneration set to " TRUE"). The property SuppressGeneration is also
available for domain services, and for subsystems where all classes and domain
services in a subsystem with SuppressGeneration == " TRUE" will automatically have
their SuppressGeneration set to " TRUE".
(Please note this technical assumes Subsystem Phase 2 capabilities as a base.)


2. System-Level Control
The system level property "SelfTrim" (default value is "FALSE") will control this
feature. If "SelfTrim" is FALSE, then full code will be generated regardless of
whether it is needed by the PAL actions. If "SelfTrim" is "TRUE" then the
implementation artifacts in section 3. Targeted Implementation Artifacts will only be
generated is explicitly needed by PAL actions.
To help illuminate the set of trimmed elements, when "SelfTrim" is "TRUE a trimming
log named <system name>_<domain prefix>_trimming_results.txt is created for
each domain in the top level generated code output directory.


3. Targeted Implementation Artifacts
The purpose of these optimizations is to reduce RAM and code space optimization in
the UML Foundation for C implementation based on the actual needs of the model, in
terms of what is accessed. The overall strategy is simple: while the overall
implementation architecture calls for a full set of structures and functions to support
all possible model (PAL) actions, only those that are actually required by an action
currently present in the domain will be generated.
The difficulty in this feature comes from the need to initially examine all classes to
see if any are suppressed (the SuppressGeneration property). The use of this
property prevents these optimization efforts from relying on the accessor tracking
data automatically constructed by Springboard, requiring that templates be
constructed to navigate the non-suppressed PAL and construct their own data.
All implementation artifacts listed below will only be generated if they are actually
accessed/referenced/used.

Domain
     (All Domain Services will be generated to support external use.)




                                               1
www.pathfindermda.com




Class
   Class-Extent Instance Tracking Structure (for FIND CLASS…)
   Class-Extent Instance Tracking Functions
   Attributes
   Class Services (via explicit invocation, or if the target of a ServiceHandle)
   Constructor/Destructor Functions
   Various class support functions, including unplug, and unplugDispatcher
   internalInfo_ (combination of rttiNumber_, state_ and used_ fields)
   Class (if no aspects of a class are referenced, then nothing will be generated for the class)

State Machine
   Transitions (If a transition's event is never GENERATED in PAL, then the transition/guard
      functions are not generated)
   State Action Functions (If all transitions into a state are optimized away, and no class
      CREATEs reference it as an initial state, then all state action function for the state will not
      be generated)

Association
   Participant Instance Tracking Structures (in each participant class)
   Participant Link/Unlink Functions (in each participant class)
   Participant Navigation Functions (in each participant class)
   *Note: due to the automatic unlink aspect of class instance delete, any delete of a class
      constitutes a navigational access of that association from that participant. If there are no
      other association accesses from that participant’s side and it is desired to avoid
      generating participant overhead from that side, the automatic unlink implementation can
      be forced to use a class-extent search of it’s related participant. This is done by setting
      the association’s “Optimize” property to “Small” (the default is “Fast”).


4. Sample
In the following sample model segments from the Rooms domain, a simple example
shows the elimination of a class and related code elements via the
SuppressGeneration property.

                                     A1
                D oor
                                                                          ser ces
                                                                             vi
                          1
                                      +l
                                       ocks
                                              1                            U nLock()
                                          Lock




                                              Figure 1 Class Model

The Room:UnLock() service contains:



                                                  2
www.pathfindermda.com




. . .
Ref<Lock> lck = FIND front_door->A1;
. . .



Without eliminating the Lock class, the generated structure definition for Door
contains a pointer supporting A1, and a corresponding navigation function:
struct Rooms_Door
        . . .
        /* Analysis associations */
        Rooms_Lock_handle_t acrossA1_to_locks;
        . . .


Rooms_Lock_handle_t Rooms_Door_navigate_acrossA1_to_locks(Rooms_Door_handle_t start);



Now let us presume we wish to deliver a product variant without any Locks for doors.
The following properties.txt file segment shows the elimination of the Lock class:
Object,TechNoteSample.Rooms.Lock,SuppressGeneration,TRUE
DomainService,TechNoteSample.Rooms.UnLock,SuppressGeneration,TRUE



Now the files Rooms_Lock.c and Rooms_Lock.h are no longer generated, and the
generated structure definition for Door has neither the pointer supporting A1, nor the
corresponding navigation function.


5. Template Techniques
The Springboard translation engine has built-in data fields for many analysis
elements listing their accessors. These accessor lists could be very useful in
determining if each analysis element is required. However the impact of the analysis
class and domain-service code generation control property SuppressGeneration
(TRUE/FALSE) is unknown at model extraction time to Springboard, and these lists
will not be accurate at the start of target file production (code generation).
In order to allow template logic processing to affect the model information
population, a new Springboard directive has been made available from version
4.03.015 forward. This directive is [DELETE analysis_element]. It removes the
specified analysis element from the model information, including eliminating it from
any lists it may be referenced in. For example DELETing an object will remove it
from its domain’s objects field.
By making a “pre-processing” pass over the analysis elements, all Suppressed and
unreferenced elements can be removed. This removal technique will be used for all
elements, except for associations where only one side is used. In this case the
relationship and both of it’s participants must exist, but only the elements of the
association that are used for the actually exercised navigations will be generated.




                                            3
www.pathfindermda.com




4

Más contenido relacionado

La actualidad más candente

La actualidad más candente (12)

GUI programming
GUI programmingGUI programming
GUI programming
 
Java
JavaJava
Java
 
Ppt on java basics1
Ppt on java basics1Ppt on java basics1
Ppt on java basics1
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1
 
A rendering architecture
A rendering architectureA rendering architecture
A rendering architecture
 
Gui in java
Gui in javaGui in java
Gui in java
 
Strategy Design Pattern
Strategy Design PatternStrategy Design Pattern
Strategy Design Pattern
 
Ajp notes-chapter-02
Ajp notes-chapter-02Ajp notes-chapter-02
Ajp notes-chapter-02
 
Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput data
 
20111115 e trice eclipse demo camp munich
20111115 e trice eclipse demo camp munich20111115 e trice eclipse demo camp munich
20111115 e trice eclipse demo camp munich
 
Java layoutmanager
Java layoutmanagerJava layoutmanager
Java layoutmanager
 
Layout manager
Layout managerLayout manager
Layout manager
 

Destacado

Destacado (12)

140006
140006140006
140006
 
140011
140011140011
140011
 
Progetto Casa d'Elia
Progetto Casa d'EliaProgetto Casa d'Elia
Progetto Casa d'Elia
 
140009
140009140009
140009
 
140013
140013140013
140013
 
140015
140015140015
140015
 
Resolving conflict for fiduciaries
Resolving conflict for fiduciariesResolving conflict for fiduciaries
Resolving conflict for fiduciaries
 
Distributed Deployment Model Driven Development
Distributed Deployment Model Driven DevelopmentDistributed Deployment Model Driven Development
Distributed Deployment Model Driven Development
 
Damas dama+chip 2
Damas dama+chip 2Damas dama+chip 2
Damas dama+chip 2
 
endosulfan induced neurotoxicity
endosulfan induced neurotoxicityendosulfan induced neurotoxicity
endosulfan induced neurotoxicity
 
Ky nang-lap-ke-hoach
Ky nang-lap-ke-hoachKy nang-lap-ke-hoach
Ky nang-lap-ke-hoach
 
Hizmetkar (servant) liderlik
Hizmetkar (servant) liderlikHizmetkar (servant) liderlik
Hizmetkar (servant) liderlik
 

Similar a UML Foundation for C Self Trimming

Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning componentsMadan Khichi
 
Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning componentsMohith Shrivastava
 
What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2Santosh Singh Paliwal
 
Tracking my face with matlab ws word format
Tracking my face with matlab ws word formatTracking my face with matlab ws word format
Tracking my face with matlab ws word formatGaspard Ggas
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docxssuser1c8ca21
 
150104 3 methods for-binary_analysis_and_valgrind
150104 3 methods for-binary_analysis_and_valgrind150104 3 methods for-binary_analysis_and_valgrind
150104 3 methods for-binary_analysis_and_valgrindRaghu Palakodety
 
Tracking my face with matlab
Tracking my face with matlabTracking my face with matlab
Tracking my face with matlabGaspard Ggas
 
RomaFramework Tutorial Basics
RomaFramework Tutorial BasicsRomaFramework Tutorial Basics
RomaFramework Tutorial BasicsLuca Garulli
 
System verilog important
System verilog importantSystem verilog important
System verilog importantelumalai7
 
A C Frame Library User Manual And Implementation Notes
A C   Frame Library   User Manual And Implementation NotesA C   Frame Library   User Manual And Implementation Notes
A C Frame Library User Manual And Implementation NotesKate Campbell
 
Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...Stefano Costanzo
 
Software engg. pressman_ch-8
Software engg. pressman_ch-8Software engg. pressman_ch-8
Software engg. pressman_ch-8Dhairya Joshi
 
Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications
Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications
Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications neirew J
 
Error isolation and management in agile
Error isolation and management in agileError isolation and management in agile
Error isolation and management in agileijccsa
 

Similar a UML Foundation for C Self Trimming (20)

Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning components
 
Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning components
 
What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2
 
Tracking my face with matlab ws word format
Tracking my face with matlab ws word formatTracking my face with matlab ws word format
Tracking my face with matlab ws word format
 
Code Quality Management iOS
Code Quality Management iOSCode Quality Management iOS
Code Quality Management iOS
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docx
 
150104 3 methods for-binary_analysis_and_valgrind
150104 3 methods for-binary_analysis_and_valgrind150104 3 methods for-binary_analysis_and_valgrind
150104 3 methods for-binary_analysis_and_valgrind
 
Tracking my face with matlab
Tracking my face with matlabTracking my face with matlab
Tracking my face with matlab
 
RomaFramework Tutorial Basics
RomaFramework Tutorial BasicsRomaFramework Tutorial Basics
RomaFramework Tutorial Basics
 
System verilog important
System verilog importantSystem verilog important
System verilog important
 
Database programming
Database programmingDatabase programming
Database programming
 
A C Frame Library User Manual And Implementation Notes
A C   Frame Library   User Manual And Implementation NotesA C   Frame Library   User Manual And Implementation Notes
A C Frame Library User Manual And Implementation Notes
 
Mule ctf
Mule  ctfMule  ctf
Mule ctf
 
Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...
 
Software engg. pressman_ch-8
Software engg. pressman_ch-8Software engg. pressman_ch-8
Software engg. pressman_ch-8
 
Struts Ppt 1
Struts Ppt 1Struts Ppt 1
Struts Ppt 1
 
Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications
Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications
Error Isolation and Management in Agile Multi-Tenant Cloud Based Applications
 
Error isolation and management in agile
Error isolation and management in agileError isolation and management in agile
Error isolation and management in agile
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 

Más de Pathfinder Solutions

Más de Pathfinder Solutions (9)

PathMATE Transformation Maps Mutx Controls
PathMATE Transformation Maps Mutx ControlsPathMATE Transformation Maps Mutx Controls
PathMATE Transformation Maps Mutx Controls
 
Multi Process Message Formats
Multi Process Message FormatsMulti Process Message Formats
Multi Process Message Formats
 
Memory Pools for C and C++
Memory Pools for C and C++Memory Pools for C and C++
Memory Pools for C and C++
 
Interprocess Message Formats
Interprocess Message FormatsInterprocess Message Formats
Interprocess Message Formats
 
Index Based Instance Identification
Index Based Instance IdentificationIndex Based Instance Identification
Index Based Instance Identification
 
Build Generation
Build GenerationBuild Generation
Build Generation
 
Blending Realized Code
Blending Realized CodeBlending Realized Code
Blending Realized Code
 
Binary Instance Loading
Binary Instance LoadingBinary Instance Loading
Binary Instance Loading
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 

Último

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Último (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

UML Foundation for C Self Trimming

  • 1. UML Foundation for C Self-Trimming Version 2.6 September 28, 2003 PathMATE Technical Notes Pathfinder Solutions LLC 33 Commercial Drive, Suite 2 Foxboro, MA 02035 USA www.PathfinderMDA.com 888-662-7284 ©2003 by Pathfinder Solutions
  • 2. Table Of Contents 1. Introduction........................................................................................... 1 2. System-Level Control ............................................................................. 1 3. Targeted Implementation Artifacts ........................................................ 1 Domain ................................................................................................. 1 Class ..................................................................................................... 2 State Machine......................................................................................... 2 Association............................................................................................. 2 4. Sample................................................................................................... 2 5. Template Techniques ............................................................................. 3 ii
  • 3. www.pathfindermda.com 1. Introduction This Technical Note describes the optimizations to be deployed in RAM and code space optimization in the UML Foundation for C implementation architecture. It lists the target structures and accessor code to be eliminated when it is not needed. This optimization is heavily affected by the analysis class-based code generation control property SuppressGeneration (TRUE/FALSE). Any class that is "suppressed" (not generated) because its SuppressGeneration == "TRUE" may potentially eliminate the access/reference/use of some other non-suppressed artifacts. The property SuppressGeneration is available for class services (however if a class has SuppressGeneration == " TRUE", all class services will automatically have their SuppressGeneration set to " TRUE"). The property SuppressGeneration is also available for domain services, and for subsystems where all classes and domain services in a subsystem with SuppressGeneration == " TRUE" will automatically have their SuppressGeneration set to " TRUE". (Please note this technical assumes Subsystem Phase 2 capabilities as a base.) 2. System-Level Control The system level property "SelfTrim" (default value is "FALSE") will control this feature. If "SelfTrim" is FALSE, then full code will be generated regardless of whether it is needed by the PAL actions. If "SelfTrim" is "TRUE" then the implementation artifacts in section 3. Targeted Implementation Artifacts will only be generated is explicitly needed by PAL actions. To help illuminate the set of trimmed elements, when "SelfTrim" is "TRUE a trimming log named <system name>_<domain prefix>_trimming_results.txt is created for each domain in the top level generated code output directory. 3. Targeted Implementation Artifacts The purpose of these optimizations is to reduce RAM and code space optimization in the UML Foundation for C implementation based on the actual needs of the model, in terms of what is accessed. The overall strategy is simple: while the overall implementation architecture calls for a full set of structures and functions to support all possible model (PAL) actions, only those that are actually required by an action currently present in the domain will be generated. The difficulty in this feature comes from the need to initially examine all classes to see if any are suppressed (the SuppressGeneration property). The use of this property prevents these optimization efforts from relying on the accessor tracking data automatically constructed by Springboard, requiring that templates be constructed to navigate the non-suppressed PAL and construct their own data. All implementation artifacts listed below will only be generated if they are actually accessed/referenced/used. Domain (All Domain Services will be generated to support external use.) 1
  • 4. www.pathfindermda.com Class Class-Extent Instance Tracking Structure (for FIND CLASS…) Class-Extent Instance Tracking Functions Attributes Class Services (via explicit invocation, or if the target of a ServiceHandle) Constructor/Destructor Functions Various class support functions, including unplug, and unplugDispatcher internalInfo_ (combination of rttiNumber_, state_ and used_ fields) Class (if no aspects of a class are referenced, then nothing will be generated for the class) State Machine Transitions (If a transition's event is never GENERATED in PAL, then the transition/guard functions are not generated) State Action Functions (If all transitions into a state are optimized away, and no class CREATEs reference it as an initial state, then all state action function for the state will not be generated) Association Participant Instance Tracking Structures (in each participant class) Participant Link/Unlink Functions (in each participant class) Participant Navigation Functions (in each participant class) *Note: due to the automatic unlink aspect of class instance delete, any delete of a class constitutes a navigational access of that association from that participant. If there are no other association accesses from that participant’s side and it is desired to avoid generating participant overhead from that side, the automatic unlink implementation can be forced to use a class-extent search of it’s related participant. This is done by setting the association’s “Optimize” property to “Small” (the default is “Fast”). 4. Sample In the following sample model segments from the Rooms domain, a simple example shows the elimination of a class and related code elements via the SuppressGeneration property. A1 D oor ser ces vi 1 +l ocks 1 U nLock() Lock Figure 1 Class Model The Room:UnLock() service contains: 2
  • 5. www.pathfindermda.com . . . Ref<Lock> lck = FIND front_door->A1; . . . Without eliminating the Lock class, the generated structure definition for Door contains a pointer supporting A1, and a corresponding navigation function: struct Rooms_Door . . . /* Analysis associations */ Rooms_Lock_handle_t acrossA1_to_locks; . . . Rooms_Lock_handle_t Rooms_Door_navigate_acrossA1_to_locks(Rooms_Door_handle_t start); Now let us presume we wish to deliver a product variant without any Locks for doors. The following properties.txt file segment shows the elimination of the Lock class: Object,TechNoteSample.Rooms.Lock,SuppressGeneration,TRUE DomainService,TechNoteSample.Rooms.UnLock,SuppressGeneration,TRUE Now the files Rooms_Lock.c and Rooms_Lock.h are no longer generated, and the generated structure definition for Door has neither the pointer supporting A1, nor the corresponding navigation function. 5. Template Techniques The Springboard translation engine has built-in data fields for many analysis elements listing their accessors. These accessor lists could be very useful in determining if each analysis element is required. However the impact of the analysis class and domain-service code generation control property SuppressGeneration (TRUE/FALSE) is unknown at model extraction time to Springboard, and these lists will not be accurate at the start of target file production (code generation). In order to allow template logic processing to affect the model information population, a new Springboard directive has been made available from version 4.03.015 forward. This directive is [DELETE analysis_element]. It removes the specified analysis element from the model information, including eliminating it from any lists it may be referenced in. For example DELETing an object will remove it from its domain’s objects field. By making a “pre-processing” pass over the analysis elements, all Suppressed and unreferenced elements can be removed. This removal technique will be used for all elements, except for associations where only one side is used. In this case the relationship and both of it’s participants must exist, but only the elements of the association that are used for the actually exercised navigations will be generated. 3