logarithmic space queries and regular transductions
play

Logarithmic space queries and regular transductions Nguyn L Thnh Dng - PowerPoint PPT Presentation

Logarithmic space queries and regular transductions Nguyn L Thnh Dng (LIPN, Univ. Paris 13) nltd@nguyentito.eu partly based on j.w.w. Pierre Pradic (ENS Lyon & Univ. Warsaw) Logic and Computational Complexity, July 8th, 2019,


  1. Logarithmic space queries and regular transductions Nguyễn Lê Thành Dũng (LIPN, Univ. Paris 13) – nltd@nguyentito.eu partly based on j.w.w. Pierre Pradic (ENS Lyon & Univ. Warsaw) Logic and Computational Complexity, July 8th, 2019, Patras 1/15 in the elementary affjne λ -calculus

  2. Implicit Computational Complexity This is a work of implicit computational complexity (ICC): we capture a complexity class via “ functional programming” Many techniques in ICC: function algebras, term rewriting, etc. More precisely, we follow a type theory approach to ICC: • Express functions in some -calculus / constructive logic same thing, via proof-as-programs correspondence! • Indirectly enforce complexity constraint via type system 2/15 (Whereas descriptive complexity ≈ declarative programming.)

  3. Implicit Computational Complexity This is a work of implicit computational complexity (ICC): we capture a complexity class via “ functional programming” Many techniques in ICC: function algebras, term rewriting, etc. More precisely, we follow a type theory approach to ICC: • Indirectly enforce complexity constraint via type system 2/15 (Whereas descriptive complexity ≈ declarative programming.) • Express functions in some λ -calculus / constructive logic − → same thing, via proof-as-programs correspondence!

  4. Type-theoretic Computational Complexity Even in type-theoretic ICC, “there is more than 1 way to do it”! We work at the junction between 2 distinct traditions: (in particular, Hillebrand et al.’s work; also, System T, PCF…) 2. constrained variants of Girard’s linear logic and look at 2 possible input representations : 1. Church-encoded strings relationship with automata (see also: higher-order model checking) 2. fjnite models i.e. fjnite relational structures (as in descriptive complexity) 3/15 1. semantic evaluation in the simply typed λ -calculus (ST λ )

  5. Type-theoretic Computational Complexity Even in type-theoretic ICC, “there is more than 1 way to do it”! We work at the junction between 2 distinct traditions: (in particular, Hillebrand et al.’s work; also, System T, PCF…) 2. constrained variants of Girard’s linear logic and look at 2 possible input representations : (see also: higher-order model checking) 2. fjnite models i.e. fjnite relational structures (as in descriptive complexity) 3/15 1. semantic evaluation in the simply typed λ -calculus (ST λ ) 1. Church-encoded strings → relationship with automata

  6. Some background on ICC in the simply typed λ -calculus

  7. a bare-bones functional programming language no primitive data types, only functions Types of “Church encodings” Str / Bool : standard representations of strings / booleans as functions What languages can we decide by programs taking Str to Bool ? Theorem (Hillebrand & Kanellakis 1996) The languages decided by simply typed programs of type Str A Bool are exactly the regular languages. ( Str A is Str with a type substitution) 4/15 Expressivity of the simply typed λ -calculus The simply typed λ -calculus : abb : ( f a , f b ) �→ f a ◦ f b ◦ f b

  8. a bare-bones functional programming language no primitive data types, only functions Types of “Church encodings” Str / Bool : standard representations of strings / booleans as functions What languages can we decide by programs taking Str to Bool ? Theorem (Hillebrand & Kanellakis 1996) The languages decided by simply typed programs of type 4/15 Expressivity of the simply typed λ -calculus The simply typed λ -calculus : abb : ( f a , f b ) �→ f a ◦ f b ◦ f b Str [ A ] → Bool are exactly the regular languages. ( Str [ A ] is Str with a type substitution)

  9. Semantic evaluation and regular languages Theorem (Hillebrand & Kanellakis 1996) The languages decided by simply typed programs of type Proof idea: w w Str A is a morphism to a fjnite monoid 5/15 Str [ A ] → Bool are exactly the regular languages. To prove ( ⊆ ) , we use a semantics : • type T ⇝ some mathematical structure � T � • program t of type T ⇝ � t � ∈ � T � • if the program p : Bool returns true , then � p � = � true �

  10. Semantic evaluation and regular languages Theorem (Hillebrand & Kanellakis 1996) The languages decided by simply typed programs of type Proof idea: 5/15 Str [ A ] → Bool are exactly the regular languages. To prove ( ⊆ ) , we use a semantics : • type T ⇝ some mathematical structure � T � • program t of type T ⇝ � t � ∈ � T � • if the program p : Bool returns true , then � p � = � true � w ∈ Σ ∗ �→ � w � ∈ � Str [ A ] � is a morphism to a fjnite monoid

  11. Idea: change input representation to overcome limit. Theorem (Hillebrand, Kanellakis & Mairson 1993) With the right choice of encoding, the class of queries expressible in the simply typed -calculus over fjnite models is ELEMENTARY . One can be more precise: characterizations of k -EXPTIME / k -EXPSPACE queries • expressivity upper bounds proved via semantics as before • lower bounds proved using descriptive complexity 6/15 The λ -calculus meets fjnite model theory So the simply typed λ -calculus doesn’t seem too expressive…

  12. Idea: change input representation to overcome limit. Theorem (Hillebrand, Kanellakis & Mairson 1993) With the right choice of encoding, the class of queries expressible in One can be more precise: characterizations of k -EXPTIME / k -EXPSPACE queries • expressivity upper bounds proved via semantics as before • lower bounds proved using descriptive complexity 6/15 The λ -calculus meets fjnite model theory So the simply typed λ -calculus doesn’t seem too expressive… the simply typed λ -calculus over fjnite models is ELEMENTARY .

  13. Idea: change input representation to overcome limit. Theorem (Hillebrand, Kanellakis & Mairson 1993) With the right choice of encoding, the class of queries expressible in One can be more precise: characterizations of k -EXPTIME / k -EXPSPACE queries • expressivity upper bounds proved via semantics as before • lower bounds proved using descriptive complexity 6/15 The λ -calculus meets fjnite model theory So the simply typed λ -calculus doesn’t seem too expressive… the simply typed λ -calculus over fjnite models is ELEMENTARY .

  14. The road not taken by Hillebrand et al.: embrace connections between Str type and automata theory Open question 7/15 Transducers in the λ -calculus What functions Γ ∗ → Σ ∗ can be expressed in the simply typed λ -calculus by programs of type Str Γ [ A ] → Str Σ ? Corollary (of characterization of Str Σ [ A ] → Bool ) For such a function f : Γ ∗ → Σ ∗ , L ⊆ Σ ∗ regular = ⇒ f − 1 ( L ) regular. − → look for an answer in the theory of transducers .

  15. The elementary affjne λ -calculus

  16. ICC in linear logic Via formulæ-as-types / proofs-as-programs correspondence, Restrictions on ‘ ’ have complexity efgects. Elementary Linear Logic: LL w/o A A and A A Theorem (Girard 1998) Programs of type Str k Bool in second-order ELL (for varying k ) correspond to elementary recursive predicates. 8/15 Linear logic ≈ type system with explicit control on duplication : • linear function: A ⊸ B uses A once to produce B • A ⊸ A ⊗ A is not valid • ! A ⊸ ! A ⊗ ! A is valid: ‘ ! ’ marks duplicable resources

  17. ICC in linear logic Via formulæ-as-types / proofs-as-programs correspondence, Theorem (Girard 1998) Programs of type Str k Bool in second-order ELL (for varying k ) correspond to elementary recursive predicates. 8/15 Linear logic ≈ type system with explicit control on duplication : • linear function: A ⊸ B uses A once to produce B • A ⊸ A ⊗ A is not valid • ! A ⊸ ! A ⊗ ! A is valid: ‘ ! ’ marks duplicable resources − → Restrictions on ‘ ! ’ have complexity efgects. Elementary Linear Logic: LL w/o ! A ⊸ A and ! A ⊸ !! A

  18. ICC in linear logic Via formulæ-as-types / proofs-as-programs correspondence, Theorem (Girard 1998) 8/15 Linear logic ≈ type system with explicit control on duplication : • linear function: A ⊸ B uses A once to produce B • A ⊸ A ⊗ A is not valid • ! A ⊸ ! A ⊗ ! A is valid: ‘ ! ’ marks duplicable resources − → Restrictions on ‘ ! ’ have complexity efgects. Elementary Linear Logic: LL w/o ! A ⊸ A and ! A ⊸ !! A Programs of type ! Str ⊸ ! k Bool in second-order ELL (for varying k ∈ N ) correspond to elementary recursive predicates.

  19. ICC in a linear type system (1) k More precise, but uses type fjxpoints (a.k.a. recursive types). Bool corresponds to P . In particular Str type fjxpoints correspond to k -EXPTIME predicates. with 2 Bool in EA , the programs of type Str Programming language counterpart / variant of 2nd-order ELL: For fjxed k Theorem (Baillot et al. 2014) correspond to elementary recursive predicates. Theorem (Baillot et al. 2014) 9/15 the elementary affjne λ -calculus (EA λ ). Programs of type ! Str ⊸ ! k Bool in EA λ (for varying k ∈ N )

  20. ICC in a linear type system (1) Programming language counterpart / variant of 2nd-order ELL: Theorem (Baillot et al. 2014) correspond to elementary recursive predicates. Theorem (Baillot et al. 2014) type fjxpoints correspond to k -EXPTIME predicates. More precise, but uses type fjxpoints (a.k.a. recursive types). 9/15 the elementary affjne λ -calculus (EA λ ). Programs of type ! Str ⊸ ! k Bool in EA λ (for varying k ∈ N ) For fjxed k ∈ N , the programs of type ! Str ⊸ ! k + 2 Bool in EA λ with In particular ! Str ⊸ !! Bool corresponds to P .

Recommend


More recommend