Skip to main content
Log in

A Formal Semantics for the SmartFrog Configuration Language

  • Published:
Journal of Network and Systems Management Aims and scope Submit manuscript

Abstract

System configuration languages are now widely used to drive the deployment and evolution of large computing infrastructures. Most such languages are highly informal, making it difficult to reason about configurations, and introducing an important source of failure. We claim that a more rigorous approach to the development and specification of these languages will help to avoid these difficulties and bring a number of additional benefits. In order to test this claim, we present a formal semantics for the core of the SmartFrog configuration language. We demonstrate how this can be used to prove important properties such as termination of the compilation process. To show that this also contributes to the practical development of clear and correct compilers, we present three independent implementations, and verify their equivalence with each other, and with the semantics. Supported by an extended example from a real configuration scenario, we demonstrate how the process of developing the semantics has improved understanding of the language, highlighted problem areas, and suggested alternative interpretations. This leads us to advocate this approach for the future development of practical configuration languages.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19

Similar content being viewed by others

Notes

  1. The concrete syntax of this formal representation is a:c.

  2. This is equivalent to a map data structure.

References

  1. Ansible: http://ansibleworks.com. Accessed 25 Feb 2014

  2. Cfengine: http://cfgengine.com. Accessed 25 Feb 2014

  3. Chef: http://getchef.com. Accessed 25 Feb 2014

  4. LCFG: http://www.lcfg.org. Accessed 25 Feb 2014

  5. Puppet: http://puppetlabs.com. Accessed 25 Feb 2014

  6. Vervloesem, K.: FOSDEM Configuration Management Meeting Report, Feb 2011

  7. Oppenheimer, D., Ganapathy, G., Patterson, D.: Why do internet services fail and what can be done about it? In: 4th Usenix Symposium on Internet Technologies and Systems (2003)

  8. Anderson, P., Cheney, J.: Toward provenance-based security for configuration languages. In: The 4th Usenix Workshop on the Theory and Practice of Provenance (2012)

  9. SmartFrog: http://www.smartfrog.org. Accessed 25 Feb 2014

  10. Herry, H., Anderson, P.: Planning with global constraints for computing infrastructure reconfiguration. In: CP4PS-12—The AAAI-12 Workshop on Problem Solving using Classical Planners (2012)

  11. Hewson, J.A., Anderson, P., Gordon, A.D.: Constraint-based autonomic configuration. In: Proceedings of 2013 Self-adaptive and Self-organizing Systems Conference (SASO), Sept 2013

  12. Self: http://selflanguage.org. Accessed 1 March 2014

  13. YAML: http://www.yaml.org/spec/. Accessed 10 April 2014

  14. Schmidt, D.A.: Denotational Semantics: A Methodology for Language Development. Allyn and Bacon, Boston (1986)

    Google Scholar 

  15. Stoy, J.E.: Denotational Semantics: The Scott–Strachey Approach to Programming Language Theory. The MIT Press, Cambridge (1977)

    MATH  Google Scholar 

  16. Hewson, J.A., Anderson, P., Gordon, A.D.: A declarative approach to automated configuration. In: Proceedings of the 2012 LISA Conference. Usenix Association (2012)

  17. Couch, A.: From x-1 to (setf x 1): what does configuration management mean? USENIX Login 33(1), 12–18 (2008)

    Google Scholar 

  18. Couch, A., Sun, Y.: On observed reproducibility in network configuration management. Sci Comput Program 53(2), 215–253 (2004). Topics in System Administration

    Article  MathSciNet  MATH  Google Scholar 

  19. Bekezhanova, A.: Denotational semantics of puppet. Master’s thesis, School of Informatics, University of Edinburgh (2013)

  20. Hilty, M., Pretschner, A., Basin, D., Schaefer, C., Walter, T.: A policy language for distributed usage control. In: Biskup, J., López, J. (eds.) Computer Security—ESORICS 2007, Volume 4734 of Lecture Notes in Computer Science, pp. 531–546. Springer, Berlin (2007)

    Google Scholar 

  21. Aktug, I., Naliuka, K.: Conspec—a formal language for policy specification. Sci Comput Program 74(1–2), 2–12 (2008). Special Issue on Security and Trust

    Article  MathSciNet  MATH  Google Scholar 

  22. Damianou, N.: A policy framework for management of distributed systems. PhD thesis, Imperial College (2002)

  23. Classen, A., Hubaux, A., Heymans, P.: A formal semantics for multi-level staged configuration. Technical report, University of Namur (2009)

  24. Favre, J.-M.: CPP denotational semantics. In: Proceedings of the Third International Workshop on Source Code Analysis and Manipulation, p. 22. IEEE Computer Society (2003)

  25. Herry, H.: Automated Planning for Cloud Service Configurations. PhD thesis, School of Informatics, University of Edinburgh (2014)

  26. Demonstration SmartFrog compilers based on the formal semantics. https://github.com/herry13/smartfrog-lang. Accessed 28 March 2014

  27. Claessen, K., Hughes, J.: Quickcheck: a lightweight tool for random testing of haskell programs. In: Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming, ICFP ’00, pp. 268–279. ACM, New York. (2000)

  28. Microsoft Desired State Configuration. http://technet.microsoft.com/en-us/library/dn249912.aspx. Accessed 13 Nov 2014

  29. DMTF MOF Format. http://www.dmtf.org/sites/default/files/standards/documents/dsp0221_3.0.0.pdf. Accessed 13th Nov 2014

  30. Unruh, I., Bardas, A.G., Zhuang, R., Ou, Z., DeLoach, S.A.: Compiling abstract specifications into concrete systems—bringing order to the cloud. In: Proceedings of the 28th Large Installation Systems Adminstration Conference (LISA14), pp. 17–33. Usenix Association (2014)

  31. IPTables: http://en.wikipedia.org/wiki/iptables. Accessed 10 Nov 2014

  32. Anderson, P.: LCFG: A Practical Tool for System Configuration, Volume 17 of Short Topics in System Administration. Usenix Association (2008)

Download references

Acknowledgments

This work has been partially supported by an HP Labs Innovation Research Program Award, and we would like to thank Patrick Goldsack for his help in clarifying the SmartFrog semantics and implementation. It is also partially sponsored by the Air Force Office of Scientific Research, Air Force Material Command, USAF, under Grant Number FA8655-13-1-3006. The U.S. Government and University of Edinburgh are authorized to reproduce and distribute reprints for their purposes notwithstanding any copyright notation thereon.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Herry Herry.

Additional information

Herry Herry did part of the work for this paper while being a PhD student at School of Informatics, University of Edinburgh.

Appendices

Appendix 1: Concrete Syntax

$$\begin{aligned} \hbox {SF}&::= \hbox {B} \\ \hbox {B}&::= \hbox {A B} \,| \,\epsilon \\ \hbox {A}&::= \hbox {R V} \\ \hbox {P}&::= \hbox {R }|\, \texttt{\{ }\hbox { B }\texttt{\} } \\ \hbox {PS}&::= \hbox {P }(\texttt{,} \,\hbox {P})^* \,|\, \epsilon \\ \hbox {V}&::= \hbox {BV } \texttt{;} |\hbox { LR }\texttt{;} | \texttt{extends}\hbox { PS }\\ \hbox {R}&::= \hbox {I }(\texttt{:}\hbox { I})^* \\ \hbox {DR}&::= \texttt{DATA}\hbox { R} \\ \hbox {LR}&::= \hbox {R }\\ \hbox {Vec}&::= \texttt{[} (\hbox { BV }(\texttt{,}\hbox { BV})^* \,|\, \epsilon ) \texttt{]} \\ \hbox {Null}&::= \texttt{NULL} \\ \hbox {Bool}&::= \texttt{true} \,|\, \texttt{false} \\ \hbox {BV}&::= \hbox {Bool }|\hbox { Num }|\hbox { Str }|\hbox { DR }|\hbox { Vec }|\hbox { Null} \end{aligned}$$

Appendix 2: Manually Created Tests

The following examples show some of the manually-created test cases:

figure e

Appendix 3: Auto-Generated Tests

The following SF code is part of a randomly-generated, semantically-correct specification used for testing compatibility between the implementations:

figure f

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Anderson, P., Herry, H. A Formal Semantics for the SmartFrog Configuration Language. J Netw Syst Manage 24, 309–345 (2016). https://doi.org/10.1007/s10922-015-9351-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10922-015-9351-y

Keywords

Navigation