10.07.2015 Views

A New Look at the Automatic Synthesis of Linear Ranking Functions$

A New Look at the Automatic Synthesis of Linear Ranking Functions$

A New Look at the Automatic Synthesis of Linear Ranking Functions$

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2. Worst-Case Complexity Using <strong>the</strong> Simplex AlgorithmThe comput<strong>at</strong>ionally most expensive component in both methods is <strong>the</strong> resolution<strong>of</strong> a linear optimiz<strong>at</strong>ion problem th<strong>at</strong> can always be expressed in <strong>the</strong>standard formminimize c T xsubject toAx = bx ≥ 0by applying well known transform<strong>at</strong>ions: inequalities and unconstrained (i.e.,not subject to lower or upper bounds) variables can be replaced and <strong>the</strong> resultingequivalent problem in standard form has one more variable for each inequalityor unconstrained variable appearing in <strong>the</strong> original problem.The most common way to solve this linear optimiz<strong>at</strong>ion problems involvesusing <strong>the</strong> simplex algorithm [33], an iter<strong>at</strong>ive algorithm th<strong>at</strong> requires ( )e+uepivoting steps in <strong>the</strong> worst-case scenario, where e and u denote <strong>the</strong> number <strong>of</strong>equalities in A and unknowns in x respectively.For a simple linear loop <strong>of</strong> m inequalities over n variables, Podelski and Rybalchenkorequire to solve a linear problem in standard form having 3n equalitiesover 2m variables (<strong>the</strong> opposite <strong>of</strong> <strong>the</strong> expression appearing in (27d) canbe ( used as <strong>the</strong> quantity to be minimized); this gives a worst-case complexity <strong>of</strong>3n+2m)3n pivoting steps, corresponding, by Stirling’s formula, to an exponentialcomplexity <strong>of</strong> exponent 3n + 2m approxim<strong>at</strong>ely.If <strong>the</strong> altern<strong>at</strong>ive formaliz<strong>at</strong>ion <strong>of</strong> <strong>the</strong> Podelski and Rybalchenko methodis adopted for <strong>the</strong> same loop, <strong>the</strong>n we will have <strong>the</strong> same m constraints asabove for <strong>the</strong> ‘⋆’ invariant, while <strong>the</strong> ‘’ invariant will be described by o<strong>the</strong>r lconstraints. If redundant constraints are removed, we will have l ≤ m. Hence,<strong>the</strong> altern<strong>at</strong>ive approach will result in a linear programming problem having 2nequalities over m + 2l variables. Hence, <strong>the</strong> worst-case number <strong>of</strong> pivoting stepswill be an exponential <strong>of</strong> exponent approxim<strong>at</strong>ely 2n + m + 2l.For <strong>the</strong> same simple linear loop, Serebrenik and Mesnard require <strong>the</strong> resolution<strong>of</strong> two linear problems, th<strong>at</strong> can be rewritten to contain 2n equalitiesover m + n variables (with n unconstrained variables) and 2n + 1 equalities over(m + 2) + (n + 1) variables (with n + 1 unconstrained variables), respectively.They can <strong>the</strong>n be merged to gener<strong>at</strong>e a single linear problem <strong>of</strong> 4n + 1 equalitiesover m + (m + 2) + (n + 1) variables, n + 1 <strong>of</strong> which unconstrained, andan extra inequality replacing one <strong>of</strong> <strong>the</strong> two objective functions. In <strong>the</strong> end, weget a linear problem in standard form with 4n + 2 equalities over 2m + 2n + 5variables. This means a worst-case complexity <strong>of</strong> ( )6n+2m+74n+2 pivoting steps andan exponential complexity <strong>of</strong> exponent 6n + 2m approxim<strong>at</strong>ely.So <strong>the</strong> method proposed by Podelski and Rybalchenko has, in general, alower worst-case complexity than <strong>the</strong> one proposed by Mesnard and Serebrenik,if <strong>the</strong> single linear problem approach is chosen. The comparison <strong>of</strong> <strong>the</strong> two altern<strong>at</strong>iveimplement<strong>at</strong>ion approaches for <strong>the</strong> Podelski and Rybalchenko methoddepends on <strong>the</strong> rel<strong>at</strong>ions between quantities n, m and l. On <strong>the</strong> one hand, if lis significantly smaller than m, <strong>the</strong>n <strong>the</strong> altern<strong>at</strong>ive approach could result in anefficiency improvement. On <strong>the</strong> o<strong>the</strong>r hand, if <strong>the</strong> number <strong>of</strong> constraints is much28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!