Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate

We present a new method for inferring complexity properties for a class of programs in the form of flowcharts annotated with loop information. Specifically, our method can (soundly and completely) decide if computed values are polynomially bounded as a function of the input; and similarly for the ru...

Full description

Bibliographic Details
Main Authors: Amir M. Ben-Amram, Aviad Pineles
Format: Article
Language:English
Published: Open Publishing Association 2016-07-01
Series:Electronic Proceedings in Theoretical Computer Science
Online Access:http://arxiv.org/pdf/1410.4011v5
id doaj-ef0f00490652425d9f7df3d862b5f9a0
record_format Article
spelling doaj-ef0f00490652425d9f7df3d862b5f9a02020-11-24T23:30:22ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802016-07-01216Proc. VPT 2016244910.4204/EPTCS.216.2:1Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-RateAmir M. Ben-AmramAviad PinelesWe present a new method for inferring complexity properties for a class of programs in the form of flowcharts annotated with loop information. Specifically, our method can (soundly and completely) decide if computed values are polynomially bounded as a function of the input; and similarly for the running time. Such complexity properties are undecidable for a Turing-complete programming language, and a common work-around in program analysis is to settle for sound but incomplete solutions. In contrast, we consider a class of programs that is Turing-incomplete, but strong enough to include several challenges for this kind of analysis. For a related language that has well-structured syntax, similar to Meyer and Ritchie's LOOP programs, the problem has been previously proved to be decidable. The analysis relied on the compositionality of programs, hence the challenge in obtaining similar results for flowchart programs with arbitrary control-flow graphs. Our answer to the challenge is twofold: first, we propose a class of loop-annotated flowcharts, which is more general than the class of flowcharts that directly represent structured programs; secondly, we present a technique to reuse the ideas from the work on tructured programs and apply them to such flowcharts. The technique is inspired by the classic translation of non-deterministic automata to regular expressions, but we obviate the exponential cost of constructing such an expression, obtaining a polynomial-time analysis. These ideas may well be applicable to other analysis problems.http://arxiv.org/pdf/1410.4011v5
collection DOAJ
language English
format Article
sources DOAJ
author Amir M. Ben-Amram
Aviad Pineles
spellingShingle Amir M. Ben-Amram
Aviad Pineles
Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate
Electronic Proceedings in Theoretical Computer Science
author_facet Amir M. Ben-Amram
Aviad Pineles
author_sort Amir M. Ben-Amram
title Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate
title_short Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate
title_full Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate
title_fullStr Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate
title_full_unstemmed Flowchart Programs, Regular Expressions, and Decidability of Polynomial Growth-Rate
title_sort flowchart programs, regular expressions, and decidability of polynomial growth-rate
publisher Open Publishing Association
series Electronic Proceedings in Theoretical Computer Science
issn 2075-2180
publishDate 2016-07-01
description We present a new method for inferring complexity properties for a class of programs in the form of flowcharts annotated with loop information. Specifically, our method can (soundly and completely) decide if computed values are polynomially bounded as a function of the input; and similarly for the running time. Such complexity properties are undecidable for a Turing-complete programming language, and a common work-around in program analysis is to settle for sound but incomplete solutions. In contrast, we consider a class of programs that is Turing-incomplete, but strong enough to include several challenges for this kind of analysis. For a related language that has well-structured syntax, similar to Meyer and Ritchie's LOOP programs, the problem has been previously proved to be decidable. The analysis relied on the compositionality of programs, hence the challenge in obtaining similar results for flowchart programs with arbitrary control-flow graphs. Our answer to the challenge is twofold: first, we propose a class of loop-annotated flowcharts, which is more general than the class of flowcharts that directly represent structured programs; secondly, we present a technique to reuse the ideas from the work on tructured programs and apply them to such flowcharts. The technique is inspired by the classic translation of non-deterministic automata to regular expressions, but we obviate the exponential cost of constructing such an expression, obtaining a polynomial-time analysis. These ideas may well be applicable to other analysis problems.
url http://arxiv.org/pdf/1410.4011v5
work_keys_str_mv AT amirmbenamram flowchartprogramsregularexpressionsanddecidabilityofpolynomialgrowthrate
AT aviadpineles flowchartprogramsregularexpressionsanddecidabilityofpolynomialgrowthrate
_version_ 1725541495956570112