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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

will denote <strong>the</strong> proposition ¬(v = w). We will sometimes use <strong>the</strong> convenientnot<strong>at</strong>ion a ⊲⊳ 1 b ⊲⊳ 2 c to denote <strong>the</strong> conjunction a ⊲⊳ 1 b ∧ b ⊲⊳ 2 c and wewill not distinguish conjunctions <strong>of</strong> propositions from sets <strong>of</strong> propositions. Thesame not<strong>at</strong>ion applies to vectors defined over o<strong>the</strong>r numeric fields and, for <strong>the</strong>supported oper<strong>at</strong>ions, to vectors defined over numeric sets such as N and Q + .First-Order Logic. Let L be a first-order language with variables in X. We willroutinely confuse a tuple <strong>of</strong> variables with <strong>the</strong> set <strong>of</strong> its components. So, if φ isan L-formula, we will write φ[¯x] to denote φ itself, yet emphasizing th<strong>at</strong> <strong>the</strong> set<strong>of</strong> free variables in φ is included in ¯x. Let ¯x, ȳ ∈ X ∗ be <strong>of</strong> <strong>the</strong> same length andlet φ be a L-formula: <strong>the</strong>n φ[ȳ/¯x] denotes <strong>the</strong> formula obtained by simultaneousrenaming <strong>of</strong> each free occurrence in φ <strong>of</strong> a variable in ¯x with <strong>the</strong> correspondingvariable in ȳ, possibly renaming bound variable occurrences as needed to avoidvariable capture. A formula with no free variable occurrences is termed closedor called a sentence. The universal closure <strong>of</strong> a formula φ is denoted by ∀(φ). Ifφ is a closed L-formula and A is an L-structure, we write A |= φ if φ is s<strong>at</strong>isfiedin A. A set T <strong>of</strong> closed L-formulas is called an L-<strong>the</strong>ory. We write A |= T ifA |= φ for each φ ∈ T . If φ is a closed L-formula and T is an L-<strong>the</strong>ory, we writeT |= φ if, for each L-structure A, A |= T implies A |= φ. In this case we sayth<strong>at</strong> φ is a logical consequence <strong>of</strong> T .3. Termin<strong>at</strong>ion Analysis <strong>of</strong> Individual LoopswhereWe will start by restricting our <strong>at</strong>tention to individual loops <strong>of</strong> <strong>the</strong> form{ I } while B do C (2)• I is a loop invariant th<strong>at</strong> a previous analysis phase has determined to holdjust before any evalu<strong>at</strong>ion <strong>of</strong> B;• B is a Boolean guard expressing <strong>the</strong> condition on <strong>the</strong> st<strong>at</strong>e upon whichiter<strong>at</strong>ion continues;• C is a command th<strong>at</strong>, in <strong>the</strong> context set by (2), is known to always termin<strong>at</strong>e.Notice th<strong>at</strong>, for maximum generality, we do not impose any syntactic restrictionon I, B and C and will only observe <strong>the</strong>ir interaction with <strong>the</strong> program st<strong>at</strong>e: Iand B express conditions on <strong>the</strong> st<strong>at</strong>e, and C is seen as a st<strong>at</strong>e transformer, th<strong>at</strong>is, a condition constraining <strong>the</strong> program st<strong>at</strong>es th<strong>at</strong> correspond to its initial andfinal st<strong>at</strong>es. We assume th<strong>at</strong> such conditions are expressed in a fragment <strong>of</strong> somefirst-order language L th<strong>at</strong> is closed under finite conjunction and implic<strong>at</strong>ion(indeed a limited form <strong>of</strong> implic<strong>at</strong>ion is <strong>of</strong>ten enough). We assume fur<strong>the</strong>r th<strong>at</strong><strong>the</strong> meaning <strong>of</strong> <strong>the</strong> sentences in L is given by some <strong>the</strong>ory T for which we aregiven a sound inference procedure denoted by ‘⊢’, th<strong>at</strong> is, for each sentenceφ ∈ L, if T ⊢ φ <strong>the</strong>n T |= φ. Finally, we fix an L-structure D such th<strong>at</strong> D |= T ,6

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

Saved successfully!

Ooh no, something went wrong!