Skip to main content

Software Development in Relation Algebra with Ampersand

  • Conference paper
  • First Online:
Book cover Relational and Algebraic Methods in Computer Science (RAMICS 2017)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10226))

Abstract

Relation Algebra can be used as a programming language for building information systems. This paper presents a case study to demonstrate this principle. We have developed a database-application for legal reasoning as a case study, of which a small part is discussed in this paper to illustrate the mechanisms of programming in Relation Algebra. Beside being declarative, relation algebra comes with attractive promises for developing big software. The compiler that was used for this case study, Ampersand, is the result of an open source project. Ampersand has been tried and tested in practice and is available as free open source software.

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.

    A brief is a document that is meant to summarize a lawsuit for the judge and counterparty. It provides legal reasons for claims in a lawsuit based on regulations, precedents, and other legally acceptable sources. It shows how the reasoning applies to facts from the case.

  2. 2.

    Ampersand generates an application that consists of a relational database and interface components. Currently this application runs server-side on a PHP/MySQL platform and on a web-browser on the client-side.

  3. 3.

    To restore invariance is sometimes used as a synonym to resolving violations. Consequently, a rule is sometimes called invariant.

  4. 4.

    Thanks to Elleke Baecke for pointing us towards this source.

  5. 5.

    This type of statement is typical for cases. It is valid only in the case where this particular John Brown is known. In other cases, where John Brown is unknown, this statement is meaningless.

  6. 6.

    Note that we use the notion “the phrase of a placeholder” to indicate a pair from \({{ phrase}}^{\smile };{ placeholder}\).

  7. 7.

    Ins and Del are called each others duals.

  8. 8.

    This is (unsubstantiated) experience collected from projects we have done with Ampersand.

  9. 9.

    e.g. patents DE60218042D, WO2006126875, EP1727327, WO2004046848, EP1563361, NL1023394C, EP1420323, WO03007571, and NL1013450C.

References

  1. ANSI, INCITS 359: Information Technology: Role Based Access Control Document Number: ANSI/INCITS 359–2004. InterNational Committee for Information Technology Standards (formerly NCITS) (2004)

    Google Scholar 

  2. Backus, J.: Can programming be liberated from the von Neumann style?: A functional style and its algebra of programs. Commun. ACM 21(8), 613–641 (1978). doi:10.1145/359576.359579

    Article  MathSciNet  MATH  Google Scholar 

  3. Berghammer, R., Ehler, H., Zierer, H.: Towards an algebraic specification of code generation. Sci. Comput. Program. 11(1), 45–63 (1988). doi:10.1016/0167-6423(88)90064-0

    Article  MathSciNet  MATH  Google Scholar 

  4. Berghammer, R., Neumann, F.: RelView – an OBDD-based computer algebra system for relations. In: Ganzha, V.G., Mayr, E.W., Vorozhtsov, E.V. (eds.) CASC 2005. LNCS, vol. 3718, pp. 40–51. Springer, Heidelberg (2005). doi:10.1007/11555964_4

    Chapter  Google Scholar 

  5. Boehm, B.W.: Software Engineering Economics. Advances in Computing Science and Technology. Prentice Hall PTR, Upper Saddle River (1981)

    MATH  Google Scholar 

  6. Codd, E.F.: A relational model of data for large shared data banks. Commun. ACM 13(6), 377–387 (1970). http://doi.acm.org/10.1145/362384.362685

    Article  MATH  Google Scholar 

  7. Hanenberg, S., Kleinschmager, S., Robbes, R., Tanter, É., Stefik, A.: An empirical study on the impact of static typing on software maintainability. Empirical Softw. Eng. 19(5), 1335–1382 (2014). doi:10.1007/s10664-013-9289-1

    Article  Google Scholar 

  8. Harms, D., Fiske, B.C., Rice, J.C.: Web Site Programming With Java. McGraw-Hill, New York City (1996). http://www.incunabula.com/websitejava/index.html

    Google Scholar 

  9. IEEE: Architecture Working Group of the Software Engineering Committee: Standard 1471–2000: Recommended Practice for Architectural Description of Software Intensive Systems. IEEE Standards Department (2000)

    Google Scholar 

  10. ISO: ISO 8807: Information processing systems - open systems interconnection - LOTOS - a formal description technique based on the temporal ordering of observational behaviour. Standard, International Standards Organization, Geneva, Switzerland. 1st edn. (1987)

    Google Scholar 

  11. Jackson, D.: A comparison of object modelling notations: Alloy, UML and Z. Technical report (1999). http://sdg.lcs.mit.edu/publications.html

  12. Jones, C.B.: Systematic Software Development Using VDM. Prentice Hall International (UK) Ltd., Hertfordshire (1986)

    MATH  Google Scholar 

  13. Joosten, S., Wedemeijer, L., Michels, G.: Rule Based Design. Open Universiteit, Heerlen (2013)

    Google Scholar 

  14. Jackson, D.: Software Abstractions: Logic, Language, and Analysis. The MIT Press, Cambridge (2006)

    Google Scholar 

  15. Joosten, S.J.C.: Parsing and printing of and with triples. In: Pous, D., Struth, G., Höfner, P. (eds.) RAMiCS 2017. LNCS, vol. 10226, pp. 159–176. Springer International Publishing, Berlin (2017)

    Google Scholar 

  16. Joosten, S.M.M., Joosten, S.J.C.: Type checking by domain analysis in ampersand. In: Kahl, W., Winter, M., Oliveira, J.N. (eds.) RAMICS 2015. LNCS, vol. 9348, pp. 225–240. Springer, Cham (2015). doi:10.1007/978-3-319-24704-5_14

    Chapter  Google Scholar 

  17. Lind, D.: Logic and Legal Reasoning. The National Judicial College Press, Beijing (2007)

    Google Scholar 

  18. Lloyd, J.W.: Foundations of Logic Programming. Springer, New York (1984)

    Book  MATH  Google Scholar 

  19. Maddux, R.: Relation Algebras. Elsevier Science, Studies in Logic and the Foundations of Mathematics (2006)

    Google Scholar 

  20. Michels, G.: Development environment for rule-based prototyping. Ph.D. thesis, Open University of the Netherlands (2015)

    Google Scholar 

  21. Michels, G., Joosten, S., van der Woude, J., Joosten, S.: Ampersand. In: Swart, H. (ed.) RAMICS 2011. LNCS, vol. 6663, pp. 280–293. Springer, Heidelberg (2011). doi:10.1007/978-3-642-21070-9_21

    Chapter  Google Scholar 

  22. Petersen, P., Hanenberg, S., Robbes, R.: An empirical comparison of static and dynamic type systems on API usage in the presence of an IDE: Java vs. groovy with eclipse. In: Proceedings of the 22nd International Conference on Program Comprehension, ICPC 2014, pp. 212–222. ACM, New York (2014). doi:10.1145/2597008.2597152

  23. Prakken, H.: Ai & law, logic and argument schemes. Argumentation 19(3), 303–320 (2005). doi:10.1007/s10503-005-4418-7

    Article  Google Scholar 

  24. Roscoe, A.W., Hoare, C.A.R., Bird, R.: The Theory and Practice of Concurrency. Prentice Hall PTR, Upper Saddle River (1997)

    Google Scholar 

  25. Schmidt, G., Hattensperger, C., Winter, M.: Heterogeneous relation algebra. In: Brink, C., Kahl, W., Schmidt, G. (eds.) Relational Methods in Computer Science, pp. 39–53. Springer, New York (1997). ISBN 3-211-82971-7

    Chapter  Google Scholar 

  26. Spivey, J.: The Z Notation: A Reference Manual. International Series in Computer Science, 2nd edn. Prentice Hall, New York (1992)

    MATH  Google Scholar 

  27. Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley Professional, Boston (1997)

    MATH  Google Scholar 

  28. Swart, H., Berghammer, R., Rusinowska, A.: Computational social choice using relation algebra and relview. In: Berghammer, R., Jaoua, A.M., Möller, B. (eds.) RelMiCS 2009. LNCS, vol. 5827, pp. 13–28. Springer, Heidelberg (2009). doi:10.1007/978-3-642-04639-1_2

    Chapter  Google Scholar 

  29. Toulmin, S.E.: The Uses of Argument. Cambridge University Press, Cambridge (1958). http://www.amazon.com/exec/obidos/redirect?tag=citeulike-20&path=ASIN/0521534836

  30. Verheij, B.: Automated argument assistance for lawyers. In: Proceedings of the 7th International Conference on Artificial Intelligence and Law, ICAIL 1999, pp. 43–52. ACM, New York (1999). doi:10.1145/323706.323714

  31. Verheij, B.: Artificial argument assistants for defeasible argumentation. Artif. Intell. 150(1), 291–324 (2003). doi:10.1016/S0004-3702(03)00107-3. http://www.sciencedirect.com/science/article/pii/S0004370203001073

    Article  Google Scholar 

  32. Verheij, B.: Virtual Arguments. On the Design of Argument Assistants for Lawyers and Other Arguers. T.M.C. Asser Press, The Hague (2005)

    Google Scholar 

  33. Vicknair, C., Macias, M., Zhao, Z., Nan, X., Chen, Y., Wilkins, D.: A comparison of a graph database and a relational database: a data provenance perspective. In: Proceedings of the 48th Annual Southeast Regional Conference, ACM SE 2010, pp. 42:1–42:6. ACM, New York (2010). doi:10.1145/1900008.1900067

  34. van der Woude, J., Joosten, S.: Relational heterogeneity relaxed by subtyping. In: Swart, H. (ed.) RAMICS 2011. LNCS, vol. 6663, pp. 347–361. Springer, Heidelberg (2011). doi:10.1007/978-3-642-21070-9_25

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stef Joosten .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Joosten, S. (2017). Software Development in Relation Algebra with Ampersand. In: Höfner, P., Pous, D., Struth, G. (eds) Relational and Algebraic Methods in Computer Science. RAMICS 2017. Lecture Notes in Computer Science(), vol 10226. Springer, Cham. https://doi.org/10.1007/978-3-319-57418-9_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-57418-9_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-57417-2

  • Online ISBN: 978-3-319-57418-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics