Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Category:Eclipse UML Generators/Specification/EmbeddedCGenerator/Contribution"

m (Profile specification)
 
(108 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Evolution Specification: UML Generator for Embedded C  =
+
#REDIRECT [[Eclipse_UML_Generators/Specification/EmbeddedCGenerator/Contribution]]
 
+
Current status is '''DRAFT'''
+
 
+
== Preamble  ==
+
 
+
The traditional text-based approach of embedded software design is not efficient enough to handle such advanced/complex systems. There is a need for modeling C components in order to avoid repetitive and heavy low level processes. As initial contribution to the Eclipse UML generators project, Spacebel proposes development methods and a ANSI C code generator for Embedded Software.
+
 
+
'''Relevant tickets:'''
+
 
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=438003 Bug TBD] - Generation of C code for Embedded Systems
+
 
+
== Introduction  ==
+
 
+
Major provider of IT systems on-board satellites and space vehicles, Spacebel cumulates more than one century of experience in On Board Software. The expertise encompasses the whole flight software development lifecycle, from the early concept studies, including the analysis and the specification over the architecture, the design and the development, to the validation and the final integration of these critical software systems.
+
 
+
When developing embedded systems, software designers are squeezed by two trends — shrinking development cycles and growing design intricacy. The divide-and-conquer strategy for developing these complex systems means coordinating the resources of people with expertise in a wide range of disciplines. Quickly, it appears that the text-based approach of embedded system design is not efficient to manage such complex systems. There is a need for modeling C components in order to avoid repetitive and heavy low level processes.
+
 
+
As indicated in the title, the feature is able to generate C code from UML models. What distinguishes Embedded C from regular C generator are:
+
 
+
*repeatable and reliable generation of code
+
*preservation of the implementation fields
+
*highly documented detailed design
+
*compliance to MISRA guidelines of C language in critical systems
+
*traceability of the specification (requirements) in the sources
+
+
Modeling a complete embedded software written in C with UML is not straightforward. Indeed, the UML standard is sometimes too generic with a high level of abstraction. In order to mitigate the abstraction of UML, the generator comes up with an UML profile: the ''Embedded_C'' profile.
+
 
+
== Detailed Specification  ==
+
 
+
This chapter presents a detailed specification of the Generator UML to Embedded C. The following lines specify the functional & non-functional requirements that shall be implemented by the generator and the UML profile 'Embedded_C'.
+
 
+
=== Profile specification  ===
+
 
+
UML is so generic and sometimes so abstract that it is really hard to map the C language in UML. In order to overcome this problem, the entities of the C language are described with the help of UML stereotypes. Indeed, the UML standard often needs extensions to specify entities that only exist in C.
+
 
+
Therefore, UML stereotypes constitute a nice way to extend the UML standard. A stereotype is defined either as an extension of a UML base meta-class or as a specialization of an existing stereotype. The extension relationship of UML is not an association but a kind of association directed from the stereotype to the extended meta-class. Consequently, the metadata conveyed by the associated the attributes of the stereotype are associated to the extended meta-class in a transparent manner for the meta-class itself. This allows profiles owning the stereotypes to be applied and removed dynamically without modifying the underlying models.
+
 
+
For the sake of the Generator UML to Embedded C, a minimum number of stereotypes have been defined.
+
 
+
'''REQ-PROF-001''': The profile Embedded_C shall provide the following stereotypes:
+
* Array
+
* Asm
+
* Attribute
+
* Constant
+
* Inline
+
* Pointer
+
* Requirement
+
* Singleton
+
* Object
+
* Struct
+
* Typedef
+
* Union
+
* UsesStaticMethods
+
* Value
+
* Volatile
+
 
+
'''REQ-PROF-002''': The stereotype 'Array' shall be applicable for any uml::Property. It shall have the following attribute:
+
* The ‘multiplicity’ of the array shall be specified. The type of the attribute shall be 'String' meaning that it can be an alphanumeric value.
+
 
+
[[Image:Stereotype_Array.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-003''': The stereotype 'Asm' shall be applicable for any uml::Operation.
+
 
+
[[Image:Stereotype_Asm.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-004''': The stereotype 'Attribute' shall be applicable for any uml::Property or uml::Datatype. It shall have the following attribute:
+
* The 'attribute' of the property or datatype shall be specified (aligned, packed, ...).
+
 
+
[[Image:Stereotype_Attribute.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-005''': The stereotype 'Constant' shall be applicable for any uml::EnumerationLiteral of a given uml::Enumeration. It shall have the following attributes:
+
* The ‘declaration’ of the constant shall be specified or leave empty. The type of the attribute is String meaning that it can be an alphanumeric value.
+
* The ‘condition’ of the constant shall be specified or leave at ‘None’. In case ifndef or ifdef is selected, the definition of the constant will be conditional with respect to its name existence.
+
 
+
[[Image:Stereotype_Constant.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-006''': The stereotype 'Inline' shall be applicable for any uml::Operation.
+
* The ‘condition’ of the inline operation shall be specified or leave at ‘None’. In case ifndef or ifdef is selected, the definition of the inline operation will be conditional with respect to a ‘value’.
+
* The ‘value’ (of the condition) of the inline operation shall be specified or leave empty. The attribute ‘Value’ only takes effect when the attribute ‘condition’ is different than ‘None’ (e.g. condition = 'ifdef, value = 'DEBUGGING).
+
 
+
[[Image:Stereotype_Inline.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-007''': The stereotype 'Pointer' shall be applicable for any uml::TypedElement. It shall have the following attributes:
+
* The pointer kind shall be specified. The pointer can be simple, double or none. The pointer may also be oriented constant data or constant pointer.
+
 
+
[[Image:Stereotype_Pointer.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-008''': The stereotype 'Requirement' shall be applicable for any uml::Constraint. It shall have the following attributes:
+
* The attribute ‘parents’ shall make the traceability between requirement baseline and technical specification. The value of the ‘parents’ can be empty or it can be a list of requirement IDs.
+
* The user must however specify how the requirement is verified. Several methods of verification shall be proposed. By default, the verification by test shall be selected.
+
 
+
[[Image:Stereotype_Requirement.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-009''': The stereotype 'Singleton' shall be applicable for any uml::Class.
+
 
+
[[Image:Stereotype_Singleton.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-010''': The stereotype 'Object' shall be applicable for any uml::Class.
+
 
+
[[Image:Stereotype_Object.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-011''': The stereotype 'Struct' shall be applicable for any uml::TypedElement.
+
 
+
[[Image:Stereotype_Struct.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-012''': The stereotype 'Typedef' shall be applicable for any uml::DataType or uml::Enumeration. It shall have the following attributes:
+
* The attribute ‘MappedType’ shall be specified. The attribute must receive the existing type to which it is mapped.
+
 
+
''In case of Enumeration, if the attribute ‘MappedType’ is specified, the default type of the Enumeration is redefined by an specified mapped type. Otherwise, the Enumeration itself is seen as a type.''
+
 
+
[[Image:Stereotype_Typedef.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-013''': The stereotype 'Union' shall be applicable for any uml::DataType.
+
 
+
[[Image:Stereotype_Union.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-014''': The stereotype 'UsesStaticMethods' shall be applicable for any uml::Property.
+
 
+
[[Image:Stereotype_UsesStaticMethods.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-015''': The stereotype 'Value' shall be applicable for any uml::EnumerationLiteral. It shall have the following attributes:
+
* The attribute ‘Value’ shall be specified. It specifies the value of the Enumeration Literal. It can be an alphanumeric value.
+
 
+
[[Image:Stereotype_Value.JPEG|thumb|center|250px]]
+
 
+
 
+
'''REQ-PROF-016''': The stereotype 'Volatile' shall be applicable for uml::Property.
+
 
+
[[Image:Stereotype_Volatile.JPEG|thumb|center|250px]]
+
 
+
 
+
In addition to the stereotypes, the profile should also own the basic types of the C language.
+
 
+
'''REQ-PROF-017''': The profile Embedded_C shall provide the primitive types of the C language:
+
* char
+
* signed char
+
* unsigned char
+
* int
+
* signed int
+
* unsigned int
+
* short
+
* signed short
+
* unsigned short
+
* long
+
* signed long
+
* unsigned long
+
* long long
+
* signed long long
+
* unsigned long long
+
* float
+
* double
+
* void
+
 
+
[[Image:File-Primitive_Types.JPEG|thumb|center|250px]]
+
 
+
== Backward Compatibility and Migration Paths  ==
+
 
+
=== Metamodel Changes  ===
+
 
+
This evolution does not change any meta-models.
+
 
+
=== API Changes  ===
+
 
+
This evolution does not change any API.
+
 
+
=== User Interface Changes  ===
+
 
+
For consistency, the Embedded C generator should stick with the existing generation properties and menus (ref. [https://wiki.eclipse.org/Eclipse_UML_Generators/Specification/UserInterface/ConsistencyImprovement User Interface Consistency]).
+
 
+
New entries for Embedded C generator shall just be added to the existing infrastructure.
+
 
+
=== Documentation Changes  ===
+
 
+
User manuals should integrate the user interfaces updates for both ''Embedded_C'' profile and the generator.
+
 
+
== Tests and Non-regression strategy  ==
+
 
+
TBW
+
 
+
== Implementation choices and tradeoffs  ==
+
 
+
TBW
+
 
+
[[Category:Eclipse_UML_Generators]]
+
[[Category:Eclipse_UML_Generators/Specification]]
+

Latest revision as of 09:00, 17 April 2015

This category currently contains no pages or media.

Back to the top