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.

1. a Boolean termin<strong>at</strong>ion test;2. a Boolean termin<strong>at</strong>ion test th<strong>at</strong>, in addition, returns <strong>the</strong> coefficients <strong>of</strong>one (not fur<strong>the</strong>r specified) affine ranking function;3. a function returning a convex polyhedron th<strong>at</strong> encodes <strong>the</strong> space <strong>of</strong> allaffine ranking functions.In addition, using <strong>the</strong> MS method and for each input method, <strong>the</strong> PPL provides4. a function returning two convex polyhedra th<strong>at</strong> encode <strong>the</strong> space <strong>of</strong> all decreasingfunctions (also known as quasi-ranking functions) and all boundedfunctions, respectively, for use in conditional termin<strong>at</strong>ion analysis.We have evalu<strong>at</strong>ed <strong>the</strong> performance <strong>of</strong> <strong>the</strong> new algorithms implemented in<strong>the</strong> PPL using <strong>the</strong> termin<strong>at</strong>ion analyzer built into Julia, a st<strong>at</strong>e-<strong>of</strong>-<strong>the</strong>-art analyzerfor Java bytecode [41]. We have thus taken several Java programs in <strong>the</strong>Julia test suite and, using Julia, we have extracted <strong>the</strong> constraint systems th<strong>at</strong>characterize <strong>the</strong> loops in <strong>the</strong> program th<strong>at</strong> Julia cannot quickly resolve withsyntax-based heuristics. This extraction phase allowed us to measure <strong>the</strong> performance<strong>of</strong> <strong>the</strong> methods described in <strong>the</strong> present paper, factoring out <strong>the</strong> timespent by Julia in all <strong>the</strong> analyses (nullness, sharing, p<strong>at</strong>h-length, unfolding, . . . )th<strong>at</strong> allow to obtain such constraint systems.We first tested <strong>the</strong> performance (and correctness) <strong>of</strong> <strong>the</strong> new PPL implement<strong>at</strong>ionwith <strong>the</strong> implement<strong>at</strong>ion <strong>of</strong> <strong>the</strong> MS method, based on CLP(Q), previouslyused by Julia and with <strong>the</strong> implement<strong>at</strong>ion <strong>of</strong> PR, still based on CLP(Q), providedby <strong>the</strong> demo version <strong>of</strong> RankFinder. The reason we did this comparisonis th<strong>at</strong>, while we know th<strong>at</strong> <strong>the</strong> infinite precision implement<strong>at</strong>ion <strong>of</strong> <strong>the</strong> simplexalgorithm available in <strong>the</strong> PPL performs better than its direct competitors [6,Section 4, Table 3], 17 we know <strong>the</strong>re is much room for improvement: it couldhave been <strong>the</strong> case th<strong>at</strong> <strong>the</strong> constraint solver employed in modern CLP systemsmade our implement<strong>at</strong>ion useless. The result was quite s<strong>at</strong>isfactory: <strong>the</strong> PPLimplement<strong>at</strong>ion is one to two orders <strong>of</strong> magnitude faster over <strong>the</strong> consideredbenchmark suite.The benchmark programs are: CaffeineMark, from Pendragon S<strong>of</strong>twareCorpor<strong>at</strong>ion, measures <strong>the</strong> speed <strong>of</strong> Java; JLex is a lexical analyzer gener<strong>at</strong>ordeveloped by Elliot Berk and C. Scott Ananian; JavaCC is a parser gener<strong>at</strong>orfrom Sun Microsystems; Java_CUP is a parser gener<strong>at</strong>or developed by ScottHudson, Frank Flannery and C. Scott Ananian; Jess is a rule engine writtenby Ernest Friedman-Hill; Kitten is a didactic compiler for a simple imper<strong>at</strong>iveobject-oriented language written by Fausto Spoto; NQueens is a solver <strong>of</strong><strong>the</strong> n-queens problem which includes a library for binary decision diagrams;Raytracer is a ray-tracing program; Termin<strong>at</strong>ion is a JAR file containing all17 I.e., Cassowary (http://www.cs.washington.edu/research/constraints/cassowary/)and Wallaroo (http://sourceforge.net/projects/wallaroo/). While GLPK, <strong>the</strong> GNU <strong>Linear</strong>Programming Toolkit (http://www.gnu.org/s<strong>of</strong>tware/glpk/) includes a solver th<strong>at</strong> istermed “exact,” it still depends critically on flo<strong>at</strong>ing point comput<strong>at</strong>ions; moreover, it has notyet been made available in <strong>the</strong> public interface.30

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

Saved successfully!

Ooh no, something went wrong!