Skip to main content

2015 | OriginalPaper | Buchkapitel

Notions of Bidirectional Computation and Entangled State Monads

verfasst von : Faris Abou-Saleh, James Cheney, Jeremy Gibbons, James McKinna, Perdita Stevens

Erschienen in: Mathematics of Program Construction

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Bidirectional transformations (bx) support principled consistency maintenance between data sources. Each data source corresponds to one perspective on a composite system, manifested by operations to ‘get’ and ‘set’ a view of the whole from that particular perspective. Bx are important in a wide range of settings, including databases, interactive applications, and model-driven development. We show that bx are naturally modelled in terms of mutable state; in particular, the ‘set’ operations are stateful functions. This leads naturally to considering bx that exploit other computational effects too, such as I/O, nondeterminism, and failure, all largely ignored in the bx literature to date. We present a semantic foundation for symmetric bidirectional transformations with effects. We build on the mature theory of monadic encapsulation of effects in functional programming, develop the equational theory and important combinators for effectful bx, and provide a prototype implementation in Haskell along with several illustrative examples.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Abou-Saleh, F., Cheney, J., Gibbons, J., McKinna, J., Stevens, P.: Notions of bidirectional computation and entangled state monads. Technical report, TLCBX project (2015), extended version with proofs, available from http://arxiv.org/abs/1505.02579 Abou-Saleh, F., Cheney, J., Gibbons, J., McKinna, J., Stevens, P.: Notions of bidirectional computation and entangled state monads. Technical report, TLCBX project (2015), extended version with proofs, available from http://​arxiv.​org/​abs/​1505.​02579
2.
Zurück zum Zitat Abou-Saleh, F., McKinna, J.: A coalgebraic approach to bidirectional transformations (2014). Short presentation at CMCS Abou-Saleh, F., McKinna, J.: A coalgebraic approach to bidirectional transformations (2014). Short presentation at CMCS
3.
Zurück zum Zitat Brady, E.: Programming and reasoning with algebraic effects and dependent types. In: ICFP, pp. 133–144. ACM (2013) Brady, E.: Programming and reasoning with algebraic effects and dependent types. In: ICFP, pp. 133–144. ACM (2013)
4.
Zurück zum Zitat Cheney, J., McKinna, J., Stevens, P., Gibbons, J., Abou-Saleh, F.: Entangled state monads (abstract). In: Terwilliger and Hidaka [33] Cheney, J., McKinna, J., Stevens, P., Gibbons, J., Abou-Saleh, F.: Entangled state monads (abstract). In: Terwilliger and Hidaka [33]
5.
Zurück zum Zitat Cicchetti, A., Di Ruscio, D., Eramo, R., Pierantonio, A.: JTL: a bidirectional and change propagating transformation language. In: Malloy, B., Staab, S., van den Brand, M. (eds.) SLE 2010. LNCS, vol. 6563, pp. 183–202. Springer, Heidelberg (2011) CrossRef Cicchetti, A., Di Ruscio, D., Eramo, R., Pierantonio, A.: JTL: a bidirectional and change propagating transformation language. In: Malloy, B., Staab, S., van den Brand, M. (eds.) SLE 2010. LNCS, vol. 6563, pp. 183–202. Springer, Heidelberg (2011) CrossRef
6.
Zurück zum Zitat Czarnecki, K., Foster, J.N., Hu, Z., Lämmel, R., Schürr, A., Terwilliger, J.F.: Bidirectional transformations: a cross-discipline perspective. In: Paige, R.F. (ed.) ICMT 2009. LNCS, vol. 5563, pp. 260–283. Springer, Heidelberg (2009) CrossRef Czarnecki, K., Foster, J.N., Hu, Z., Lämmel, R., Schürr, A., Terwilliger, J.F.: Bidirectional transformations: a cross-discipline perspective. In: Paige, R.F. (ed.) ICMT 2009. LNCS, vol. 5563, pp. 260–283. Springer, Heidelberg (2009) CrossRef
7.
Zurück zum Zitat Diskin, Z., Xiong, Y., Czarnecki, K.: From state- to delta-based bidirectional model transformations: the asymmetric case. JOT 10(6), 1–25 (2011) Diskin, Z., Xiong, Y., Czarnecki, K.: From state- to delta-based bidirectional model transformations: the asymmetric case. JOT 10(6), 1–25 (2011)
9.
Zurück zum Zitat Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bidirectional tree transformations: A linguistic approach to the view update problem. In: POPL, pp. 233–246. ACM (2005) Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bidirectional tree transformations: A linguistic approach to the view update problem. In: POPL, pp. 233–246. ACM (2005)
10.
Zurück zum Zitat Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bidirectional tree transformations: A linguistic approach to the view-update problem. ACM TOPLAS 29(3), 17 (2007). Extended version of [9]CrossRefMATH Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bidirectional tree transformations: A linguistic approach to the view-update problem. ACM TOPLAS 29(3), 17 (2007). Extended version of [9]CrossRefMATH
11.
Zurück zum Zitat Gibbons, J., Hinze, R.: Just do it: Simple monadic equational reasoning. In: ICFP, pp. 2–14. ACM (2011) Gibbons, J., Hinze, R.: Just do it: Simple monadic equational reasoning. In: ICFP, pp. 2–14. ACM (2011)
12.
13.
Zurück zum Zitat Hofmann, M., Pierce, B.C., Wagner, D.: Symmetric lenses. In: POPL, pp. 371–384. ACM (2011) Hofmann, M., Pierce, B.C., Wagner, D.: Symmetric lenses. In: POPL, pp. 371–384. ACM (2011)
14.
Zurück zum Zitat Hofmann, M., Pierce, B.C., Wagner, D.: Edit lenses. In: POPL, pp. 495–508. ACM (2012) Hofmann, M., Pierce, B.C., Wagner, D.: Edit lenses. In: POPL, pp. 495–508. ACM (2012)
16.
Zurück zum Zitat Johnson, M., Rosebrugh, R.: Spans of lenses. In: Terwilliger and Hidaka [33] Johnson, M., Rosebrugh, R.: Spans of lenses. In: Terwilliger and Hidaka [33]
17.
Zurück zum Zitat Jones, M.P., Duponcheel, L.: Composing monads. Technical report RR-1004, DCS, Yale (1993) Jones, M.P., Duponcheel, L.: Composing monads. Technical report RR-1004, DCS, Yale (1993)
18.
Zurück zum Zitat Kagawa, K.: Compositional references for stateful functional programming. In: ICFP, pp. 217–226 (1997) Kagawa, K.: Compositional references for stateful functional programming. In: ICFP, pp. 217–226 (1997)
19.
Zurück zum Zitat Kammar, O., Lindley, S., Oury, N.: Handlers in action. In: ICFP, pp. 145–158. ACM (2013) Kammar, O., Lindley, S., Oury, N.: Handlers in action. In: ICFP, pp. 145–158. ACM (2013)
21.
Zurück zum Zitat Liang, S., Hudak, P., Jones, M.P.: Monad transformers and modular interpreters. In: POPL, pp. 333–343 (1995) Liang, S., Hudak, P., Jones, M.P.: Monad transformers and modular interpreters. In: POPL, pp. 333–343 (1995)
22.
Zurück zum Zitat Lüth, C., Ghani, N.: Composing monads using coproducts. In: ICFP, pp. 133–144. ACM (2002) Lüth, C., Ghani, N.: Composing monads using coproducts. In: ICFP, pp. 133–144. ACM (2002)
23.
Zurück zum Zitat Macedo, N., Cunha, A., Pacheco, H.: Toward a framework for multidirectional model transformations. In: Terwilliger and Hidaka [33] Macedo, N., Cunha, A., Pacheco, H.: Toward a framework for multidirectional model transformations. In: Terwilliger and Hidaka [33]
25.
Zurück zum Zitat Mossakowski, T., Schröder, L., Goncharov, S.: A generic complete dynamic logic for reasoning about purity and effects. FAC 22(3–4), 363–384 (2010)MATH Mossakowski, T., Schröder, L., Goncharov, S.: A generic complete dynamic logic for reasoning about purity and effects. FAC 22(3–4), 363–384 (2010)MATH
28.
Zurück zum Zitat Plotkin, G., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 342–356. Springer, Heidelberg (2002) CrossRefMATH Plotkin, G., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 342–356. Springer, Heidelberg (2002) CrossRefMATH
31.
Zurück zum Zitat Stevens, P.: Bidirectional model transformations in QVT: Semantic issues and open questions. SoSyM 9(1), 7–20 (2010) Stevens, P.: Bidirectional model transformations in QVT: Semantic issues and open questions. SoSyM 9(1), 7–20 (2010)
35.
Zurück zum Zitat Varró, D.: Model transformation by example. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 410–424. Springer, Heidelberg (2006) CrossRef Varró, D.: Model transformation by example. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 410–424. Springer, Heidelberg (2006) CrossRef
36.
Zurück zum Zitat Voigtländer, J., Hu, Z., Matsuda, K., Wang, M.: Enhancing semantic bidirectionalization via shape bidirectionalizer plug-ins. JFP 23(5), 515–551 (2013)MathSciNetMATH Voigtländer, J., Hu, Z., Matsuda, K., Wang, M.: Enhancing semantic bidirectionalization via shape bidirectionalizer plug-ins. JFP 23(5), 515–551 (2013)MathSciNetMATH
Metadaten
Titel
Notions of Bidirectional Computation and Entangled State Monads
verfasst von
Faris Abou-Saleh
James Cheney
Jeremy Gibbons
James McKinna
Perdita Stevens
Copyright-Jahr
2015
Verlag
Springer International Publishing
DOI
https://doi.org/10.1007/978-3-319-19797-5_9

Premium Partner