type theory of acyclic recursion and its calculi
play

Type-theory of acyclic recursion and its calculi Roussanka Loukanova - PowerPoint PPT Presentation

Introduction to Type-Theory of Algorithms Reduction Rules Current and Future Work Some References Type-theory of acyclic recursion and its calculi Roussanka Loukanova Stockholm University, Sweden Second Workshop on Mathematical Logic and its


  1. Introduction to Type-Theory of Algorithms Reduction Rules Current and Future Work Some References Type-theory of acyclic recursion and its calculi Roussanka Loukanova Stockholm University, Sweden Second Workshop on Mathematical Logic and its Applications 5-9 March 2018, Kanazawa, Japan 1 / 29

  2. Outline Introduction to Type-Theory of Algorithms 1 Syntax of L λ ar Abbreviations Denotational Semantics of L λ ar Reduction Rules 2 Key Features of L λ ar Examples γ -Reduction γ ∗ -Reduction Examples and Counterexamples Current and Future Work 3 Some References 4

  3. Introduction to Type-Theory of Algorithms Syntax of L λ ar Reduction Rules Abbreviations Current and Future Work Denotational Semantics of L λ ar Some References Moschovakis Theory of Algorithms Moschovakis [1], 1989, initiated: untyped Theory of Algorithms: algorithms with full recursion Moschovakis [2], 2006, introduced a Type Theory of Acyclic Algorithms, by demonstrating it for Computational Semantics of Human Language Ongoing development: Type Theory of Acyclic Algorithms, L λ ar : algorithms with acyclic recursion Type Theory of Algorithms, L λ r : algorithms with full recursion Dependent-Type Theory of Situated Information and Algorithms Applications to: Computational Syntax-Semantics of Human Language Computational Neuroscience (a little bit) 3 / 29

  4. Introduction to Type-Theory of Algorithms Syntax of L λ ar Reduction Rules Abbreviations Current and Future Work Denotational Semantics of L λ ar Some References Algorithms, i.e., computations, as semantics of recursion terms Syntax of L λ ar ( L λ r ) = ⇒ Algorithms (for Computations) = ⇒ Denotations � �� � Semantics of L λ ar (L λ r ) denotational semantics of L λ ar is by induction on term structure the reduction calculus of L λ ar ( L λ r ) defines a reduction relation: A ⇒ B the reduction calculus of L λ ar effectively reduces every term to its canonical form: A ⇒ cf cf ( A ) the algorithm for computing den ( A ) , for a meaningful term A , is determined by cf ( A ) : den ( A ) = den ( cf ( A )) 4 / 29

  5. Syntax of L λ ar - acyclic recursion ( L λ r full recursion without acyclicity) σ : ≡ e | t | s | ( τ 1 → τ 2 ) Gallin Types: Const τ = { c τ 0 , c τ Constants: 1 , . . . } PureVars τ = { v τ 0 , v τ 1 , . . . } , RecVars τ = { p τ 0 , p τ Variables: 1 , . . . } Terms of L λ ar ( L λ r ): A : ≡ c τ : τ | x τ : τ (1a) | B ( σ → τ ) ( C σ ) : τ (1b) | λ ( v σ ) ( B τ ) : ( σ → τ ) (1c) 0 where { p σ 1 1 := A σ 1 | A σ 1 , . . . , p σ n n := A σ n n } : σ (1d) given that: c τ ∈ Const τ , x τ ∈ PureVars τ ∪ RecVars τ p i ∈ RecVars σ i , A i ∈ Terms σ i { p σ 1 1 := A σ 1 1 , . . . , p σ n n := A σ n n } satisfies the Acyclicity Constraint iff: there exists a function rank : { p 1 , . . . , p n } → N s.th. if p j occurs freely in A i , then rank ( p i ) > rank ( p j )

  6. Introduction to Type-Theory of Algorithms Syntax of L λ ar Reduction Rules Abbreviations Current and Future Work Denotational Semantics of L λ ar Some References Abbreviations er ≡ error � τ ≡ ( s → τ ) , where τ ∈ Types (the type of state dependent objects of type σ ) Sequences → − X ≡ X 1 , . . . , X n , (2) for X i ∈ Terms for all i ∈ { 1 , . . . , n } or X i ∈ Types for all i ∈ { 1 , . . . , n } Abbreviated sequences of mutually recursive assignments: � � p := − → → − A ≡ p 1 := A 1 , . . . , p n := A n ( n ≥ 0 ) (3) 6 / 29

  7. Introduction to Type-Theory of Algorithms Syntax of L λ ar Reduction Rules Abbreviations Current and Future Work Denotational Semantics of L λ ar Some References Denotational Semantics of L λ ar For any semantic structure A ( Const ) = � T , I � , where T = { T σ | σ ∈ Types } is a frame of typed objects, I : Const − → T is the interpretation function , respecting the types: for every σ ∈ Types } , I ( Const σ ) = T σ with G = { g | g : PureVars ∪ RecVars − → T } (the set of all variable valuations), the denotation function : den A ≡ den : Terms − → { f | f : G − → T } is defined by recursion on the structure of the terms: (D1) den ( x )( g ) = g ( x ) ; den ( c )( g ) = I ( c ) (D2) den ( A ( B ))( g ) = den ( A )( g )( den ( B )( g )) � � (D3) den ( λx ( B ))( g ) t = den ( B )( g { x := t } ) , for every t ∈ T τ (to be continued) 7 / 29

  8. Introduction to Type-Theory of Algorithms Syntax of L λ ar Reduction Rules Abbreviations Current and Future Work Denotational Semantics of L λ ar Some References The denotation function for the recursion terms (continuation) (D4) den ( A 0 where { p 1 := A 1 , . . . , p n := A n } )( g ) = den ( A 0 )( g { p 1 := p 1 , . . . , p n := p n } ) , where p i ∈ T τ i are defined by recursion on rank ( p i ) : p i = den ( A i )( g { p k 1 := p k 1 , . . . , p k m := p k m } ) given that p k 1 , . . . , p k m are all of the recursion variables p j ∈ { p 1 , . . . , p n } , s.t. rank ( p j ) < rank ( p i ) . Intuitively: den ( A 1 )( g ) , . . . , den ( A n )( g ) are computed recursively and stored in p 1 , . . . , p n , respectively the denotation den ( A 0 )( g ) may depend on the values stored in p 1 , . . . , p n 8 / 29

  9. Reduction Rules (to be continued) [Congruence] If A ≡ c B , then A ⇒ B (cong) [Transitivity] If A ⇒ B and B ⇒ C , then A ⇒ C (trans) [Compositionality] • If A ⇒ A ′ and B ⇒ B ′ , then A ( B ) ⇒ A ′ ( B ′ ) (ap-comp / rep1) • If A ⇒ B , then λ ( u )( A ) ⇒ λ ( u )( B ) ( λ -comp / rep2) • If A i ⇒ B i ( i = 0 , . . . , n ), then (wh-comp / rep3) A 0 where { p 1 := A 1 , . . . , p n := A n } ⇒ B 0 where { p 1 := B 1 , . . . , p n := B n }

  10. Key Features of L λ Introduction to Type-Theory of Algorithms ar Examples Reduction Rules γ -Reduction Current and Future Work γ ∗ -Reduction Some References Examples and Counterexamples Reduction Rules (to be continued) [Head Rule] given that no p i occurs freely in any B j , � � p := − → q := − → A 0 where { − → where { − → A } B } (head) p := − → q := − → ⇒ A 0 where { − → A, − → B } [Bekiˇ c-Scott Rule] given that no q i occurs freely in any A j , � � q := − → p := − → B 0 where { − → , − → A 0 where { p := B } A } (B-S) q := − → p := − → ⇒ A 0 where { p := B 0 , − → B, − → A } [Recursion-Application Rule] given that no p i occurs freely in B , � � p := − → A 0 where { − → A } ( B ) (7) p := − → ⇒ A 0 ( B ) where { − → A } (recap) 10 / 29

  11. Key Features of L λ Introduction to Type-Theory of Algorithms ar Examples Reduction Rules γ -Reduction Current and Future Work γ ∗ -Reduction Some References Examples and Counterexamples Reduction Rules (to be continued) [Application Rule] given that B ∈ PrT is a proper term, and fresh � � � � � ��� p ∈ RecVars − FV A ( B ) ∪ BV A ( B ) , � � A ( p ) where { p := B } A ( B ) ⇒ (ap) � � �� [ λ -rule] given fresh p ′ i ∈ RecVars − FV ( A ) ∪ BV ( A ) , i = 1 , . . . , n , for A ≡ A 0 where { p 1 := A 1 , . . . , p n := A n } � �� � λ ( u ) A 0 where p 1 := A 1 , . . . , p n := A n ( λ ) � �� � λ ( u ) A ′ p ′ 1 := λ ( u ) A ′ 1 , . . . , p ′ n := λ ( u ) A ′ ⇒ 0 where n where, for all i = 0 , . . . , n , � �� � A ′ p 1 : ≡ p ′ 1 ( u ) , . . . , p n : ≡ p ′ i ≡ A i n ( u ) (9) 11 / 29

  12. Key Features of L λ Introduction to Type-Theory of Algorithms ar Examples Reduction Rules γ -Reduction Current and Future Work γ ∗ -Reduction Some References Examples and Counterexamples Theorem (Canonical Form Theorem) For each A ∈ Terms , there is a unique up to congruence, irreducible cf ( A ) ∈ Terms s.th.: cf ( A ) ≡ A 0 where { p 1 := A 1 , . . . , p n := A n } 1 for some explicit, irreducible A 0 , . . . , A n ∈ Terms ( n ≥ 0 ) A ⇒ cf ( A ) 2 12 / 29

  13. Key Features of L λ Introduction to Type-Theory of Algorithms ar Examples Reduction Rules γ -Reduction Current and Future Work γ ∗ -Reduction Some References Examples and Counterexamples Algorithmic Equivalence Intuitively: L λ r is a formalization of the mathematical notion of algorithm, for computing values of recursive functions, designated by recursion terms and expressed by terms in canonical forms. I.e., the concept of algorithm is defined formally, at the object level of its syntax. Theorem (of Algorithmic Equivalence / Synonymy) Two terms A, B ∈ Terms are algorithmically equivalent, A ≈ B , iff there are explicit, irreducible terms A 0 , A 1 , . . . , A n , B 0 , B 1 , . . . , B n ( n ≥ 0 ) s.th.: A ⇒ cf A 0 where { p 1 := A 1 , . . . , p n := A n } B ⇒ cf B 0 where { p 1 := B 1 , . . . , p n := B n } | = A i = B i ( i = 0 , . . . , n ) , i.e., den ( A i )( g ) = den ( B i )( g ) , for all g ∈ G (10) 13 / 29

Recommend


More recommend