A precise analysis - PowerPoint PPT Presentation

About This Presentation
Title:

A precise analysis

Description:

A precise analysis. Determinism, soundness, completeness for. Determinism for ... Pls analysis Catriel Beeri. 4. A characterization (if & only if ) of ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 18
Provided by: off9
Category:
Tags: analysis | precise

less

Transcript and Presenter's Notes

Title: A precise analysis


1
A precise analysis
  • Determinism, soundness, completeness for
  • Determinism for
  • Additional properties of
  • Comparisons

2
  • Analysis for with errors
  • Observation
  • (determinism for ? for
    )
  • Theme
  • Prove by induction on length of selected path
  • For the proof, we need some concepts and results

3
  • Applicability of rules
  • A rule r is applicable (????) to E, if there is a
    proof tree for E?E, with r associated with the
    root.
  • A group of rules is applicable to E if one of
    them is applicable

Why is it an interesting concept?
Note it is a semantic concept!
4
  • A characterization (if only if ) of
    applicability
  • for an application expression E1 E2
  • For you Similar characterization for if,
    tuple

5
  • Q Are the conditions mutually exclusive?
  • Q Have we proved determinism?
  • Q Have we proved completeness?
  • A we still depend on a semantic condition of
    having a transition

6
  • A reformulation (with some redundancy) of the
    (iff ) characterization of applicability (for E1
    E2)

7
  • By removing the transition condition
  • ? mutually exclusive, syntactic, only if
    conditions
  • But, it is still possible that two rules in a
    group are applicable,
  • Or a rule generates more than one transition

8
  • Corollary (Inversion)
  • If E has a transition, then
  • Its primary construct
  • value tests for (some) direct sub-expressions
  • determine the sub-expression of E that has a
    transition
  • why inversion ?

9
  • Observations
  • Knowing primary construct of E ? all rules not
    for Es expression kind are excluded
  • Value tests on (some) direct sub-expressions ?
    more rules excluded
  • rules not excluded are potentially applicable
    (given current knowledge)
  • If the remaining rules are proper, they select
    a unique direct sub-expression
  • else, E is a candidate for a reduction
  • This leads to the notions of
  • selected path selected
    sub-expression
  • (using the conditions in last table)

10
  • The selection path in a composite expression E
    (for ?d)
  • Contains its root
  • If it contains node n labeled by
  • Application n E1 E2, then
  • It contains E1 (operator) if E1 is not a value
  • It contains E2 (operand) if E2 is not a value,
    but E1 is
  • Stops at n if both E1 E2 are values
  • Tuple ..
  • If
  • Its end is the (root of) the selected
    sub-expression of E
  • As we go down the path, a set of (potentially
    applicable) rules is associated with each node,
    that all select the same child as next node

11
  • Example
  • ,
  • The condition v1 in Op (1st expr) selects a
    unique axiom, then we climb up

Application rules
Non-value
tuple rules
with i 1
applic
Application rules
(apply-op) (apply-error) (app-axioms)
12
  • Soundness (determinism) and completeness
    (progress)
  • A composite expression E has a unique proof
    tree for a transition, hence a unique
    transition.
  • and
  • Es selected sub-expression is a redex, (always
    true for the rules with error)
  • If E ? E (regular), then the
    transition for E is E ? E/EE
  • Else, E ? ER, and also E ? ER

13
  • Proof induction on length of selection path
  • 0 E is a candidate for a reduction
  • always a redex obviously all the
    claims hold
  • Ngt0
  • Induction hypothesis claim is true for the
    unique child E1 one level down on the
    selected path.
  • The (unique) transition of E1 determines
  • a unique applicable rule for E
  • hence there is a unique proof
    tree/transition for E.

14
  • Determinism for
  • Can prove directly, using same technique
  • Or, recall that
  • But, for some expressions, there is no ?d
    transition

15
Additional properties
  • ? is not a functional relation!
  • Possibly many successors to an expression, many
    computations
  • Claim (confluence)
  • All ? computations from an expression E
    terminate in same final (extended) value
  • (proof in chapter)

16
  • Functionality, Soundness completeness for
    natural
  • For , for each E there is at most
    one
  • applicable rule,
  • proof tree,
  • value V, s.t.
  • Proved by induction on E (we did that already)
  • For , replace
  • at most by unique
  • Value V by XV (V or ER)
  • Here, uniqueness of proof tree fails for
    derivations of ER, but there is never an
    evaluation to a value, another to ER

17
Comparison of transition, natural

  • (w/o ER)

  • (with ER)
  • The semantics express the
  • same intuitive semantics (for
    values of expressions)
  • in different styles
  • (which one is easier to write transition or
    natural?)
Write a Comment
User Comments (0)
About PowerShow.com