Formal specification and implementation of an automated pattern-based parallel-code generation framework

Programming correct parallel software in a cost-effective way is a challenging task requiring a high degree of expertise. As an attempt to overcoming the pitfalls undermining parallel programming, this paper proposes a pattern-based, formally grounded tool that eases writing parallel code by automat...

Descripción completa

Guardado en:
Detalles Bibliográficos
Publicado: 2017
Materias:
Acceso en línea:https://bibliotecadigital.exactas.uba.ar/collection/paper/document/paper_14332779_v_n_p1_Perez
http://hdl.handle.net/20.500.12110/paper_14332779_v_n_p1_Perez
Aporte de:
id paper:paper_14332779_v_n_p1_Perez
record_format dspace
spelling paper:paper_14332779_v_n_p1_Perez2025-07-30T18:50:05Z Formal specification and implementation of an automated pattern-based parallel-code generation framework Automated code generation Formal methods Parallel programming Software design patterns Codes (symbols) Computer architecture Computer programming Concretes Cost effectiveness Formal methods Formal specification Parallel programming Program translators Semantics Software design Specifications Automated code generation C++ template library Experimental evaluation Parallel implementations Platform independent Software design patterns Source-to-source compilation Technical contribution C++ (programming language) Programming correct parallel software in a cost-effective way is a challenging task requiring a high degree of expertise. As an attempt to overcoming the pitfalls undermining parallel programming, this paper proposes a pattern-based, formally grounded tool that eases writing parallel code by automatically generating platform-dependent programs from high-level, platform-independent specifications. The tool builds on three pillars: (1) a platform-agnostic parallel programming pattern, called PCR, (2) a formal translation of PCRs into a parallel execution model, namely Concurrent Collections (CnC), and (3) a program rewriting engine that generates code for a concrete runtime implementing CnC. The experimental evaluation carried out gives evidence that code produced from PCRs can deliver performance metrics which are comparable with handwritten code but with assured correctness. The technical contribution of this paper is threefold. First, it discusses a parallel programming pattern, called PCR, consisting of producers, consumers, and reducers which operate concurrently on data sets. To favor correctness, the semantics of PCRs is mathematically defined in terms of the formalism FXML. PCRs are shown to be composable and to seamlessly subsume other well-known parallel programming patterns, thus providing a framework for heterogeneous designs. Second, it formally shows how the PCR pattern can be correctly implemented in terms of a more concrete parallel execution model. Third, it proposes a platform-agnostic C++ template library to express PCRs. It presents a prototype source-to-source compilation tool, based on C++ template rewriting, which automatically generates parallel implementations relying on the Intel CnCC++ library. © 2017 Springer-Verlag GmbH Germany 2017 https://bibliotecadigital.exactas.uba.ar/collection/paper/document/paper_14332779_v_n_p1_Perez http://hdl.handle.net/20.500.12110/paper_14332779_v_n_p1_Perez
institution Universidad de Buenos Aires
institution_str I-28
repository_str R-134
collection Biblioteca Digital - Facultad de Ciencias Exactas y Naturales (UBA)
topic Automated code generation
Formal methods
Parallel programming
Software design patterns
Codes (symbols)
Computer architecture
Computer programming
Concretes
Cost effectiveness
Formal methods
Formal specification
Parallel programming
Program translators
Semantics
Software design
Specifications
Automated code generation
C++ template library
Experimental evaluation
Parallel implementations
Platform independent
Software design patterns
Source-to-source compilation
Technical contribution
C++ (programming language)
spellingShingle Automated code generation
Formal methods
Parallel programming
Software design patterns
Codes (symbols)
Computer architecture
Computer programming
Concretes
Cost effectiveness
Formal methods
Formal specification
Parallel programming
Program translators
Semantics
Software design
Specifications
Automated code generation
C++ template library
Experimental evaluation
Parallel implementations
Platform independent
Software design patterns
Source-to-source compilation
Technical contribution
C++ (programming language)
Formal specification and implementation of an automated pattern-based parallel-code generation framework
topic_facet Automated code generation
Formal methods
Parallel programming
Software design patterns
Codes (symbols)
Computer architecture
Computer programming
Concretes
Cost effectiveness
Formal methods
Formal specification
Parallel programming
Program translators
Semantics
Software design
Specifications
Automated code generation
C++ template library
Experimental evaluation
Parallel implementations
Platform independent
Software design patterns
Source-to-source compilation
Technical contribution
C++ (programming language)
description Programming correct parallel software in a cost-effective way is a challenging task requiring a high degree of expertise. As an attempt to overcoming the pitfalls undermining parallel programming, this paper proposes a pattern-based, formally grounded tool that eases writing parallel code by automatically generating platform-dependent programs from high-level, platform-independent specifications. The tool builds on three pillars: (1) a platform-agnostic parallel programming pattern, called PCR, (2) a formal translation of PCRs into a parallel execution model, namely Concurrent Collections (CnC), and (3) a program rewriting engine that generates code for a concrete runtime implementing CnC. The experimental evaluation carried out gives evidence that code produced from PCRs can deliver performance metrics which are comparable with handwritten code but with assured correctness. The technical contribution of this paper is threefold. First, it discusses a parallel programming pattern, called PCR, consisting of producers, consumers, and reducers which operate concurrently on data sets. To favor correctness, the semantics of PCRs is mathematically defined in terms of the formalism FXML. PCRs are shown to be composable and to seamlessly subsume other well-known parallel programming patterns, thus providing a framework for heterogeneous designs. Second, it formally shows how the PCR pattern can be correctly implemented in terms of a more concrete parallel execution model. Third, it proposes a platform-agnostic C++ template library to express PCRs. It presents a prototype source-to-source compilation tool, based on C++ template rewriting, which automatically generates parallel implementations relying on the Intel CnCC++ library. © 2017 Springer-Verlag GmbH Germany
title Formal specification and implementation of an automated pattern-based parallel-code generation framework
title_short Formal specification and implementation of an automated pattern-based parallel-code generation framework
title_full Formal specification and implementation of an automated pattern-based parallel-code generation framework
title_fullStr Formal specification and implementation of an automated pattern-based parallel-code generation framework
title_full_unstemmed Formal specification and implementation of an automated pattern-based parallel-code generation framework
title_sort formal specification and implementation of an automated pattern-based parallel-code generation framework
publishDate 2017
url https://bibliotecadigital.exactas.uba.ar/collection/paper/document/paper_14332779_v_n_p1_Perez
http://hdl.handle.net/20.500.12110/paper_14332779_v_n_p1_Perez
_version_ 1840324258935341056