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.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.


