PoliSim: a Tool for Model-Based Probabilistic Simulation of Procedural Legal Policies

Overview

PoliSim is a decision-support tool for predicting the potential impact of legal reforms. The main goals of PoliSim is to support the simulation of procedural legal policies (regardless of the availability of real simulation data) while enabling communication between key stakeholders such as analysts and legal experts. To do so, the framework relies on models rather than code or first order predicates. In particular, PoliSim uses:

  • a domain model, expressed as a UML class diagram that represent key concepts and their relationships for the indulging legal context, and

  • for each legal policy, a UML activity diagram describing the realization of a given legal procedure (policy).


Both of these model types are customised with UML profiles, i.e., standard mechanisms to extend UML diagrams with domain-specific modeling concepts, to provide sufficient meta-information for simulation. For instance, the domain model is annotated with probabilistic information (from aggregated census data or from domain expert estimates) to enable the generation of artificial but yet realistic simulation data. Whereas, policy models are customized with additional semantics to reduce accomodate the information requirements of procedural legal policies.


Provided the annotated models discussed above, our framework uses Model-Driven-Engineering (MDE) techniques to automatically derive the underlying simulation infrastructure, i.e., the simulation code and data. In particular, an artificial simulation data sample that represent the real population, e.g., instances of taxpayers or households in the context of tax law, is derived from the annotated domain model (an EMF-based model-to-model transformation). Simulation code, i.e., Java code that uses the OCL language to query the simulation data, is derived from the policy models at hand (an Acceleo model-to-text transformation). During a simulation run, the generated code is executed over the artificial data sample to produce the simulation results. A typical usage of PoliSim is to provide an original and a modified set of legal policies, execute both sets over the same generated simulation data, and compare the results in order to quantify the expected impact.


PoliSim in a nutshell

PoliSim architecture


As showen by the figure above, PoliSim has been developed as an Eclipse plugin. The core components of PoliSim are shown in the rectangle labeled "Model-based legal policy simulation". All of these components rely on:

PoliSim uses:

  • the Eclipse Modeling Framework (EMF) for manipulating the input models and the simulation data, and

  • EclipseOCL for parsing and evaluating OCL expressions.

The "Simulation code generator" component uses Acceleo for transforming policy models into simulation code (discussed in the overview). The component "Simulation code generator" implements an automated data generator that derives artificial, but yet realistic, simulation data (instances) from the input domain model. This component relies mainly on:

The "Simulation output generator" creates the final output that will be provided to the user. This output comes in two different formats: spreadsheets and charts. The spreadsheet are generated using Apache POI and the charts using JFreeChart.


System Requirements

  • Eclipse IDE (Mars or higher) [link].

  • Java Development Kit (JDK) 1.8.0 (or higher) [link].

  • The Acceleo model-to-text transformation engine is required for simulation code generation [link].

  • Note that all the other required third-party libraries are included in the installation package.

  • We also recommend using the Papyrus modeling environment for building and managing models [link].

UML Profiles and Demonstration Models

  • Profile customizing UML activity diagrams for legal policy models [link].

  • Example of a policy model for calculating invalidity deduction (ID) [link].

  • Example of a reformed ID (ID_Modified) where values of some input parameters have been changed [link].

  • Profile for expressing the probabilistic characteristics of a population [link].

  • Example of a domain model annotated with probabilistic information (TaxCard) [link].


Installation Material for PoliSim

  • The Acceleo plug-in for generating, among others, simulation code from policy models (CodeGen) can be found [here].

  • The PoliSim plug-in can be found [here].

  • Installation and usage instructions can be found [here].


Relevant Publications

  • G. Soltana, N. Sannier, M. Sabetzadeh, and L. C. Briand, "Model-Based Simulation of Legal Policies: Framework, Tool Support, and Validation”, in Software & Systems Modeling (SoSyM), Springer (in press). [PDF] [BibTeX]

  • G. Soltana, M. Sabetzadeh, and L. C. Briand, "Model-Based Simulation of Legal Requirements: Experience from Tax Policy Simulation”, in proceedings of 24th IEEE International Requirements Engineering Conference (RE 2016), Beijing, China, September 12 - September 16, 2016, pp. 303-312. [PDF] [BibTeX]


Contact Information

Ghanem Soltana
Interdisciplinary Centre for Security, Reliability and Trust
29, Avenue John Fitzgerald Kennedy
L-1855, Luxembourg
E-mail: ghanem(dot)soltana(at)uni(dot)lu