In this paper we investigate the relationship between template metaprogramming and implicit complexity, defining a recursive metalanguage by means of C++ templates; we show that the language captures the set of polynomial-time computable functions, that is, functions computable by a Turing machine in which the number of moves - the time complexity - is bounded by a polynomial. We also show that our approach can be extended to recursion schemes that are more general than those used in ICC; this implies that we are able to capture more natural algorithms.

C++ Template Metaprogramming and Polynomial-Time Functions

Emanuele Covino
;
Giovanni Pani
2020-01-01

Abstract

In this paper we investigate the relationship between template metaprogramming and implicit complexity, defining a recursive metalanguage by means of C++ templates; we show that the language captures the set of polynomial-time computable functions, that is, functions computable by a Turing machine in which the number of moves - the time complexity - is bounded by a polynomial. We also show that our approach can be extended to recursion schemes that are more general than those used in ICC; this implies that we are able to capture more natural algorithms.
2020
978-84-09-17945-9
File in questo prodotto:
File Dimensione Formato  
ACSER 2019.pdf

accesso aperto

Tipologia: Documento in Pre-print
Licenza: Creative commons
Dimensione 694.49 kB
Formato Adobe PDF
694.49 kB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11586/237052
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact