Unifying Notions of Feedback Sergey Goncharov FAU Tag der Informatik 2019, April 26
Unifying Notions of Feedback Sergey Goncharov FAU Tag der Informatik 2019, April 26
Outline Semantics of programs and specification frameworks is a rich ecosystem containing a tremendous bulk of methods and tools for dealing with various flavours of computation from classical, nondeterministic, probabilistic to quantum 1 19
Outline Semantics of programs and specification frameworks is a rich ecosystem containing a tremendous bulk of methods and tools for dealing with various flavours of computation from classical, nondeterministic, probabilistic to quantum A unifying language for semantics is category theory 1 19
Outline Semantics of programs and specification frameworks is a rich ecosystem containing a tremendous bulk of methods and tools for dealing with various flavours of computation from classical, nondeterministic, probabilistic to quantum A unifying language for semantics is category theory Feedback is a distinctive feature of complex systems, computationally interpreted e.g. as iteration or recursion 1 19
Outline Semantics of programs and specification frameworks is a rich ecosystem containing a tremendous bulk of methods and tools for dealing with various flavours of computation from classical, nondeterministic, probabilistic to quantum A unifying language for semantics is category theory Feedback is a distinctive feature of complex systems, computationally interpreted e.g. as iteration or recursion Total (but not partial!) feedback operators are categorically unified with traced (monoidal) categories 1 19
Outline Semantics of programs and specification frameworks is a rich ecosystem containing a tremendous bulk of methods and tools for dealing with various flavours of computation from classical, nondeterministic, probabilistic to quantum A unifying language for semantics is category theory Feedback is a distinctive feature of complex systems, computationally interpreted e.g. as iteration or recursion Total (but not partial!) feedback operators are categorically unified with traced (monoidal) categories Grand unification: Guarded Traced Categories 1 19
Why Semantics?
A Well-known Scenario How do we know that automata start start a a b q 1 q 2 q 1 q 1 q 1 1 2 3 a b b are equivalent? 2 19
A Well-known Scenario How do we know that automata start start a a b q 1 q 2 q 1 q 1 q 1 1 2 3 a b b are equivalent? dinaturality identity 1 � “ a p ba q ‹ b ` 1 and: p ab q ‹ “ a p ba q ‹ b ` 1 Because � q 1 � “ p ab q ‹ , � q 1 semantic brackets 2 19
Semantics in Computer Science Semantics 3 19
Semantics in Computer Science Effectiveness (of presentation, decidability) Semantics 3 19
Semantics in Computer Science Efficiency (complexity of computations, efficient data structures) Effectiveness (of presentation, decidability) Semantics 3 19
Semantics in Computer Science Algorithms, implementations, concrete programming languages, compilers, interpreters, simulators, proof assistants, ... Efficiency (complexity of computations, efficient data structures) Effectiveness (of presentation, decidability) Semantics 3 19
A Less Known Scenario Bouncing ball is a simple Newtonian system specified by differential equation ¨ h “ ´ g ( g « 9 . 8) whose solution is h p t q “ h 0 ` v 0 t ´ gt 2 2 1 with initial values: v 0 “ 0, h 0 ‰ 0 (peak height) h 0 “ 0, v 0 ‰ 0 (zero height) 0 . 5 F eatures: deterministic 1 2 3 4 hybrid: the velocity changes discretely at the bottom v ÞÑ ´ cv , but it changes continuously in the meanwhile Zeno behaviour: the state of rest is only reachable in the limit damping factor 4 19
Hybrid Automata The following hybrid automata "A" and "B" capture the bouncing ball behaviour: h “ 1 , v “ 0 h “ 1 , v “ 0 h “ 0 v : “ ´ cv ❋❧② ❉♦✇♥ ❯♣ h “ 0 h “ v h “ v h “ v ˙ ˙ ˙ v : “ ´ cv v “ ´ g v “ ´ g v “ ´ g ˙ ˙ ˙ h ě 0 h ě 0 v ě 0 v “ 0 These automata are not equivalent under standard semantics, because � A � “ p , . . . q , but � B � “ p , , , , . . . q , , , 5 19
Impact of Semantics K nowing the semantics of automata, we can minimize them, transform, prove equivalence 6 19
Impact of Semantics K nowing the semantics of automata, we can minimize them, transform, prove equivalence We can transfer knowledge between different models, as the theories of nondeterministic, probablilistic, push-down, etc, etc automata have a lot in common 6 19
Impact of Semantics K nowing the semantics of automata, we can minimize them, transform, prove equivalence We can transfer knowledge between different models, as the theories of nondeterministic, probablilistic, push-down, etc, etc automata have a lot in common We can optimize programs, e.g. while b do ... while b do ... if b then ... ... Ñ else /* dead code */ done done and verify them (since, we know what they mean!) 6 19
Impact of Semantics K nowing the semantics of automata, we can minimize them, transform, prove equivalence We can transfer knowledge between different models, as the theories of nondeterministic, probablilistic, push-down, etc, etc automata have a lot in common We can optimize programs, e.g. while b do ... while b do ... if b then ... ... Ñ else /* dead code */ done done and verify them (since, we know what they mean!) Principled semantic foundations improve design of languages, software and hardware systems (types, compositionality, Curry-Howard correspondence, etc) 6 19
Why Category Theory?
[...] Kategorientheorie – ein sehr komplexes Gebiet mit tiefen mathematischen Wurzeln, und mit relativ wenigen Experten auf diesem Gebiet — Anonymous referee 7 19
Categories: Quick Intro A category C consists of wires (=objects) | C | and boxes (=morphisms) C p A , B q with A , B P | C | , which can be combined: sequential composition identity wire A A A B C g f 8 19
Categories: Quick Intro A category C consists of wires (=objects) | C | and boxes (=morphisms) C p A , B q with A , B P | C | , which can be combined: sequential composition identity wire A A A B C g f A category is monoidal if morphisms can be tensored: parallel composition A B f C b A D b B C g D 8 19
Categories: Quick Intro A category C consists of wires (=objects) | C | and boxes (=morphisms) C p A , B q with A , B P | C | , which can be combined: sequential composition identity wire A A A B C g f A category is monoidal if morphisms can be tensored: parallel composition A B f C b A D b B C g D A monoidal category is symmetric if wires can be crossed: A B B A 8 19
Categories: Quick Intro A category C consists of wires (=objects) | C | and boxes (=morphisms) C p A , B q with A , B P | C | , which can be combined: sequential composition identity wire A A A B C g f A category is monoidal if morphisms can be tensored: parallel composition A B f C b A D b B C g D A monoidal category is symmetric if wires can be crossed: A B B A Boxes are intuitively: programs, processes, components, automata; wires are types, communication channels 8 19
Traced Categories T raced categories additionally allow feedback loops, called traces: U U f A B Traced categories provide a unifying framework for Iteration (roughly: while-loops) Recursion (roughly: fixpoint combinators of λ -calculus) Knot theory Operator theory (e.g. traces model quantum measurements) 9 19
Why Guarded Traces?
Automata, Revisited C onsider again the regular expressions p ab q ‹ and a p ba q ‹ b ` 1 Here, Kleene star e ‹ is the unique fixpoint of x ÞÑ ex ` 1 Equation p ab q ‹ “ a p ba q ‹ b ` 1 is true, because a p ba q ‹ b ` 1 is a fixpoint of the same map 10 19
Automata, Revisited C onsider again the regular expressions p ab q ‹ and a p ba q ‹ b ` 1 Here, Kleene star e ‹ is the unique fixpoint of x ÞÑ ex ` 1 Equation p ab q ‹ “ a p ba q ‹ b ` 1 is true, because a p ba q ‹ b ` 1 is a fixpoint of the same map: a p ba q ‹ b ` 1 “ a pp ba qp ba q ‹ ` 1 q b ` 1 10 19
Automata, Revisited C onsider again the regular expressions p ab q ‹ and a p ba q ‹ b ` 1 Here, Kleene star e ‹ is the unique fixpoint of x ÞÑ ex ` 1 Equation p ab q ‹ “ a p ba q ‹ b ` 1 is true, because a p ba q ‹ b ` 1 is a fixpoint of the same map: a p ba q ‹ b ` 1 “ a pp ba qp ba q ‹ ` 1 q b ` 1 “ a p ba qp ba q ‹ b ` a 1 b ` 1 10 19
Automata, Revisited C onsider again the regular expressions p ab q ‹ and a p ba q ‹ b ` 1 Here, Kleene star e ‹ is the unique fixpoint of x ÞÑ ex ` 1 Equation p ab q ‹ “ a p ba q ‹ b ` 1 is true, because a p ba q ‹ b ` 1 is a fixpoint of the same map: a p ba q ‹ b ` 1 “ a pp ba qp ba q ‹ ` 1 q b ` 1 “ a p ba qp ba q ‹ b ` a 1 b ` 1 “ p ab q a p ba q ‹ b ` ab ` 1 10 19
Recommend
More recommend