Author:
Hu Qinheping,Cyphert John,D’Antoni Loris,Reps Thomas
Abstract
AbstractWe present a method for synthesizing recursive functions that satisfy both a functional specification and an asymptotic resource bound. Prior methods for synthesis with a resource metric require the user to specify a concrete expression exactly describing resource usage, whereas our method uses big-O notation to specify the asymptotic resource usage. Our method can synthesize programs with complex resource bounds, such as a sort function that has complexity $$O(n\log (n))$$
O
(
n
log
(
n
)
)
.Our synthesis procedure uses a type system that is able to assign an asymptotic complexity to terms, and can track recurrence relations of functions. These typing rules are justified by theorems used in analysis of algorithms, such as the Master Theorem and the Akra-Bazzi method. We implemented our method as an extension of prior type-based synthesis work. Our tool, SynPlexity, was able to synthesize complex divide-and-conquer programs that cannot be synthesized by prior solvers.
Publisher
Springer International Publishing
Reference20 articles.
1. Akra, M., Bazzi, L.: On the solution of linear recurrence equations. Comput. Optim. Appl. 10, 195–210 (1998)
2. Albert, E., Arenas, P., Genaim, S., Puebla, Germán, P.: Closed-form upper bounds in static cost analysis. J. Autom. Reasoning 46, 161–203 (2011) https://doi.org/10.1007/s10817-010-9174-1
3. Bentley, J.L., Haken, D., Saxe, J.B.: A general method for solving divide-and-conquer recurrences. ACM SIGACT News 12(3), 36–44 (1980)
4. Breck, J., Cyphert, J., Kincaid, Z., Reps, T.: Templates and recurrences: better together. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI (2020)
5. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3nd edn. The MIT Press, Cambridge (2009)
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Superfusion: Eliminating Intermediate Data Structures via Inductive Synthesis;Proceedings of the ACM on Programming Languages;2024-06-20
2. A Case for Synthesis of Recursive Quantum Unitary Programs;Proceedings of the ACM on Programming Languages;2024-01-05
3. Synthesizing Efficient Memoization Algorithms;Proceedings of the ACM on Programming Languages;2023-10-16