Advanced Techniques
6.1 Cross-Cutting Concerns
Problem: Some legal concepts (like appeals) apply across multiple processes.
Example: Appeals can be made against:
Registration refusal (Art 33)
Required Steps Notice (Art 33)
Deregistration decision (Art 33)
Name change refusal (Art 33)
Solution - Generic appeal mechanism:
DECLARE AppealableDecision IS ONE OF
RegistrationRefusal HAS reasons IS A LIST OF STRING
RequiredStepsNotice HAS steps IS A LIST OF STRING
DeregistrationDecision HAS grounds IS A LIST OF STRING
NameChangeRefusal HAS reasons IS A LIST OF STRING
§ `Universal Appeal Right (Art 33)`
GIVEN decision IS AN AppealableDecision
GIVETH A PROVISION Actor Action
`appeal process` MEANS
PARTY AffectedParty
MAY AppealDecision OF decision
WITHIN 28 days OF `decision notice served`
HENCE `appeal proceeds to tribunal`
LEST `appeal time expired`6.2 Multi-Instrument Integration
Real example - Annual Return Requirements:
Combines requirements from 4 different instruments:
Art 13(7)-(10) Law 2014: Basic obligation
Core Info Regs 2018: Financial data requirements
Additional Info Order 2018: Governor payment details
Timing Order 2019: Deadline specifications
L4 integration approach:
Step 1: Define the complex data structure outside the PROVISION:
Step 2: Reference it in the CONTRACT rule:
Key insight: Keep PROVISION actions simple by pre-defining complex objects rather than constructing them inline.
6.2a CONTRACT Syntax Best Practices
Critical Rule: Avoid complex object construction within PROVISION rules.
❌ Problematic (causes syntax errors):
✅ Correct approach - Use helper functions:
✅ Alternative - Pre-define examples:
Why this matters:
Syntax requirements: L4 parser expects simple expressions in PROVISION actions
Readability: Complex object construction clutters the legal logic
Maintainability: Helper functions can be reused across multiple PROVISION rules
Testing: Pre-defined objects are easier to validate and test
Pattern for actions with structured data:
Define the structure using
DECLARECreate helper functions or examples using
DECIDEorMEANSUse simple references in PROVISION rules
Keep legal logic clean and focus on the process flow
6.3 Advanced Simulations
Multi-party scenario with error handling:
Performance considerations for large schemes:
Success Check: You can now handle cross-cutting legal concerns, integrate multiple legal instruments, and create sophisticated simulations with error handling and performance considerations.
Last updated
