3

I'm developing an embedded software based on standard specification. The software is big and I need a design of my software before start coding. the UML is an object-oriented language and could be a solution but I don't know how to use it for C softwares.

are there any document which help to use UML for C programming ? or are there another design language for c softwares ?

marli
  • 529
  • 10
  • 19
MOHAMED
  • 41,599
  • 58
  • 163
  • 268
  • similar to: http://stackoverflow.com/questions/2042608/uml-for-c-programming-language – Yuri Nov 18 '11 at 09:46
  • Uml is OO? I thought it was just a markup language for modeling –  Nov 18 '11 at 09:47
  • You could treat a class in a UML-diagram as a separate source file, where methods becomes functions in the file. Just because UML is used for object-oriented design doesn't mean it can't be used for a procedural language. – Some programmer dude Nov 18 '11 at 09:47
  • @Mocialov Boris: http://en.wikipedia.org/wiki/Unified_Modeling_Language first sentence in the wikipedia page says "Unified Modeling Language (UML) is a standardized general-purpose modeling language in the field of object-oriented software engineering" – Yuri Nov 18 '11 at 09:49
  • 1
    @Yuri I know, but it is just the question is weird.. i feel that Mohamed KALLEL wants to generate his C code from UML or something –  Nov 18 '11 at 09:52
  • @MocialovBoris UML is a graphical language, not markup (maybe you are thinking about XMI) – fortran Nov 18 '11 at 09:57
  • http://stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c – MOHAMED Mar 25 '13 at 09:05
  • Possible duplicate of [UML for C programming language](http://stackoverflow.com/questions/2042608/uml-for-c-programming-language) – marli Jan 26 '17 at 16:36

4 Answers4

1

Well we use Enterprise Architect to model our embedded software although we stop short of generating the code. EA can generate C code as well although we use C++ code because it feels more natural combined with UML. You can try it out and see if it fits your needs, it is not unforgivingly expensive either. It can also reverse engineer your C code so that may be a help.

AndersK
  • 35,813
  • 6
  • 60
  • 86
1

Yes, you can, mostly because of two reasons:

  • You can actually do Object Oriented Programming with C (although it is tedious and not completely advisable), there a few books on the subject that you can read.
  • You can still use class diagrams to model data structures and static methods. But UML is not just about class diagrams: you also have state diagrams, interaction diagrams, use case diagrams... And they are useful for structured programming too.
fortran
  • 74,053
  • 25
  • 135
  • 175
0

I have two products in mind that could help you:

0

I am not an expert for embedded software but have you look to https://www.polarsys.org/ ? "PolarSys is an Eclipse Industry Working Group created by large industry players and by tools providers to collaborate on the creation and support of Open Source tools for the development of embedded systems."

It is a platform based on Eclipse dedicated to embedded software. It use Papyrus for UML/SysML modeling and implement MARTE profil. "Papyrus is the PolarSys solution for SysML and UML modeling. It relies on the underlying Eclipse platform and on other Polarsys and Eclipse-based offerings to fulfill lifecycle integration needs, such as a C/C++ "

granier
  • 1,739
  • 13
  • 25