Abstract
In this paper we analyse the dynamic gossip problem using the algebraic network programming language Netkat.
Netkat is a language based on Kleene algebra with tests and describes packets travelling through networks. It has a sound and complete axiomatisation and an efficient coalgebraic decision procedure. Dynamic gossip studies how information spreads through a peer-to-peer network in which links are added dynamically.
In this paper we embed dynamic gossip into Netkat. We show that a reinterpretation of Netkat in which we keep track of the state of switches allows us to model Learn New Secrets, a well-studied protocol for dynamic gossip. We axiomatise this reinterpretation of Netkat and show that it is sound and complete with respect to the packet-processing model, via a translation back to standard Netkat.
Our main result is that many common decision problems about gossip graphs can be reduced to checks of Netkat equivalences. We also implemented the reduction.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
To be precise, we use the verification_and_felix branch currently at commit be47c929ed84904f9bdb81bf9765a0432db63069. We would like to thank Steffen Smolka and Nate Foster for their help to get the decision method running.
References
Anderson, C.J., et al.: NetKAT: semantic foundations for networks. In: Proceedings of the 41st ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL 2014, pp. 113–126 (2014). ISBN: 978-1-4503-2544-8. Extended version https://hdl.handle.net/1813/34445. https://doi.org/10.1145/2535838.2535862
Apt, K.R., Grossi, D., van der Hoek, W.: Epistemic protocols for distributed gossiping. In: Proceedings of TARK 2015 (2015). Edited by Ramanujam. https://doi.org/10.4204/EPTCS.215.5
Apt, K.R., Wojtczak, D. Common knowledge in a logic of gossips. In: Proceedings of TARK 2017 (2017). Edited by Jérôme Lang. https://doi.org/10.4204/EPTCS.251.2
Attamah, M., van Ditmarsch, H., Grossi, D., van der Hoek, W.: Knowledge and gossip. In: Proceedings of the Twenty-First European Conference on Artificial Intelligence. Frontiers in Artificial Intelligence and Applications, pp. 21–26 (2014). ISBN: 978-1-61499-418-3. https://doi.org/10.3233/978-1-61499-419-0-21
Baltag, A., Christoff, Z., Rendsvig, R.K., Smets, S.: Dynamic epistemic logics of diffusion and prediction in social networks. In: Proceedings of the Twelfth Conference on Logic and the Foundations of Game and Decision Theory (2016). https://is.gd/DiffDEL
Beckett, R., Greenberg, M., Walker, D.: Temporal NetKAT. In: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2016, pp. 386–401 (2016). ISBN: 978-1-4503-4261-2. https://doi.org/10.1145/2908080.2908108
van Ditmarsch, H., van Eijck, J., Pardo, P., Ramezanian, R., Schwarzentruber, F.: Dynamic gossip. Bulletin of the Iranian Mathematical Society, Sept 2018. ISSN: 1735-8515, https://doi.org/10.1007/s41980-018-0160-4
van Ditmarsch, H., van Eijck, J., Pardo, P., Ramezanian, R., Schwarzentruber, F.: Epistemic protocols for dynamic gossip. J. Appl. Log. 20, 1–31 (2017). https://doi.org/10.1016/j.jal.2016.12.001
van Ditmarsch, H., Grossi, D., Herzig, A., van der Hoek, W., Kuijer, L.B.: Parameters for epistemic gossip problems. In: Proceedings of the Twelfth Conference on Logic and the Foundations of Game and Decision Theory (2016). https://is.gd/GosPar
Foster, N., Kozen, D., Milano, M., Silva, A., Thompson, L.: A coalgebraic decision procedure for NetKAT. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, pp. 343–355 (2015). ISBN: 978-1-4503-3300-9. https://doi.org/10.1145/2676726.2677011
Hedetniemi, S.M., Hedetniemi, S.T., Liestman, A.L.: A survey of gossiping and broadcasting in communication networks. Networks 18(4), 319–349 (1988). https://doi.org/10.1002/net.3230180406
Herzig, A., Maffre, F.: How to share knowledge by gossiping. AI Commun. 30(1), 1–17 (2017). https://doi.org/10.3233/AIC-170723
Hoare, T., Möller, B., Struth, G., Wehrman, I.: Concurrent kleene algebra and its foundations. J. Log. Algebr. Program. 80(6), 266–296 (2011). Relations and Kleene Algebras in Computer Science. ISSN: 1567–8326. https://doi.org/10.1016/j.jlap.2011.04.005
Kappé, T., Brunet, P., Silva, A., Zanasi, F.: Concurrent kleene algebra: free model and completeness. In: Ahmed, A. (ed.) Programming Languages and Systems (ESOP 2018), pp. 856–882 (2018). ISBN: 978-3-319-89884-1. https://doi.org/10.1007/978-3-319-89884-1_30
Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997). https://doi.org/10.1145/256167.256195
Kozen, D., Smith, F.: Kleene algebra with tests: completeness and decidability. In: Computer Science Logic, pp. 244–259 (1997). Edited by Dirk van Dalen and Marc Bezem. ISBN: 978-3-540-69201-0. https://doi.org/10.1007/3-540-63172-0_43
McClurg, J., Hojjat, H., Foster, N., Černý, P.: Event-driven network programming. ACM SIGPLAN Not. 51(6), 369–385 (2016). https://doi.org/10.1145/2908080.2908097. PLDI 2016. ISSN: 0362–1340
Pous, D.: Symbolic algorithms for language equivalence and kleene algebra with tests. In: Proceedings of the 42nd Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL 2015, pp. 357–368. ISBN: 978-1-4503-3300-9. https://doi.org/10.1145/2676726.2677007
Smolka, S. Eliopoulos, S., Foster, N., Guha, A.: A fast compiler for NetKAT. In: Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming, ICFP 2015, pp. 328–341 (2015). ISBN: 978-1-4503-3669-7. https://doi.org/10.1145/2784731.2784761
Wagemaker, J.: Gossip in NetKAT. Master’s thesis, ILLC, University of Amsterdam (2017). https://eprints.illc.uva.nl/1552/
Acknowledgements
We received helpful feedback from Jan van Eijck, Tobias Kappé, Jurriaan Rot, Jan Rutten and the anonymous RAMiCS reviewers. The first author was affiliated with the ILLC at the University of Amsterdam during most of this work. The research of the second author is funded by the Dutch NWO project 612.001.210.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix
Appendix
1.1 Proof of Lemma 3
By induction on the call sequence \(\sigma \). The base case follows instantly as \(pol_\epsilon = 1\) outputs the same packet and thus the same gossip graph.
For the induction step we use that calling agents exchange everything they know and that this is encoded in the modifications done by \(pol_{ab}\). As an example, consider the \(\subseteq \) direction for N. By the induction hypothesis for \(\sigma \) we have
and want to show for \(\sigma ;xy\) that
Suppose \((a,b)\in N^{\sigma ;xy}\). Either \((a,b)\in N^{\sigma }\), in which case we are done by the induction hypothesis because \(\textsf {pk}.Nab=1\) is preserved by \(pol_{xy}\), or \((a,b)\notin N^{\sigma }\). For the latter case, w.l.o.g. we can assume that \(a=x\). Thus we know that \((y,b) \in N^{\sigma }\). From our induction hypothesis we can conclude that \(\forall \textsf {pk}\in \llbracket pol_{\sigma }\rrbracket (\textsf {pk}_G): \textsf {pk}.Nyb = 1\). Then in \(pol_{xy}\) the field Nxb gets set to 1. Hence we know that \(\forall \textsf {pk}\in \llbracket pol_{\sigma ;xy}\rrbracket (\textsf {pk}_G): \textsf {pk}.Nxb = 1\). \(\square \)
1.2 Proof of Theorem 4
Using soundness and completeness of Netkat the given syntactic equivalence holds iff we semantically have .
Suppose LNS is weakly successful on G. Let us consider input packet \(\textsf {pk}_G\) from Definition 10. We have \(\llbracket pol_G \rrbracket (\textsf {pk}_G) = \{ pk_G \}\) by definition. There is at least one call sequence \(\sigma \in LNS(G)\) that is successful. By Theorem 3 we know that \(\sigma \) corresponds to an execution of \(pol_\mathrm {LNS}\) on input \(\textsf {pk}_G\) and there is a packet \(\textsf {pk}\) such that and its fields \(\mathsf {call}_m\) encode \(\sigma \). Because \(\sigma \) is successful we also have \(\llbracket pol_\mathrm {success} \rrbracket (\textsf {pk}) = \{ \textsf {pk}\}\). Hence we can conclude \(\textsf {pk}\in \llbracket pol_G\cdot pol_\mathrm {LNS}\cdot pol_\mathrm {success}\rrbracket (\textsf {pk}_G)\) and thus that \(\llbracket pol_G\cdot pol_\mathrm {LNS}\cdot pol_\mathrm {success}\rrbracket \ne \varnothing \).
The other direction is similar, so we omit the proof here. \(\square \)
1.3 Proof of Theorem 5
By soundness and completeness of Netkat the equivalence holds iff we have .
Suppose LNS is strongly successful on G. We immediately have \(\supseteq \) because any packet passing the success check also passes the test that LNS has finished.
To show \(\subseteq \), take any \(\textsf {pk}\) and \(\textsf {pk}'\) such that . We then know that \(\textsf {pk}= \textsf {pk}_G\) because \(\textsf {pk}\) passed the test \(pol_G\). Hence
. As \(\llbracket pol_G\rrbracket (\textsf {pk}_G)=\{ \textsf {pk}_G \}\), we get that
. From Theorem 3 we know that every output \(\textsf {pk}'\) of
corresponds to a call sequence \(\sigma \in LNS(G)\). From the assumption that LNS is strongly successful on G we get that all of these \(\sigma \) are successful call sequences. We thus know that \(\llbracket pol_\mathrm {success} \rrbracket (\textsf {pk}') = \{ \textsf {pk}' \}\) and thereby
.
The other direction is similar. \(\square \)
1.4 Proof of Theorem 6
By soundness and completeness of Netkat, the statement is equivalent to:
\(\Rightarrow \) Take the packet \(\textsf {pk}_G\). We know that \(\llbracket pol_G\rrbracket (\textsf {pk}_G)=\{\textsf {pk}_G\}\). As G is a sun graph, we know that for each agent i either \(\llbracket pol_{Ni}\rrbracket (\textsf {pk}_G)=\{\textsf {pk}_G\}\) or \(\llbracket pol_{\mathrm {self}_i}\rrbracket (\textsf {pk}_G)=\{\textsf {pk}_G\}\). Hence we have
for some packet \(\textsf {pk}\). Thus we can conclude:
\(\Leftarrow \) is similar. \(\square \)
1.5 Proof of Corollary 1
Fix some G. By Theorem 5 LNS is strongly successful on G if and only if
and from Theorem 6 that G is a sun graph if and only if
Now suppose we have . From Theorem 5 we then know that LNS is strongly successful on G. By Theorem 2 it follows that G is a sun graph. From Theorem 6 we know this is equivalent to
The other direction is similar. \(\square \)
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Gattinger, M., Wagemaker, J. (2018). Towards an Analysis of Dynamic Gossip in Netkat. In: Desharnais, J., Guttmann, W., Joosten, S. (eds) Relational and Algebraic Methods in Computer Science. RAMiCS 2018. Lecture Notes in Computer Science(), vol 11194. Springer, Cham. https://doi.org/10.1007/978-3-030-02149-8_17
Download citation
DOI: https://doi.org/10.1007/978-3-030-02149-8_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-02148-1
Online ISBN: 978-3-030-02149-8
eBook Packages: Computer ScienceComputer Science (R0)