Read/write factorizable programs
Publikation: Bidrag til tidsskrift › Tidsskriftartikel › Forskning › fagfællebedømt
Standard
Read/write factorizable programs. / Bhaskar, Siddharth; Simonsen, Jakob Grue.
I: Journal of Functional Programming, Bind 33, Nr. 4, e5, 08.06.2023, s. 1-50.Publikation: Bidrag til tidsskrift › Tidsskriftartikel › Forskning › fagfællebedømt
Harvard
APA
Vancouver
Author
Bibtex
}
RIS
TY - JOUR
T1 - Read/write factorizable programs
AU - Bhaskar, Siddharth
AU - Simonsen, Jakob Grue
N1 - Publisher Copyright: © The Author(s), 2023. Published by Cambridge University Press.
PY - 2023/6/8
Y1 - 2023/6/8
N2 - In the cons-free programming paradigm, we eschew constructors and program using only destructors. Cons-free programs in a simple first-order language with string data capture exactly P, the class of polynomial-time relations. By varying the underlying language and considering other data types, we can capture several other complexity classes. However, no cons-free programming language captures any functional complexity class for fundamental reasons. In this paper, we cleanly extend the cons-free paradigm to encompass functional complexity classes. Namely, we introduce programs with data that can either only be destructed or only be constructed, which we enforce by a type system on the program variables. We call the resulting programs read/write- (or RW-)factorizable, show that RW-factorizable string programs capture exactly the class FP of polynomial-time functions, and that tail-recursive RW-factorizable programs capture exactly the class FL of logarithmic-space functions. Finally, we state and solve the nontrivial problem of syntactic composition of two RW-factorizable programs.
AB - In the cons-free programming paradigm, we eschew constructors and program using only destructors. Cons-free programs in a simple first-order language with string data capture exactly P, the class of polynomial-time relations. By varying the underlying language and considering other data types, we can capture several other complexity classes. However, no cons-free programming language captures any functional complexity class for fundamental reasons. In this paper, we cleanly extend the cons-free paradigm to encompass functional complexity classes. Namely, we introduce programs with data that can either only be destructed or only be constructed, which we enforce by a type system on the program variables. We call the resulting programs read/write- (or RW-)factorizable, show that RW-factorizable string programs capture exactly the class FP of polynomial-time functions, and that tail-recursive RW-factorizable programs capture exactly the class FL of logarithmic-space functions. Finally, we state and solve the nontrivial problem of syntactic composition of two RW-factorizable programs.
U2 - 10.1017/S0956796823000023
DO - 10.1017/S0956796823000023
M3 - Journal article
AN - SCOPUS:85162221031
VL - 33
SP - 1
EP - 50
JO - Journal of Functional Programming
JF - Journal of Functional Programming
SN - 0956-7968
IS - 4
M1 - e5
ER -
ID: 371657334