Approach and a Study of Luxembourg’s Tax Law Ghanem Soltana Elizabeta Fourneret Morayo Adedjouma Mehrdad Sabetzadeh Lionel Briand University of Luxembourg, Luxembourg Using UML for Modeling Procedural Legal Rules .lu software verification & validation V V S
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Approach and a Study of Luxembourg’s Tax Law!
Ghanem Soltana Elizabeta Fourneret Morayo Adedjouma !
Mehrdad Sabetzadeh Lionel Briand
University of Luxembourg, Luxembourg!
Using UML for Modeling Procedural Legal Rules
.lusoftware verification & validationVVS
How did this work come about?• Collaboration with
Government of Luxembourg
• CTIE: Government’s IT Centre
• ACD: Tax Administration Department
• New tax system under development
• System needs to be compliant with the law
2
No
Context and motivation
3
Test cases
Actual software system
✗
Traces to
Traces to
Input
to
Input to Analyzable
interpretation of the law
Actual result
Simulated result
Generates
Results match?
Yes
Impact of fiscal decisions
Simulates
Focus of the talk:!What needs to be modeled?
What language to use? What methodology to apply?
Tax Law
Related work
• Dutch legislation: UML Class Diagrams + OCL [van Engers et al., 2001]
• US Internal Revenue Code: ontologies [Melz et al., 2004]
• US healthcare: rule-based framework [Breaux, 2009]
• Support for automated verification in various form !
Research steps
6
2. Build UML profile
3. Use profile for transforming
models
• What information content should we expect?
• What are the complexity factors?
• Explicit means for capturing information requirements
• Basis for modeling methodology
• Reuse existing automation techniques
• Solvers for testing • MATLAB for simulation
1. Conduct grounded theory
study
• Legal framework composed of legislation, regulations, and circulars !
• Framework has prescriptive nature
Procedure for calculating FD
deduction
What does the tax law look like?
7
Art. 105bis […]The commuting expenses deduction (FD) is defined as a function over the distance between the principal town of the municipality on whose territory the taxpayer's home is located and the place of taxpayer’s work. The distance is measured in units of distance expressing the kilometric distance between [principal] towns. A ministerial regulation provides these distances. !The amount of the deduction is calculated as follows: If the distance exceeds 4 units but is less than 30 units, the deduction is € 99 per unit of distance. The first 4 units does not trigger any deduction and the deduction for a distance exceeding 30 units is limited to € 2,574.
{{
Legal concepts definition
!Grounded theory coding of 16 articles from Luxembourg’s Income Tax Law
Art. 105bis […]The commuting expenses deduction (FD) is defined as a function over the distance between the principal town of the municipality on whose territory the taxpayer's home is located and the place of taxpayer’s work. The distance is measured in units of distance expressing the kilometric distance between [principal] towns. A ministerial regulation provides these distances. !The amount of the deduction is calculated as follows: If the distance exceeds 4 units but is less than 30 units, the deduction is € 99 per unit of distance. The first 4 units does not trigger any deduction and the deduction for a distance exceeding 30 units is limited to € 2,574.
Meta-concepts in prescriptive laws
8
DecisionOperation
Information requirements (1)
9
Traceability Package
Legal Text
Legal Agent Record
Information Source
1..*
0..1
Process Package
Step
Data Object
*
1..*has as input
0..1
produces as output
1..*
originates from
is derived from
Datatype Package
StringNumeric
SetDatatype
Boolean Domain Object
Age PercentageDistance Unit
Monetary Value
1
DecisionOperation
Date
▶
▲
▶
▲
Legal Rule
Information requirements (2)
10
Traceability Package
Legal Text
Legal Agent Record
Information Source
1..*
0..1
Process Package
Step
Data Object
*
1..*has as input
0..1
produces as output
1..*
has as typeDatatype Package
StringNumeric
SetDatatype
Boolean Domain Object
Age PercentageDistance Unit
Monetary Value
1*
DecisionOperation
Date
▲▲
Legal Rule
▶
Information requirements (3)
11
Traceability Package
Legal Text
Legal Agent Record
Information Source
1..*
0..1
Process Package
Step
Data Object
*
1..*has as input
0..1
produces as output
1..*
1..* has as type
originates from
is derived from
Datatype Package
StringNumeric
SetDatatype
Boolean Domain Object
Age PercentageDistance Unit
Monetary Value
1*
DecisionOperation
Date
▶
▲
▶
▲
Legal Rule
▶
1
OCL complexity factors (1)
12
Numerous branches!!!
Art. 2 Individuals are considered resident taxpayers if they have their address in the Grand Duchy. Individuals are considered non-resident taxpayers if they do not reside in the Grand Duchy but have a local income within the definition of Article 156.
context TaxPayer inv ResidentialStatus:
let hasLocalAddress:Boolean = self.addresses!select(a:Address | a.country = Country::LU)
!notEmpty() inif hasLocalAddress then
self.oclIsTypeOf(ResidentTaxPayer)else
let hasLocalIncomes:Boolean = self.incomes!select(i:Income | i.oclIsTypeOf(LocalIncome))
!notEmpty() inif hasLocalIncome then
self.oclIsTypeOf(NonResidentTaxPayer)
elsefalse
endifendif
self.taxPayerDependents!select(dependent:Person | not dependent.oclIsTypeOf(TaxPayer) anddependent.addresses!intersection(self.addresses)!notEmpty() anddependent.allowances.amount!sum>0)
13
OCL complexity factors (2)
Art. 127 […]. An eligible dependent is a person who lives in the same household as the taxpayer but is not taxpayer himself. Only dependent receiving some allowances from the government are eligible.
Lengthy navigations!!!
14
OCL complexity factors (3)
Art. 127bis On request, the taxpayer gets a deduction for extraordinary expenses for children care. When children under the age of twenty-one are maintained and educated mostly by the taxpayer, the total amount of all expenses dedicated to these children is considered as extraordinary expenses. However, extraordinary expenses defined by the current article must not exceed 3.480 euros per year and per child […]
let total expenses:MonetaryValue = inc.expenses!select(exp:Expense | exp.beneficiary = dep)!sum()
in
if total expenses < 3480 then
total expenses = inc.getCE3(tax year).amount
else inc.getCE3(tax year).amount = 3480 endif))
15
2. Build UML profile
3. Use profile for transforming
models
• What information content should we expect?
• What are the complexity factors?
• Explicit means for capturing information requirements
• Basis for modeling methodology
• Reuse existing automation techniques
• Solvers for testing • MATLAB for simulation
1. Conduct grounded theory
study
Background: UML Profiles are a standard mechanism to extend UML with
domain-specific modeling concepts
Characteristics of our profile
16
Our UML profile: !• Customizes the activity modeling fragment of UML !!• Provides stereotypes for capturing information
requirements !!• Has built-in consistency constraints to ensure correct
use of the profile !!!
17
Art. 105bis […]The commuting expenses deduction (FD) is defined as a function over the distance between the principal town of the municipality on whose territory the taxpayer's home is located and the place of taxpayer’s work. The distance is measured in units of distance expressing the kilometric distance between [principal] towns. A ministerial regulation provides these distances. !The amount of the deduction is calculated as follows: If the distance exceeds 4 units but is less than 30 units, the deduction is € 99 per unit of distance. The first 4 units does not trigger any deduction and the deduction for a distance exceeding 30 units is limited to € 2,574.
Profile illustrated on an example
«rule» «context» TaxPayer
18
OCL context
Decisions and operations (1)
19
: MonetaryValue
«intermediate» expected_amount
«assert» Check correctness of
deduction granted to taxpayer
«rule» «context» TaxPayer
«calculate»
No deductionno (false)
«decision» distance >
minimal_distance
«statement» actual_amount =
expected_amount
«formula»
0 (zero)
Decisions and operations (2)
20
: MonetaryValue
«intermediate» expected_amount
«calculate» Normal rate per unit for declared distance
«assert» Check correctness of
deduction granted to taxpayer
«rule» «context» TaxPayer
distance < maximal_distance
«formula»
«calculate»
No deduction
yes (true)
yes (true)
no (false)«decision»
«decision»
distance > minimal_distance
«statement» actual_amount =
expected_amount
prorata_period * flat_rate * distance
«formula» 0 (zero)
Decisions and operations (3)
21
no (false)
: MonetaryValue
«intermediate» expected_amount
«calculate» Normal rate per unit for declared distance
«assert» Check correctness of
deduction granted to taxpayer
«rule» «context» TaxPayer
distance < maximal_distance
«calculate» Special flat rate for maximal distance
«formula»
«calculate»
No deduction
yes (true)
yes (true)
no (false)«decision»
«decision»
distance > minimal_distance
«statement» actual_amount =
expected_amount
prorata_period * flat_rate * distance
«formula» prorata_period * maximal_flat_rate
«formula» 0 (zero)
Iterations
22
no (false)
: MonetaryValue
«intermediate» expected_amount
«calculate» Normal rate per unit for declared distance
Art. 105bis […]The commuting expenses deduction (FD) is defined as a function over the distance between the principal town of the municipality on whose territory the taxpayer's home is located and the place of taxpayer’s work. The distance is measured in units of distance expressing the kilometric distance between [principal] towns. A ministerial regulation provides these distances. !The amount of the deduction is calculated as follows: If the distance exceeds 4 units but is less than 30 units, the deduction is € 99 per unit of distance. The first 4 units does not trigger any deduction and the deduction for a distance exceeding 30 units is limited to € 2,574.
{{
Putting it together
26
2. Build UML profile
3. Use profile for transforming
models
• What information content should we expect?
• What are the complexity factors?
• Explicit means for capturing information requirements
• Basis for modeling methodology
• Reuse existing automation techniques
• Solvers for testing • MATLAB for simulation
1. Conduct grounded theory
study
Retrieve all required inputs!
Declare Inputs
Transformation to OCL (1)
27
Recognize Pattern
Transform Pattern to OCL Make recursive call to handle next element !
Activity Diagram«itera've»
iterator: Type«in»+
Set(Object)name:
Retrieve all required inputs!
Declare Inputs
Transformation to OCL (2)
28
Recognize Pattern
Transform Pattern to OCL Make recursive call to handle next element !
Activity Diagram name ! forAll (iterator: Type |
Filled by the algorithm’s unwinding
)
OCL vs. Model1. context TaxPayer inv FD:
2. let tax year:Date = self.tax year in
3. let incomes:Set(Income) = self.incomes!select(i:Income | i.year = tax year) in
4. incomes!forAll(inc:Income |5. let distance:DistanceUnit = inc.distance in
6. let minimal distance:DistanceUnit =
7. Constant::MINIMAL DISTANCE.oclAsType(DistanceUnit) in
8. if (distance > minimal distance) = true then
9. let maximal distance:DistanceUnit =
10. Constant::MAXIMAL DISTANCE.oclAsType(DistanceUnit) in
11. if (distance < maximal distance) = true then
12. let flat rate:MonetaryValue =
13. Constant::FLAT RATE.oclAsType(MonetaryValue) in
14. let prorata period:Numeric = inc.prorata period in
15. let expected amount:MonetaryValue = prorata period * flat rate * distance in
16. let actual amount:MonetaryValue = inc.getFD(tax year).amount in
17. actual amount = expected amount
18. else if (distance < maximal distance) = false then
19. let maximal flat rate:MonetaryValue =
20. Constant::MAXIMAL FLAT RATE.oclAsType(MonetaryValue) in
21. let prorata period:Numeric = inc.prorata period in
22. let expected amount:MonetaryValue = prorata period * maximal flat rate in
23. let actual amount:MonetaryValue = inc.getFD(tax year).amount in
24. actual amount = expected amount
25. else false endif
26. endif
27. else if (distance > minimal distance) = false then
28. let expected amount:MonetaryValue = 0 in
29. let actual amount:MonetaryValue = inc.getFD(tax year).amount in
30. actual amount = expected amount
31. else false endif endif
32. )
29
30
2. Build UML profile
3. Use profile for transforming
models
• What information content should we expect?
• What are the complexity factors?
• Explicit means for capturing information requirements