Picturing Resources in Concurrency: from Linear to Additive Relations Filippo Bonchi, Joshua Holland, Robin Piedeleu, Pawe� l Soboci´ nski and Fabio Zanasi SYCO 2 Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 1 / 27
Question Process algebras vs. Petri nets Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 2 / 27
In this talk We try to bridge the gap between the two approaches. ◮ Start from a simple diagrammatic language for linear dynamical systems. ◮ Give it a resource-conscious semantics by changing the domain from a field to the semiring N . ◮ Provide a sound and complete equational theory for this new semantics. ◮ Showcase the expressiveness of the calculus by embedding Petri nets with their usual operational semantics. Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 3 / 27
A simple graphical language Drawing open systems c d , , . . . Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 4 / 27
A simple graphical language Drawing open systems c d , , . . . �→ � c � X ⊆ X × X 2 , � d � X ⊆ X × X . . . for some fixed set X . Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 4 / 27
A simple graphical language Parallel composition c d Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 5 / 27
A simple graphical language Parallel composition c d �→ y 1 � � x 1 � � � y 1 �� � ∈ � c � X , ( x 2 , y 3 ) ∈ � d � X y 2 x 1 , � x 2 , y 2 � y 3 Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 5 / 27
A simple graphical language Synchronising composition c d Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 6 / 27
A simple graphical language Synchronising composition c d �→ �� � z 1 �� � � � z 1 �� � � � ∃ y , ( x , y ) ∈ � d � X , ∈ � c � X x , y , � z 2 z 2 Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 6 / 27
A simple graphical language More complex networks f e g c d Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 7 / 27
A simple graphical language Only the connectivity matters e f g c d Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 8 / 27
A simple graphical language Only the connectivity matters e f g c d � � ��� x � � y �� � � � = � x , y ∈ X � y , x X Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 8 / 27
A simple graphical language Multiple connections f e g c d Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 9 / 27
A simple graphical language Frobenius monoids Special boxes/systems: , , , satisfying: = = = = = = = ◮ form a special commutative Frobenius monoid . Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 10 / 27
A simple graphical language Interpreted as: �� � x �� � � � X = | x ∈ X � � X = { ( x , • ) | x ∈ X } x , x ��� x � � � � � X = | x ∈ X � � X = { ( • , x ) | x ∈ X } , x x Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 11 / 27
A simple graphical language More algebraic structure If X = R is a semiring we buy ourselves more structure: and for r ∈ R r , Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 12 / 27
A simple graphical language More algebraic structure If X = R is a semiring we buy ourselves more structure: and for r ∈ R r , �→ ��� x � � � | ( x , y ) ∈ R 2 � � R = , x + y � � R = { (0 , • ) } y � � R = { ( x , rx ) | x ∈ R } r Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 12 / 27
A simple graphical language More algebraic structure If X = R is a semiring we buy ourselves more structure: and for r ∈ R r , and tranposes for free: := and := r := r Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 12 / 27
A simple graphical language More algebraic structure If X = R is a semiring we buy ourselves more structure: and for r ∈ R r , satisfying: = = = = , , , form a bimonoid . ◮ Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 12 / 27
A simple graphical language More algebraic structure If X = R is a semiring we buy ourselves more structure: and for r ∈ R r , satisfying: r = = r r r r = = r r r r = = r s rs r + s s = 0 ◮ Encode the additive and multiplicative operations of R. Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 12 / 27
A simple graphical language Adding state ◮ Introduce that we interpret as a state-holding register. x Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 13 / 27
A simple graphical language Adding state ◮ Introduce that we interpret as a state-holding register. x ◮ A stateful diagram c : k → l is interpreted as a relation � c � ⊆ R s + k × R s + l where s is the number of . x ◮ Semantics extended inductively with �� � ��� x � � y � � � � R = � x , y ∈ R x � , y x Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 13 / 27
A simple graphical language The register is canonical Isomorphism of props ( if they are traced monoidal): Stateless diagrams � Stateful diagrams � with state-passing wires ∼ = c k l s s d k l Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 14 / 27
A simple graphical language The register is canonical Isomorphism of props ( if they are traced monoidal): Stateless diagrams � Stateful diagrams � with state-passing wires ∼ = c k l s s d k l �→ x Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 14 / 27
A simple graphical language The register is canonical Isomorphism of props ( if they are traced monoidal): Stateless diagrams � Stateful diagrams � with state-passing wires ∼ = c k l s s d k l s x s s d �→ k l d k l s s = d k l Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 14 / 27
The Linear Interpretation Section 2 The Linear Interpretation Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 15 / 27
The Linear Interpretation The prop of linear relations As relations over a field K : �� � x �� � � � K = | x ∈ K � � K = { ( x , • ) | x ∈ K } x , x ��� x � � � | ( x , y ) ∈ K 2 � � K = , x + y � � K = { (0 , • ) } y � � K = { ( x , rx ) | x ∈ K } r ◮ For a diagram c : k → l , � c � K is a linear subspace of K k × K l , i.e., a relation closed under K -linear combinations. Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 16 / 27
The Linear Interpretation Complete equational theory ◮ Addition is also a special commutative Frobenius monoid: = = = = ◮ Scalars are invertible: = = for r � = 0 r r r r Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 17 / 27
The Linear Interpretation Linear dynamical systems For the stateful linear case: ◮ K = R [ x ] susbumes the notion of state we introduced. ◮ Semantics in terms of generalised streams (Laurent series). ◮ Model linear discrete-time dynamical systems (e.g., digital filters, amplifiers) ◮ Generalisation of Shannon’s signal flow graphs . ◮ Control-theory in diagrammatic terms (e.g., controllability, observability). Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 18 / 27
The Resource Interpretation Section 3 The Resource Interpretation Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 19 / 27
The Resource Interpretation Motivating example x Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 20 / 27
The Resource Interpretation Motivating example t v for v = t + s x r s Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 20 / 27
The Resource Interpretation Motivating example t v for v = t + s x r s Over a field K , we can relate any two r and s : � � = � � K x K Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 20 / 27
The Resource Interpretation Motivating example t v for v = t + s x r s Over N , we must have s ≤ v so: � � � = � � N x N Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 20 / 27
The Resource Interpretation Motivating example t v for v = t + s x r s Over N , we must have s ≤ v so: � � � = � � N x N Intuition Without additive inverses, we cannot borrow arbitrary quantities. Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 20 / 27
The Resource Interpretation Motivating example x Over N , this diagram behaves like the place of a Petri net! Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 21 / 27
The Resource Interpretation Motivating example 3 x 1 Over N , this diagram behaves like the place of a Petri net! Bonchi et al. Picturing Resources in Concurrency 17 Dec 2018 21 / 27
Recommend
More recommend