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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 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.
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.
To restore invariance is sometimes used as a synonym to resolving violations. Consequently, a rule is sometimes called invariant.
- 4.
Thanks to Elleke Baecke for pointing us towards this source.
- 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.
Note that we use the notion “the phrase of a placeholder” to indicate a pair from \({{ phrase}}^{\smile };{ placeholder}\).
- 7.
Ins and Del are called each others duals.
- 8.
This is (unsubstantiated) experience collected from projects we have done with Ampersand.
- 9.
e.g. patents DE60218042D, WO2006126875, EP1727327, WO2004046848, EP1563361, NL1023394C, EP1420323, WO03007571, and NL1013450C.
References
ANSI, INCITS 359: Information Technology: Role Based Access Control Document Number: ANSI/INCITS 359–2004. InterNational Committee for Information Technology Standards (formerly NCITS) (2004)
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
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
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
Boehm, B.W.: Software Engineering Economics. Advances in Computing Science and Technology. Prentice Hall PTR, Upper Saddle River (1981)
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
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
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
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)
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)
Jackson, D.: A comparison of object modelling notations: Alloy, UML and Z. Technical report (1999). http://sdg.lcs.mit.edu/publications.html
Jones, C.B.: Systematic Software Development Using VDM. Prentice Hall International (UK) Ltd., Hertfordshire (1986)
Joosten, S., Wedemeijer, L., Michels, G.: Rule Based Design. Open Universiteit, Heerlen (2013)
Jackson, D.: Software Abstractions: Logic, Language, and Analysis. The MIT Press, Cambridge (2006)
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)
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
Lind, D.: Logic and Legal Reasoning. The National Judicial College Press, Beijing (2007)
Lloyd, J.W.: Foundations of Logic Programming. Springer, New York (1984)
Maddux, R.: Relation Algebras. Elsevier Science, Studies in Logic and the Foundations of Mathematics (2006)
Michels, G.: Development environment for rule-based prototyping. Ph.D. thesis, Open University of the Netherlands (2015)
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
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
Prakken, H.: Ai & law, logic and argument schemes. Argumentation 19(3), 303–320 (2005). doi:10.1007/s10503-005-4418-7
Roscoe, A.W., Hoare, C.A.R., Bird, R.: The Theory and Practice of Concurrency. Prentice Hall PTR, Upper Saddle River (1997)
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
Spivey, J.: The Z Notation: A Reference Manual. International Series in Computer Science, 2nd edn. Prentice Hall, New York (1992)
Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley Professional, Boston (1997)
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
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
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
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
Verheij, B.: Virtual Arguments. On the Design of Argument Assistants for Lawyers and Other Arguers. T.M.C. Asser Press, The Hague (2005)
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
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
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)