A Branding Strategy for Business Types

  • Avraham Shinnar
  • Jérôme SiméonEmail author
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9600)


In the course of building a compiler from business rules to a database run-time, we encounter the need for a type system that includes a class hierarchy and subtyping in the presence of complex record operations. Since our starting point is based on structural typing and targets a data-centric language, we develop an approach inspired by Wadler’s work on XML types (Siméon and Wadler 2003). Our proposed type system has strong similarities with branded or tagged objects, combining nominal and structural typing, and is designed to support a rich set of operations on records commonly found in database languages. We show soundness of the type system and illustrate its use on two of the intermediate languages involved in our compiler for business rules: a calculus for pattern matching with aggregation (CAMP) that captures rules semantics, and the nested relational algebra (NRA) used for optimization and code generation. We show type soundness for both languages. The approach and correctness proofs are fully mechanized using the Coq proof-assistant.


Type System Business Rule Typing Rule Class Hierarchy Record Type 
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.



We want to thank Joshua Auerbach, Martin Hirzel, and Louis Mandel, for their feedback on earlier versions of this draft.

Supplementary material


  1. Alagic, S.: Type-checking OQL queries in the ODMG type systems. ACM Trans. Database Syst. 24(3), 319–360 (1999)CrossRefGoogle Scholar
  2. Armbrust, M., Xin, R.S., Lian, C., Huai, Y., Liu, D., Bradley, J.K., Meng, X., Kaftan, T., Franklin, M.J., Ghodsi, A., et al.: Spark SQL: relational data processing in Spark. In: Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pp. 1383–1394 (2015)Google Scholar
  3. Arnold, M., Grove, D., Herta, B., Hind, M., Hirzel, M., Iyengar, A., Mandel, L., Saraswat, V.A., Shinnar, A., Siméon, J., Takeuchi, M., Tardieu, O., Zhang, W.: META: middleware for events, transactions, and analytics. IBM J. Res. Devel. (IBMRD). (2016, to appear)Google Scholar
  4. Bali, M.: Drools JBoss Rules 5.0 Developer’s Guide. Packt Publishing, Birmingham (2009)Google Scholar
  5. Beeri, C., Kornatzky, Y.: Algebraic optimization of object-oriented query languages. Theor. Comput. Sci. 116(1&2), 59–94 (1993)MathSciNetCrossRefzbMATHGoogle Scholar
  6. Berler, M., Cattell, R.G.G., Barry, D.K.: The Object Data Standard: ODMG 3.0. Morgan Kaufmann, San Francisco (2000)Google Scholar
  7. Boyer, J., Mili, H.: IBM websphere ILOG JRules. In: Boyer, J., Mili, H. (eds.) Agile Business Rule Development, pp. 215–242. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  8. Cheney, J., Lindley, S., Wadler, P.: A practical theory of language-integrated query. In: International Conference on Functional Programming (ICFP), pp. 403–416 (2013)Google Scholar
  9. Claußen, J., Kemper, A., Moerkotte, G., Peithner, K.: Optimizing queries with universal quantification in object-oriented and object-relational databases. In: Proceedings of the 23rd International Conference on Very Large Data Bases (VLDB), pp. 286–295 (1997)Google Scholar
  10. Cluet, S., Moerkotte, G.: Nested queries in object bases. In: Workshop on Database Programming Languages (DBPL), pp. 226–242 (1993)Google Scholar
  11. Cooper, E., Lindley, S., Yallop, J.: Links: web programming without tiers. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2006. LNCS, vol. 4709, pp. 266–296. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. Fegaras, L., Maier, D.: Optimizing object queries using an effective calculus. ACM Trans. Database Syst. (TODS) 25(4), 457–516 (2000)CrossRefzbMATHGoogle Scholar
  13. Forgy, C.L.: OPS5 user’s manual. Technical report. 2397, CMU (1981)Google Scholar
  14. Green, T.J., Aref, M., Karvounarakis, G.: LogicBlox, platform and language: a tutorial. In: Barceló, P., Pichler, R. (eds.) Datalog 2.0 2012. LNCS, vol. 7494, pp. 1–8. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  15. Grust, T., Mayr, M., Rittinger, J., Schreiber, T.: Ferry: Database-supported program execution. In: International Conference on Management of Data (SIGMOD), pp. 1063–1066 (2009)Google Scholar
  16. Jones, T., Homer, M., Noble, J.: Brand objects for nominal typing. In: 29th European Conference on Object-Oriented Programming, ECOOP 2015, 5–10 July 2015, Prague, Czech Republic, pp. 198–221 (2015)Google Scholar
  17. Lee, J., Aldrich, J., Shaw, T., Potanin, A.: A theory of tagged objects. In: 29th European Conference on Object-Oriented Programming, ECOOP 2015, 5–10 July 2015, Prague, Czech Republic (2015)Google Scholar
  18. May, N., Helmer, S., Moerkotte, G.: Strategies for query unnesting in XML databases. Trans. Database Syst. (TODS) 31(3), 968–1013 (2006)CrossRefGoogle Scholar
  19. Meijer, E., Beckman, B., Bierman, G.: Linq: reconciling object, relations and XML in the.NET framework. In: Proceedings of the 2006 ACM SIGMOD International Conference on Management of Data, pp. 706–706 (2006)Google Scholar
  20. Shinnar, A., Siméon, J., Hirzel, M.: A pattern calculus for rule languages: expressiveness, compilation, and mechanization. In: 29th European Conference on Object-Oriented Programming, ECOOP 2015, 5–10 July 2015, Prague, Czech Republic, pp. 542–567 (2015)Google Scholar
  21. Siméon, J., Wadler, P.: The essence of XML. In: The 30th SIGPLAN-SIGACT Symposium on Principles of Programming Languages, New Orleans, Louisisana, USA, 15–17 January 2003, pp. 1–13 (2003)Google Scholar
  22. Tannen, V., Buneman, P., Wong, L.: Naturally embedded query languages. In: Hull, R., Biskup, J. (eds.) ICDT 1992. LNCS, vol. 646, pp. 140–154. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  23. Trigoni, A., Bierman, G.: Inferring the principal type and the schema requirements of an OQL query. In: Read, B. (ed.) BNCOD 2001. LNCS, vol. 2097, pp. 185–201. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  24. Trinder, P., Wadler, P.: List comprehensions and the relational calculus. In: Proceedings of 1988 Glasgow Workshop on Functional Programming, Rothesay, Scotland, pp. 115–123, August 1988Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.IBM ResearchYorktown HeightsUSA

Personalised recommendations