Bounding the Computational Complexity of Flowchart Programs with Multi-dimensional Rankings

نویسندگان

  • Christophe Alias
  • Laure Gonnord
  • Alain Darte
  • Paul Feautrier
چکیده

Proving the termination of a flowchart program can be done by exhibiting a ranking function, i.e., a function from the program states to a well-founded set, which strictly decreases at each program step. A standard method to automatically generate such a function is to compute invariants for each program point and to search for a ranking in a restricted class of functions that can be handled with linear programming techniques. Previous algorithms based on affine rankings either are applicable only to simple loops (i.e., single-node flowcharts) and rely on enumeration, or are not complete in the sense that they are not guaranteed to find a ranking in the class of functions they consider, if one exists. Our first contribution is to propose an efficient algorithm to compute ranking functions: It can handle flowcharts of arbitrary structure, the class of candidate rankings it explores is larger, and our method, although greedy, is provably complete. Our second contribution is to show how to use the ranking functions we generate to get upper bounds for the computational complexity (number of transitions) of the source program, again for flowcharts of arbitrary structure. This estimate is a polynomial, which means that we can handle programs with more than linear complexity. We applied the method on a collection of test cases from the literature. We also point out important extensions, mainly to do with the scalability of the algorithm and, in particular, the integration of techniques based on cutpoints. Key-words: static analysis, termination proof, multidimensional affine ranking functions, worst-case time complexity estimation ∗ INRIA Researcher † CNRS Researcher ‡ Professor at ENS Lyon § Research Assistant at Lille University in ria -0 04 64 35 6, v er si on 1 16 M ar 2 01 0 Estimation automatique de la complexité au pire avec des fonctions de terminaison multidimensionnelles Résumé : On peut prouver la terminaison d’un programme en exhibant une fonction de ranking, i.e., une application des états du programme vers un ensemble bien fondé, qui décroit strictement à chaque étape du calcul. Une méthode standard pour générer une telle fonction est de calculer les invariants pour chaque point du programme et de chercher dans une classe de fonctions restreinte en utilisant des techniques de programmation linéaire. Les approches précédentes sont soit applicables uniquement à des boucles simples et utilisent de l’enumération, ou bien ne sont pas complètes dans le sens où il n’est pas garanti qu’elles trouvent une fonction de ranking quand elle existe dans la classe considérée. Notre première contribution est un algorithme efficace pour calculer une fonction de ranking. Les graphes de flot de contrôle arbitraires sont traités, la classe de fonctions de ranking gérée est plus grande et notre méthode, bien que gloutonne, est complète. Notre seconde contribution est de montrer comment calculer une borne supérieure sur la complexité en temps de l’algorithme (nombre de transitions franchies) à partir d’une fonction de ranking. Le résultat est une fonction polynomiale par morceaux, ce qui signifie que nous pouvons traiter des programmes avec une complexité plus que linéaire. La méthode a été appliquée avec succès sur une collection d’exemples de la littérature. Nous montrons aussi plusieurs extensions importantes de l’algorithme permettant de traiter des exemples de grande taille. Mots-clés : analyse statique, preuve de terminaison, génération de fonctions de terminaison multidimensionnelles affines, estimation de la complexité au pire in ria -0 04 64 35 6, v er si on 1 16 M ar 2 01 0 Program Termination and Computational Complexity 3

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs

Proving the termination of a flowchart program can be done by exhibiting a ranking function, i.e., a function from the program states to a wellfounded set, which strictly decreases at each program step. A standard method to automatically generate such a function is to compute invariants for each program point and to search for a ranking in a restricted class of functions that can be handled wit...

متن کامل

Program Termination and Worst Time Complexity with Multi-Dimensional Affine Ranking Functions

A standard method for proving the termination of a flowchart program is to exhibit a ranking function, i.e., a function from the program states to a well-founded set, which strictly decreases at each program step. Our main contribution is to give an efficient algorithm for the automatic generation of multi-dimensional affine nonnegative ranking functions, a restricted class of ranking functions...

متن کامل

Search Based Weighted Multi-Bit Flipping Algorithm for High-Performance Low-Complexity Decoding of LDPC Codes

In this paper, two new hybrid algorithms are proposed for decoding Low Density Parity Check (LDPC) codes. Original version of the proposed algorithms named Search Based Weighted Multi Bit Flipping (SWMBF). The main idea of these algorithms is flipping variable multi bits in each iteration, change in which leads to the syndrome vector with least hamming weight. To achieve this, the proposed algo...

متن کامل

Search Based Weighted Multi-Bit Flipping Algorithm for High-Performance Low-Complexity Decoding of LDPC Codes

In this paper, two new hybrid algorithms are proposed for decoding Low Density Parity Check (LDPC) codes. Original version of the proposed algorithms named Search Based Weighted Multi Bit Flipping (SWMBF). The main idea of these algorithms is flipping variable multi bits in each iteration, change in which leads to the syndrome vector with least hamming weight. To achieve this, the proposed algo...

متن کامل

A Fall Detection System based on the Type II Fuzzy Logic and Multi-Objective PSO Algorithm

The Elderly health is an important and noticeable issue; since these people are priceless resources of experience in the society. Elderly adults are more likely to be severely injured or to die following falls. Hence, fast detection of such incidents may even lead to saving the life of the injured person. Several techniques have been proposed lately for the fall detection of people, mostly cate...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010