Multi-threaded code generation from Signal program to OpenMP

  • Authors:
  • Kai Hu;Teng Zhang;Zhibin Yang

  • Affiliations:
  • State Key Laboratory of Software Development Environment, Beihang University, Beijing, China 100191;School of Computer Science and Engineering, Beihang University, Beijing, China 100191;School of Computer Science and Engineering, Beihang University, Beijing, China 100191 and IRIT-CNRS, Université de Toulouse, Toulouse, France 31062

  • Venue:
  • Frontiers of Computer Science: Selected Publications from Chinese Universities
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

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.