Skip to main content

SPO-Rewriting of Constrained Partial Algebras

  • Conference paper
  • First Online:
Software Technologies: Applications and Foundations (STAF 2016)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9946))

Abstract

Recently, single-pushout rewriting (SPO) has been applied to arbitrary partial algebras (PA). On the one hand, this allows a simple and straightforward integration of (base type) attributes into graph transformation. On the other hand, SPO-PA-rewriting comes equipped with an easy-to-check application condition, namely that an operation cannot be defined twice on the same set of arguments. This provides very natural termination criteria for example in model transformation.

In this paper, we generalise this approach to constrained partial algebras. We allow two different types of constraints, namely (i) requiring some operations to be total and (ii) enforcing some consistency conditions on the algebras by suitable conditional equations. We show that this generalisation again induces an easy to check application condition and provides considerably more expressive power: For example, constraints allow a straightforward algebraic model for the object-oriented concept of inheritance with runtime specialisation and generalisation of objects.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    For details compare [18].

  2. 2.

    Commutativity in the categorical sense.

  3. 3.

    By this definition, an operation symbol \(o\in O_{w,\epsilon }\) is interpreted in an algebra A as a partial operation into an one-element-set, i.e. \(o^{A}:A^{w}\rightarrow \{*\}\), which means that \(o^{A}\) singles out a sub-set of \(A^{w}\) only, namely the sub-set where it is defined. Hence, \(o^{A}\) is a predicate.

  4. 4.

    Given a sort indexed family of mappings \(\left( f_{s}:G_{s}\rightarrow H_{s}\right) _{s\in S}\), \(f^{w}:G^{w}\rightarrow H^{w}\) is recursively defined for every \(w\in S^{*}\) by (i) \(f^{\epsilon }=\left\{ \left( *,*\right) \right\} \), (ii) \(f^{w}=f_{s}\) if \(w=s\in S\), and (iii) \(f^{w}=f^{v}\times f^{u}\), if \(w=vu\).

  5. 5.

    This means that definedness in B stems from definedness in A.

  6. 6.

    A category \(\mathcal {S}\) is an epi-reflective sub-category of a category \(\mathcal {C}\), if it is a sub-category of \(\mathcal {C}\), i.e. \(\mathcal {S}\subseteq \mathcal {C}\), and for every object \(C\in \mathcal {C}\) there is a \(\mathcal {C}\)-epi-morphism \(\eta _{C}:C\twoheadrightarrow S\) such that \(S\in \mathcal {S}\) and for every morphism \(f:C\rightarrow S'\) with \(S'\in \mathcal {S}\), there is a unique morphism \(f^{*}:S\rightarrow S'\) with \(f^{*}\circ \eta _{C}=f\). For the results about epi-reflection, compare [21] for the total case and [1] for the partial case. They can also be found in [14].

  7. 7.

    Compare [1, 14].

  8. 8.

    \(\mathrm {d}_{i}^{o}\) and \(\mathrm {c}_{i}^{o}\) are short for i-th domain respectively co-domain of operation o.

  9. 9.

    A signature \(\varSigma =\left( S,O\right) \) is a graph structure, if it contains unary operation symbols only, i.e. \(O_{w,v}=\emptyset \), if \(\left| w\right| =0\) or \(\left| w\right| \ge 2\). It is hierarchical, if there is no family \(\left( o_{i}\in O_{s_{i},v_{i}}\right) _{i\in \mathbb {N}}\), such that, for all \(i\in \mathbb {N}\), \(v_{i}=x_{i}s_{i+1}y_{i}\) with \(x_{i},y_{i}\in S^{*}\).

  10. 10.

    It is well-known that \(\mathcal {G}_{\varSigma }\) is complete and co-complete.

  11. 11.

    Note that all operations in \(\gamma (A)\) are just projections!

  12. 12.

    A functor \(\gamma :\mathcal {A}\rightarrow \mathcal {B}\) between categories \(\mathcal {A}\) and \(\mathcal {B}\) is isomorphism-dense, if for every \(B\in \mathcal {B}\) there is \(A\in \mathcal {A}\) such that \(\gamma (A)\cong B\).

  13. 13.

    Note that this visualisation suggests that the constraints in \(\mathcal {U}\) can be interpreted as total and non-injective SPO graph rewriting rules. Indeed, applying these rules until every further application leads to an identity trace, provides a constructive way to “execute” the reflection from \(\mathcal {G}_{\varSigma }\) to \(\mathcal {A}_{\varSigma }\).

  14. 14.

    Compare for example [13].

  15. 15.

    For details on hereditary pushouts see [11, 12].

  16. 16.

    Recall that \(\mathcal {G}_{\varSigma }\) is the underlying graph structure of \(\mathcal {P}_{\varSigma }\).

  17. 17.

    Cacade-on-delete is a notion well-known from relational databases: If a row in a relation is deleted, all rows pointing directly or indirectly to it by foreign keys are deleted as well. SPO-rewriting provides exactly the same effect: If a vertex is deleted all edges adjacent to the vertex are deleted as well. In arbitrary graph structure this effect can cascade as well, if we have more than 2 hierarchy levels, see [13] for details.

  18. 18.

    Compare [4, 8, 9, 17] for the double-pushout, [6, 16] for the single-pushout, and [15] for the sesqui-pushout approach.

  19. 19.

    For example, the total term algebra is infinite, if we have a single sort (Nat) with a constant (zero) and an unary operation (successor). In partial algebras, the constant need not be defined and the unary operation need not be defined everywhere. Thus, we can define them as far as they are used in the rule (e. g. to denote constants) and leave them undefined for all values that are not mentioned in the rule.

  20. 20.

    Note that we indicate the constraint that an operation is total by underlining the operation name.

  21. 21.

    Note that the attribute automatically becomes final, if we model it by a total operation.

  22. 22.

    Set semantics.

  23. 23.

    Multi-set semantics.

  24. 24.

    Note again that the association becomes final, if we model it by a total operation.

  25. 25.

    Runtime means here: In the rewrite process.

  26. 26.

    Note that the rule first generalises the manipulated object by deleting the Link-part. Afterwards it specialises the manipulated object by adding a new File-part.

  27. 27.

    Note that standard SPO-Rewriting on multi-graphs turns out to be a special case of the set-up presented in this paper: The underlying category is defined by a signature with two sorts, i.e. vertives V and edges E, and two unary operations \(\texttt {\underline{source}}{} \texttt {,}{} \texttt {\underline{target}}{\texttt {:E}}\rightarrow \) V that are required to be total.

References

  1. Burmeister, P.: Introduction to Theory and Application of Partial Algebras - Part I. Mathematical Research, vol. 32. Akademie-Verlag, Berlin (1986)

    MATH  Google Scholar 

  2. Burmeister, P., Monserrat, M., Rosselló, F., Valiente, G.: Algebraic transformation of unary partial algebras II: single-pushout approach. Theor. Comput. Sci. 216(1–2), 311–362 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  3. Burmeister, P., Rosselló, F., Torrens, J., Valiente, G.: Algebraic transformation of unary partial algebras I: double-pushout approach. Theor. Comput. Sci. 184(1–2), 145–193 (1997)

    Article  MATH  Google Scholar 

  4. Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, Heidelberg (2006)

    MATH  Google Scholar 

  5. Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.): ICGT 2012. LNCS, vol. 7562. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33654-6

    Google Scholar 

  6. Lüdtke Ferreira, A.P., Ribeiro, L.: Derivations in object-oriented graph grammars. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 416–430. Springer, Heidelberg (2004). doi:10.1007/978-3-540-30203-2_29

    Chapter  Google Scholar 

  7. Golas, U.: A general attribution concept for models in \(\cal{M}\)-adhesive transformation systems. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2012. LNCS, vol. 7562, pp. 187–202. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33654-6_13

    Chapter  Google Scholar 

  8. Golas, U., Lambers, L., Ehrig, H., Orejas, F.: Attributed graph transformation with inheritance: Efficient conflict detection and local confluence analysis using abstract critical pairs. Theor. Comput. Sci. 424, 46–68 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  9. Guerra, E., de Lara, J.: Attributed typed triple graph transformation with inheritance in the double pushout approach. Technical report UC3M-TR-CS-06-01, Universidad Carlos III de Madrid (2006)

    Google Scholar 

  10. Habel, A., Plump, D.: \(\cal{M}\), \(\cal{N}\)-Adhesive Transformation Systems. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2012. LNCS, vol. 7562, pp. 218–233. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33654-6_15

    Chapter  Google Scholar 

  11. Heindel, T.: Hereditary pushouts reconsidered. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010. LNCS, vol. 6372, pp. 250–265. Springer, Heidelberg (2010). doi:10.1007/978-3-642-15928-2_17

    Chapter  Google Scholar 

  12. Kennaway, R.: Graph rewriting in some categories of partial morphisms. In: Ehrig, H., Kreowski, H.-J., Rozenberg, G. (eds.) Graph Grammars 1990. LNCS, vol. 532, pp. 490–504. Springer, Heidelberg (1991). doi:10.1007/BFb0017408

    Chapter  Google Scholar 

  13. Löwe, M.: Algebraic approach to single-pushout graph transformation. Theor. Comput. Sci. 109(1&2), 181–224 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  14. Löwe, M.L: Algebraic systems, June 2015. http://ux-02.ha.bib.de/daten/Lowe/Master/TheorieInformationssystem/Algebra20150606.pdf

  15. Löwe, M.: Polymorphic sesqui-pushout graph rewriting. In: Parisi-Presicce, F., Westfechtel, B. (eds.) ICGT 2015. LNCS, vol. 9151, pp. 3–18. Springer, Heidelberg (2015). doi:10.1007/978-3-319-21145-9_1

    Chapter  Google Scholar 

  16. Löwe, M., König, H., Schulz, C.: Polymorphic single-pushout graph transformation. In: Gnesi, S., Rensink, A. (eds.) FASE 2014. LNCS, vol. 8411, pp. 355–369. Springer, Heidelberg (2014). doi:10.1007/978-3-642-54804-8_25

    Chapter  Google Scholar 

  17. Löwe, M., König, H., Schulz, C., Schultchen, M.: Algebraic graph transformations with inheritance and abstraction. Sci. Comput. Program. 107–108, 2–18 (2015)

    Article  MATH  Google Scholar 

  18. Löwe, M., Tempelmeier, M.: On single-pushout rewriting of partial algebras. In: ECEASST, vol. 73 (2016)

    Google Scholar 

  19. Monserrat, M., Rossello, F., Torrens, J., Valiente, G.: Single pushout rewriting in categories of spans I: The general setting. Technical report LSI-97-23-R, Department de Llenguatges i Sistemes Informtics, Universitat Politcnica de Catalunya (1997)

    Google Scholar 

  20. Tempelmeier, M., Löwe, M.: Single-pushout transformation partieller algebren. Technical report 2015/1, FHDW-Hannover (2015). (in German)

    Google Scholar 

  21. Wechler, W.: Universal Algebra for Computer Scientists. EATCS Monographs on Theoretical Computer Science, vol. 25. Springer, Heidelberg (1992)

    Book  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Löwe .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing AG

About this paper

Cite this paper

Löwe, M. (2016). SPO-Rewriting of Constrained Partial Algebras. In: Milazzo, P., Varró, D., Wimmer, M. (eds) Software Technologies: Applications and Foundations. STAF 2016. Lecture Notes in Computer Science(), vol 9946. Springer, Cham. https://doi.org/10.1007/978-3-319-50230-4_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-50230-4_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-50229-8

  • Online ISBN: 978-3-319-50230-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics