Take Command of Your Constraints!

  • Sung-Shik T. Q. Jongmans
  • Farhad Arbab
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9037)


Constraint automata (CA) are a coordination model based on finite automata on infinite words. Although originally introduced for compositional modeling of coordinators, an interesting new application of CA is actually implementing coordinators (i.e., compiling CA to executable code). Such an approach guarantees correctness-by-construction and can even yield code that outperforms hand-crafted code. The extent to which these two potential advantages arise depends on the smartness of CA-compilers and the existence of proofs of their correctness.

We present and prove the correctness of a critical optimization for CA-compilers: a sound and complete translation from declarative constraints in transition labels to imperative commands in a sequential language. This optimization avoids expensive calls to a constraint solver at run-time, otherwise performed each time a transition fires, and thereby significantly improves the performance of generated coordination code.


Data Item Free Variable Failure Statement Precedence Relation Constraint Solver 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Jongmans, S.-S.T.Q., Halle, S., Arbab, F.: Automata-Based Optimization of Interaction Protocols for Scalable Multicore Platforms. In: Kühn, E., Pugliese, R. (eds.) COORDINATION 2014. LNCS, vol. 8459, pp. 65–82. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  2. 2.
    Jongmans, S.S., Halle, S., Arbab, F.: Reo: A Dataflow Inspired Language for Multicore. In: DFM, 42–50. IEEE (2013)Google Scholar
  3. 3.
    Baier, C., Sirjani, M., Arbab, F., Rutten, J.: Modeling component connectors in Reo by constraint automata. SCP 61, 75–113 (2006)zbMATHMathSciNetGoogle Scholar
  4. 4.
    Wegner, P.: Coordination as Constrained Interaction (Extended Abstract). In: Hankin, C., Ciancarini, P. (eds.) COORDINATION 1996. LNCS, vol. 1061, pp. 28–33. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  5. 5.
    Jongmans, S.-S.T.Q., Arbab, F.: Global consensus through local synchronization. In: Canal, C., Villari, M. (eds.) ESOCC 2013. CCIS, vol. 393, pp. 174–188. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  6. 6.
    Jongmans, S.S., Arbab, F.: Toward Sequentializing Overparallelized Protocol Code. In: ICE. EPTCS, vol. 166. CoRR, 38–44 (2014)Google Scholar
  7. 7.
    Jongmans, S.-S., Santini, F., Arbab, F.: Partially-Distributed Coordination with Reo. In: PDP 2014, pp. 697–706. IEEE (2014)Google Scholar
  8. 8.
    Arbab, F.: Reo: a channel-based coordination model for component composition. MSCS 14(3), 329–366 (2004)zbMATHMathSciNetGoogle Scholar
  9. 9.
    Arbab, F.: Puff, The Magic Protocol. In: Agha, G., Danvy, O., Meseguer, J. (eds.) Formal Modeling: Actors, Open Systems, Biological Systems. LNCS, vol. 7000, pp. 169–206. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  10. 10.
    Arbab, F., Kokash, N., Meng, S.: Towards Using Reo for Compliance-Aware Business Process Modeling. In: Margaria, T., Steffen, B. (eds.) ISoLA 2008. CCIS, vol. 17, pp. 108–123. Springer, Heidelberg (2008)Google Scholar
  11. 11.
    Changizi, B., Kokash, N., Arbab, F.: A Unified Toolset for Business Process Model Formalization. In: Buhnova, B., Happe, J. (eds.) FESCA 2010, pp. 147–156 (2010)Google Scholar
  12. 12.
    Meng, S., Arbab, F., Baier, C.: Synthesis of Reo circuits from scenario-based interaction specifications. SCP 76(8), 651–680 (2011)zbMATHGoogle Scholar
  13. 13.
    Bliudze, S., Sifakis, J.: Causal semantics for the algebra of connectors. FMSD 36(2), 167–194 (2010)zbMATHGoogle Scholar
  14. 14.
    Jongmans, S.S., Arbab, F.: Take Command of Your Constraints (Technical Report). Technical Report FM-1501, CWI (2015)Google Scholar
  15. 15.
    Russell, S., Norvig, P.: Artificial Intelligence, 2nd edn. Prentice-Hall (2003)Google Scholar
  16. 16.
    Apt, K., de Boer, F., Olderog, E.-R.: Verification of Sequential and Concurrent Programs, 3rd edn. Springer (2009)Google Scholar
  17. 17.
    Hoare, T.: An Axiomatic Basis for Computer Programming. CACM 12(10), 576–580 (1969)CrossRefzbMATHGoogle Scholar
  18. 18.
    Kahn, A.: Topological Sorting in Large Networks. CACM 5(11), 558–562 (1962)CrossRefzbMATHGoogle Scholar
  19. 19.
    Knuth, D.: Fundamental Algorithms, 3rd edn. The Art of Computer Programming, vol. 1. Addison-Wesley (1997)Google Scholar
  20. 20.
    Korte, B., Vygen, J.: Combinatorial Optimization: Theory and Algorithms, 4th edn. Algorithms and Combinatorics, vol. 21. Springer (2008)Google Scholar
  21. 21.
    Gallo, G., Longo, G., Pallottino, S., Nguyen, S.: Directed hypergraphs and applications. DAM 42, 177–201 (1993)zbMATHMathSciNetGoogle Scholar
  22. 22.
    Woeginger, G.: The complexity of finding arborescences in hypergraphs. IPL 44, 161–164 (1992)CrossRefzbMATHMathSciNetGoogle Scholar
  23. 23.
    Ausiello, G., Franciosa, P.G., Frigioni, D.: Directed Hypergraphs: Problems, Algorithmic Results, and a Novel Decremental Approach. In: Restivo, A., Ronchi Della Rocca, S., Roversi, L. (eds.) ICTCS 2001. LNCS, vol. 2202, pp. 312–328. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  24. 24.
    Apt, K.: Principles of Constraint Programming. Cambridge University Press (2009)Google Scholar
  25. 25.
    Bessière, C., Meseguer, P., Freuder, E., Larrosa, J.: On forward checking for non-binary constraint satisfaction. Artificial Intelligence 141, 205–224 (2002)CrossRefzbMATHMathSciNetGoogle Scholar
  26. 26.
    McGregor, J.: Relational consistency algorithms and their application in finding subgraph and graph isomorphism. Information Science 19, 229–250 (1979)CrossRefzbMATHMathSciNetGoogle Scholar
  27. 27.
    Clarke, D., Proença, J., Lazovik, A., Arbab, F.: Channel-based coordination via constraint satisfaction. SCP 76(8), 681–710 (2011)zbMATHGoogle Scholar
  28. 28.
    Proença, J., Clarke, D.: Data Abstraction in Coordination Constraints. In: Canal, C., Villari, M. (eds.) ESOCC 2013. CCIS, vol. 393, pp. 159–173. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  29. 29.
    Proença, J., Clarke, D.: Interactive Interaction Constraints. In: De Nicola, R., Julien, C. (eds.) COORDINATION 2013. LNCS, vol. 7890, pp. 211–225. Springer, Heidelberg (2013)CrossRefGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2015

Authors and Affiliations

  1. 1.Centrum Wiskunde and InformaticaAmsterdamThe Netherlands

Personalised recommendations