Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Multi-threaded code generation from Signal program to OpenMP

  • Research Article
  • Published:
Frontiers of Computer Science Aims and scope Submit manuscript

Abstract

The use of multi-core processors will become a trend in safety critical systems. For safe execution of multithreaded code, automatic code generation from formal specification is a desirable method. Signal, a synchronous language dedicated for the functional description of safety critical systems, provides soundness semantics for deterministic concurrency. Although sequential code generation of Signal has been implemented in Polychrony compiler, deterministic multi-threaded code generation strategy is still far from mature. Moreover, existing code generation methods use certain multi-thread library, which limits the cross platform executions. OpenMP is an application program interface (API) standard for parallel programming, supported by several mainstream compilers from different platforms. This paper presents a methodology translating Signal program to OpenMP-based multi-threaded C code. First, the intermediate representation of the core syntax of Signal using synchronous guarded actions is defined. Then, according to the compositional semantics of Signal equations, the Signal program is synthesized to dependency graph (DG). After parallel tasks are extracted from dependency graph, the Signal program can be finally translated into OpenMP-based C code which can be executed on multiple platforms.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. IEEE POSIX standardization authority. http://standards.ieee.org/regauth/posix/

  2. Microsoft windows threads. http://msdn.microsoft.com/

  3. MPI: A message-passing interface standard version 3.0. http://www.mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf

  4. The OpenMP API specification for parallel programming. http://openmp.org/wp/

  5. Intel thread building blocks. http://www.threadingbuildingblocks.org/

  6. Lee E A. The problem with threads. Computer, 2006, 39(5): 33–42

    Article  Google Scholar 

  7. Benveniste A, Berry G. The synchronous approach to reactive and realtime systems. Proceedings of the IEEE, 1991, 79(9): 1270–1282

    Article  Google Scholar 

  8. Benveniste A, Caspi P, Edwards S A, Halbwachs N, Le Guernic P, De Simone R. The synchronous languages 12 years later. Proceedings of the IEEE, 2003, 91(1): 64–83

    Article  Google Scholar 

  9. Berry G, Gonthier G. The esterel synchronous programming language: design, semantics, implementation. Science of Computer Programming, 1992, 19(2): 87–152

    Article  MATH  Google Scholar 

  10. Halbwachs N, Caspi P, Raymond P, Pilaud D. The synchronous data flow programming language lustre. Proceedings of the IEEE, 1991, 79(9): 1305–1320

    Article  Google Scholar 

  11. Le Guernic P, Gautier T, Le Borgne M, Le Maire C. Programming realtime applications with signal. Proceedings of the IEEE, 1991, 79(9): 1321–1336

    Article  Google Scholar 

  12. Le Guernic P, Talpin J P, Le Lann J C. Polychrony for system design. Journal of Circuits, Systems, and Computers, 2003, 12(3): 261–303

    Article  Google Scholar 

  13. Potop-Butucaru D, Caillaud B, Benveniste A. Concurrency in synchronous systems. Formal Methods in System Design, 2006, 28(2): 111–130

    Article  MATH  Google Scholar 

  14. Besnard L, Gautier T, Talpin J P. Code generation strategies in the polychrony environment. http://hal.inria.fr/docs/00/37/24/12/PDF/RR-6894.pdf

  15. Besnard L, Gautier T, Le Guernic P, Talpin J P. Compilation of polychronous data flow equations. In: Synthesis of Embedded Software, 1–40. Springer, 2010

    Chapter  Google Scholar 

  16. Talpin J P, Ouy J, Gautier T, Besnard L, Le Guernic P. Compositional design of isochronous systems. Science of Computer Programming, 2012, 77(2): 113–128

    Article  MATH  Google Scholar 

  17. Benveniste A, Caillaud B, Le Guernic P. Compositionality in dataflow synchronous languages: specification and distributed code generation. Information and Computation, 2000, 163(1): 125–171

    Article  MathSciNet  MATH  Google Scholar 

  18. Jose B A, Shukla S K, Patel H D, Talpin J P. On the deterministic multithreaded software synthesis from polychronous specifications. In: Proceedings of the 6th ACM/IEEE International Conference on Formal Methods and Models for Co-Design. 2008, 129–138

    Chapter  Google Scholar 

  19. Maffeïs O, Le Guernic P. Combining dependability with architectural adaptability by means of the signal language. In: Static Analysis, 99–110. Springer, 1993

    Chapter  Google Scholar 

  20. Potop-Butucaru D, Sorel Y, Simone d R, Talpin J P. From concurrent multi-clock programs to deterministic asynchronous implementations. Fundamenta Informaticae, 2011, 108(1): 91–118

    MathSciNet  MATH  Google Scholar 

  21. Papailiopoulou V, Potop-Butucaru D, Sorel Y, Simoned R, Besnard L, Talpin J. From design-time concurrency to effective implementation parallelism: The multi-clock reactive case. In: Proceedings of the 2011 Electronic System Level Synthesis Conference. 2011, 1–6

    Chapter  Google Scholar 

  22. Baudisch D, Brandt J, Schneider K. Multithreaded code from synchronous programs: extracting independent threads for openmp. In: Proceedings of the 2010 Conference on Design, Automation, and Test in Europe. 2010, 949–952

    Chapter  Google Scholar 

  23. Besnard L, Gautier T, Le Guernic P. Signal v4-Inria version: reference manual, 2008

    Google Scholar 

  24. Gamatie A. Designing embedded systems with the signal programming language. Springer, 2010

    Book  Google Scholar 

  25. RT-builder, geensys. http://www.geensys.com/

  26. Polychrony. http://www.irisa.fr/espresso/Polychrony/

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kai Hu.

Additional information

Kai Hu is an associate professor at Beihang University, China. He received his PhD degree from Beihang University in 2001. From 2001 to 2004, he did the post-doctoral research at Nanyang Technological University, Singapore. Since 2004, he is the leader of the team of LDMC in the Institute of Computer Architecture(ICA), Beihang university. His research interests concern embedded real time systems and high performance computing. He has good cooperation with IRIT and INRIA Institute of France on study of AADL and synchronous languages.

Teng Zhang received his BE in computer science and engineering from Beihang University in 2011. He is now the master’s degree student at the same university. His research interests include synchronous languages, modeling of embedded system and formal methods.

Zhibin Yang received his PhD degree from Beihang University, China, in February 2012. Since April 2012, he has been a Postdoc in IRIT research laboratory of University of Toulouse, France. His research interests include safety-critical real-time system, formal verification, AADL, and synchronous languages.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hu, K., Zhang, T. & Yang, Z. Multi-threaded code generation from Signal program to OpenMP. Front. Comput. Sci. 7, 617–626 (2013). https://doi.org/10.1007/s11704-013-3906-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11704-013-3906-4

Keywords