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.

Table 3: Precision results and applic<strong>at</strong>ion to conditional termin<strong>at</strong>ionbenchmark loops term w/ d.f. w/o d.f.CaffeineMark 151 149 0 2JLex 467 453 3 11JavaCC 136 120 4 12Java_CUP 29 27 0 2Jess 151 149 0 2Kitten 1484 1454 3 27NQueens 359 271 4 84Raytracer 8 6 0 2Termin<strong>at</strong>ion 121 119 0 2not (column ‘w/o d.f.’). It can be seen th<strong>at</strong> <strong>the</strong> percentage <strong>of</strong> loops for whichtermin<strong>at</strong>ion is decided positively ranges from 75% to 99%, depending on <strong>the</strong>benchmark. This means th<strong>at</strong> we are conducting <strong>the</strong> experimental evalu<strong>at</strong>ionwith a termin<strong>at</strong>ion analyzer, Julia, whose analysis algorithms —though certainlyimprovable— very <strong>of</strong>ten provide enough inform<strong>at</strong>ion for termin<strong>at</strong>ion analysis.This is crucial for <strong>the</strong> meaningfulness <strong>of</strong> <strong>the</strong> experimental evalu<strong>at</strong>ion presentedin this section.8. Conclusions<strong>Linear</strong> ranking functions play a crucial role in termin<strong>at</strong>ion analysis, as <strong>the</strong>termin<strong>at</strong>ion <strong>of</strong> many programs can be decided by <strong>the</strong> existence on one suchfunction. In this paper we have addressed <strong>the</strong> topic <strong>of</strong> <strong>the</strong> autom<strong>at</strong>ic syn<strong>the</strong>sis<strong>of</strong> linear ranking functions with <strong>the</strong> aim <strong>of</strong> clarifying its origins, thoroughlyexplaining <strong>the</strong> underlying <strong>the</strong>ory, and presenting new, efficient implement<strong>at</strong>ionsth<strong>at</strong> are being made available to <strong>the</strong> general public.In particular, we have introduced, in general terms independent from anyprogramming paradigm, <strong>the</strong> problem <strong>of</strong> autom<strong>at</strong>ic termin<strong>at</strong>ion analysis <strong>of</strong> individualloops —to which more general control flows can be reconducted— andits solution technique based on <strong>the</strong> syn<strong>the</strong>sis <strong>of</strong> ranking functions.We have <strong>the</strong>n presented and generalized a technique originally due to Sohnand Van Gelder, th<strong>at</strong> was virtually unknown outside <strong>the</strong> logic programming fielddespite its general applicability and its rel<strong>at</strong>ive completeness (given a linearconstraint system approxim<strong>at</strong>ing <strong>the</strong> behavior <strong>of</strong> a loop, if a linear rankingfunction exists for th<strong>at</strong> system, <strong>the</strong>n <strong>the</strong> method will find it). This method, dueto its ability to characterize <strong>the</strong> spaces <strong>of</strong> all <strong>the</strong> linear decreasing functions andall <strong>the</strong> linear bounded functions, is also immedi<strong>at</strong>ely applicable to conditionaltermin<strong>at</strong>ion analysis; this <strong>the</strong>me is an excellent candid<strong>at</strong>e for future work.We have also presented and, for <strong>the</strong> first time, fully justified, a more recenttechnique by Podelski and Rybalchenko. For this we also present an altern<strong>at</strong>iveformul<strong>at</strong>ion th<strong>at</strong> can lead to efficiency improvements.32

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

Saved successfully!

Ooh no, something went wrong!