Abstract
Simulation of legal policies is an important decision-support tool in domains such as taxation. The primary goal of legal policy simulation is predicting how changes in the law affect measures of interest, e.g., revenue. Legal policy simulation is currently implemented using a combination of spreadsheets and software code. Such a direct implementation poses a validation challenge. In particular, legal experts often lack the necessary software background to review complex spreadsheets and code. Consequently, these experts currently have no reliable means to check the correctness of simulations against the requirements envisaged by the law. A further challenge is that representative data for simulation may be unavailable, thus necessitating a data generator. A hard-coded generator is difficult to build and validate. We develop a framework for legal policy simulation that is aimed at addressing the challenges above. The framework uses models for specifying both legal policies and the probabilistic characteristics of the underlying population. We devise an automated algorithm for simulation data generation. We evaluate our framework through a case study on Luxembourg’s Tax Law.
Similar content being viewed by others
Notes
This profile is not to be confused with the profile that we present in Sect. 5 for extending domain models with probabilistic information.
We note that the traversal strategy of Alg. 1, discussed in Sect. 6.4, ensures that associations that have an end with a cardinality of 1, 0..1, 1..n or \(1..*\) will satisfy the multiplicity constraints. We further note that the satisfaction of many-to-many multiplicity constraints is a given. Nevertheless, our data generator interprets many-to-many multiplicity constraints as m-to-n ones, with m and n chosen either randomly or by the «multiplicity» stereotype.
References
Ali, S., Iqbal, M., Arcuri, A., Briand, L.C.: Generating test data from OCL constraints with search techniques. IEEE Trans. Softw. Eng. 39(10), 1376–1402 (2013)
Behjati, R., Nejati, S., Briand, L.: Architecture-level configuration of large-scale embedded software systems. ACM Trans. Softw. Eng. Methodol. 23(3), 25 (2014)
Bench-Capon, T., et al.: A history of AI and law in 50 papers: 25 years of the international conference on AI and law. Artif. Intell. Law 20(3), 215–319 (2012)
Bousse, E., Combemale, B., Baudry, B.: Scalable armies of model clones through data sharing. In: Proceedings of the 17th ACM/IEEE International Conference on Model-Driven Engineering Languages and Systems (MODELS’14), pp. 286–301 (2014)
Breaux, T., Anton, A.: Analyzing regulatory rules for privacy and security requirements. IEEE Trans. Softw. Eng. 34(1), 5–20 (2008)
Breaux, T.D., Powers, C.: Early studies in acquiring evidentiary, reusable business process models from laws for legal compliance. In: Proceedings of the 6th IEEE International Conference on Information Technology: New Generations (ITNG’09), pp. 272–277 (2009)
Breuker, J., Valente, A., Winkels, R., et al.: Legal ontologies: a functional view. In: Proceedings of the 1st LegOut Workshop on Legal Ontologies, pp. 23–36. Citeseer (1997)
Cabot, J., Clarisó, R., Riera, D.: On the verification of UML/OCL class diagrams using constraint programming. J. Syst. Softw. 93, 1–23 (2014)
Canova, L., Piccoli, L., Spadaro, A.: SYSIFF 2006: a microsimulation model for the French tax system. Tech. Rep, MicroSimula—Paris School of Economics (2009)
Cha, S.H.: Comprehensive survey on distance/similarity measures between probability density functions. Int. J. Math. Models Methods Appl. Sci. 1(3), 300–307 (2007)
Corder, G.W., Foreman, D.: Nonparametric Statistics: A Step-by-Step Approach. Wiley, Hoboken (2014)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
Di Nardo, D., Pastore, F., Briand, L.C.: Generating complex and faulty test data through model-based mutation analysis. In: Proceedings of the 8th IEEE International Conference on Software Testing, Verification and Validation (ICST’15), pp. 1–10 (2015)
Figari, F., Paulus, A., Sutherland, H.: Microsimulation and policy analysis. Handb. Income Distrib. 2 (2014)
Ghanavati, S., Amyot, D., Peyton, L.: Towards a framework for tracking legal compliance in healthcare. In: Proceedings of the 19th International Conference on Advanced Information Systems Engineering (CAiSE’07), pp. 218–232 (2007)
Gogolla, M., Bohling, J., Richters, M.: Validating UML and OCL models in USE by automatic snapshot generation. Softw. Syst. Model. 4(4), 386–398 (2005)
Object Management Group: UML 2.2 Superstructure Specification (2009)
Hartmann et al., T.: Generating realistic smart grid communication topologies based on real-data. In: Proceedings of the 5th IEEE International Conference on Smart Grid Communications (SmartGridComm’14), pp. 428–433 (2014)
Hermans, F., Pinzger, M., van Deursen, A.: Detecting and refactoring code smells in spreadsheet formulas. Empir. Softw. Eng. 20(2), 549–575 (2015)
Hermans, F., Pinzger, M., van Deursen, A.: Detecting and visualizing inter-worksheet smells in spreadsheets. In: Proceedings of the 34th IEEE International Conference on Software Engineering (ICSE’12), pp. 441–451 (2012)
IBM: IBM Rational Software Architect Simulation Toolkit. http://www-03.ibm.com/software/products/en/ratisoftarchsimutool
IBM: Rational Rhapsody Designer for Systems Engineers. http://www-03.ibm.com/software/products/en/ratirhapdesiforsystengi
Iqbal, M., Arcuri, A., Briand, L.: Environment modeling and simulation for automated testing of soft real-time embedded software. Softw. Syst. Model. 14(1), 483–524 (2013)
Islam, S., Mouratidis, H., Jürjens, J.: A framework to support alignment of secure software engineering with legal regulations. Softw. Syst. Model. 10(3), 369–394 (2011)
Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT press, Cambridge (2012)
Jürjens, J.: Umlsec: Extending UML for secure systems development. In: Proceedings of the 5th International Conference on the Unified Modeling Language (UML’02), pp. 412–425 (2002)
Melz, E., Valente, A.: Modeling the tax code. In: Proceedings of the 2nd International Workshop on Regulatory Ontologies (WORM’04), pp. 652–661 (2004)
Mijatov, S., Mayerhofer, T., Langer, P., Kappel, G.: Testing functional requirements in UML activity diagrams. In: Proceedings of the 9th International Conference on Tests and Proofs (TAP’15), pp. 173–190 (2015)
Mougenot, A., Darrasse, A., Blanc, X., Soria, M.: Uniform random generation of huge metamodel instances. In: Proceedings of the 5th European Conference on Model Driven Architecture-Foundations and Applications (ECMDA-FA’09), pp. 130–145 (2009)
No Magic: Cameo Simulation Toolkit. http://www.nomagic.com/products/magicdraw-addons/cameo-simulation-toolkit.html
Object Management Group: The Unified Modelling Language. Version 2.2 . http://www.omg.org/spec/UML/2.1.2/ (2007)
OMG: Modeling and Analysis of Real-time and Embedded Systems (MARTE), version 1.1 (2011). http://www.omg.org/spec/MARTE/1.1/
OMG: Semantics of a Foundational Subset for Executable UML Models (fUML), version 1.1 (2013). http://www.omg.org/spec/FUML/1.1
Panko, R.: What we know about spreadsheet errors. J. End User Comput. 10, 15–21 (1998)
Papyrus: Moka overview. https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution
Rissland, E., Skalak, D.: CABARET: rule interpretation in a hybrid architecture. Int. J. Man-Mach. Stud. 34(6), 839–887 (1991)
Ruiter, D.: Institutional Legal Facts: Legal Powers and Their Effects, vol. 18. Springer, Heidelberg (1993)
SAS Institute: Statistical Analysis System (SAS). http://www.sas.com/
SAS Institute: Statistical Analysis System (SAS) for Econometrics and Time Series Analysis (ETS). https://support.sas.com/documentation/onlinedoc/ets/
Soltana, G., Fourneret, E., Adedjouma, M., Sabetzadeh, M., Briand, L.C.: Using UML for modeling legal rules: Supplementary material. Tech. Rep. TR-SnT-2014-3, Interdisciplinary Centre for Security, Reliability and Trust (SnT), University of Luxembourg (2014). http://people.svv.lu/soltana/Models14.pdf
Soltana, G., Fourneret, E., Adedjouma, M., Sabetzadeh, M., Briand, L.C.: Using UML for modeling procedural legal rules: approach and a study of Luxembourg’s Tax Law. In: Proceedings of the 17th ACM/IEEE International Conference on Model-Driven Engineering Languages and Systems (MODELS’14), pp. 450–466 (2014)
Soltana, G., Sannier, N., Sabetzadeh, M., Briand, L.C.: A model-based framework for probabilistic simulation of legal policies. In: Proceedings of the 18th ACM/IEEE International Conference on Model-Driven Engineering Languages and Systems (MODELS’15) (2015)
Statistics Canada: The Social Policy Simulation Database and Model (SPSD/M). http://www.statcan.gc.ca/eng/microsimulation/spsdm/spsdm
Sutherland, H.: The Development of Tax-Benefit Models: A View from the UK. Faculty of Economics, University of Cambridge, Tech. rep. (1995)
Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann Publishers, Burlington (2007)
Van Engers, T., Boer, A., Breuker, J., Valente, A., Winkels, R.: Digital Government: E-Government Research, Case Studies, and Implementation, chap. Ontologies in the Legal Domain, pp. 233–261. Springer US (2008)
van Engers, T., Gerrits, R., Boekenoogen, M., Glassée, E., Kordelaar, P.: POWER: using UML/OCL for modeling legislation—an application report. In: Proceedings of the 8th International Conference on Artificial Intelligence and Law (ICAIL’01), pp. 157–167 (2001)
Acknowledgments
We thank members of Luxembourg’s Inland Revenue Office (ACD) and National Centre for Information Technologies (CTIE), particularly T. Prommenschenkel, L. Balmer, and M. Blau for sharing their valuable time and insights with us. Financial support was provided by CTIE and FNR under Grants FNR/P10/03 and FNR9242479.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Prof. Jordi Cabot and Prof. Alexander Egyed.
Appendix
Appendix
1.1 Transformation of legal policies to Java: detailed algorithm
The core algorithm for transforming legal policies to simulation code, named PMToJava, is presented in Alg. 4. This algorithm takes as input a Policy Model, PM, an \(\textsf {element} \in \mathcal {PM}\), the set of \(\mathcal {PM}\)’s inputs, \(inputs\_all\), and the set of inputs that have been already declared, \(inputs\_declared\). Note that, we assume that \(\mathcal {PM}\) uses only deterministic decisions as a modeling restriction (since loops are handled using expansion regions). The transformation is based on a set of predefined patterns. These patterns are detailed in 12.2. The transformation process is recursive and mimics a depth-first traversal of the underlying graph of \(\mathcal {PM}\). There are four main parts to this process: (1) pattern recognition (Alg. 4, L. 4–7); (2) input declarations (Alg. 4, L. 8–14); (3) transformation of all elements other than decisions (Alg. 4, L. 15–28). Within this class of elements, additional processing is necessary for expansion regions to propagate their output if they have any (Alg. 4, L. 25–27); and (4) transformation of decision nodes (Alg. 4, L. 29–36).
Main (Alg. 5) initializes the transformation’s variables and makes the first call to PMToJava over the input policy model \(\mathcal {PM}\). During its execution, PMToJava makes calls to Algs. 4-8. retrieveDependentInputs (Alg. 6) retrieves all input parameters that need to be declared before transforming a given pattern. getInitialNode (Alg. 7) returns the initial node of an Activity or an ExpansionRegion. getFlows (Alg. 8) returns, based on the current pattern being processed, the outgoing flows targeting the next elements that should be visited. operatorsToJava (Alg. 9) transforms the equality operators as well as the conditional operators from OCL to Java. recognizePattern (Alg. 10) identifies and creates the appropriate pattern that matches the shape formed by: the visited element, its stereotype, its container (Activity or ExpansionRegion) and its neighborhood (adjacent elements).
1.2 Patterns for transforming legal policies to Java simulation code
Table 4 shows the patterns used by our transformation algorithm PMToJava (Alg. 4 of Appendix 12.1) for generating the appropriate Java simulation code (L. 19–20 of Alg. 4). The first column of Table 4 provides the name, the generic shape, and a brief description of each pattern. A pattern can be Elementary, composed of a single UML element, or Aggregated, composed of several UML elements. The second column shows the resulting Java fragments for each pattern. These fragments correspond to the opening and closing expressions, respectively, denoted in PMToJava by \(st_1\) and \(st_2\) (L. 19–20 of Alg. 4). The opening and closing expressions delimit the beginning and the end of a branch or a loop, respectively. Patterns that do not result in the creation of a branch or loop do not require a closing expression.
1.3 Consistency constraints of the profile for expressing the probabilistic characteristics of the simulation population
Table 5 shows the consistency constraints that check the sound application of our profile (the profile for probabilistic information) on a given domain model. The first column provides a description of the consistency constraints alongside their OCL expressions. The second column lists the stereotypes over which the consistency constraints apply.
Rights and permissions
About this article
Cite this article
Soltana, G., Sannier, N., Sabetzadeh, M. et al. Model-based simulation of legal policies: framework, tool support, and validation. Softw Syst Model 17, 851–883 (2018). https://doi.org/10.1007/s10270-016-0542-0
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-016-0542-0