Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Patterns for legal compliance checking in a decidable framework of linked open data

Patterns for legal compliance checking in a decidable framework of linked open data This paper presents an approach for legal compliance checking in the Semantic Web which can be effectively applied for applications in the Linked Open Data envi- ronment. It is based on modeling deontic norms in terms of ontology classes and ontology property restrictions. It is also shown how this approach can handle norm defeasibility. Such methodology is implemented by decidable fragments of OWL 2, while legal reasoning is carried out by available decidable reasoners. The approach is generalised by presenting patterns for modeling deontic norms and norms compli- ance checking. Keywords Legal reasoning · Norm compliance · Semantic Web · OWL 2 1 Introduction Modeling legal rules represents a precondition for developing systems endowed with automatic reasoning facilities for advanced information services in the legal domain. In literature several approaches have been proposed aiming to formalize legal rules to support automatic reasoning, as reasoning on deontic notions (Gabbay et al. 2013), reasoning for norm compliance (Hashmi and Governatori 2018) or for legal argumentation (Prakken and Sartor 2015). The current successful trend of Semantic Web implementation according to a Linked Open Data (LOD) approach is producing, and is supposed to produce in the next few years, a huge and growing amount of data, semantically qualified, avail- able for sharing and reuse. RDF is the language of the Semantic Web, able to describe a scenario of interest by triples composed by master data (namely entities Resource Description Framework. * Enrico Francesconi enrico.francesconi@igsg.cnr.it Istituto di Informatica Giuridica e Sistemi Giudiziari – IGSG-CNR, Florence, Italy Brisbane, Australia Vol.:(0123456789) 1 3 E. Francesconi, G. Governatori like concepts or real world objects), metadata (namely properties of such entities) and their values (reference data). Such RDF triples are able to provide a semantic description of a specific domain: for example in the legal one, they can describe con- cepts, legal rules and facts. In the next future the ability of a legal information sys- tem to process Linked Open Data and to show legal reasoning capabilities will be an essential aspect for having an automatic legal assistant in large scale, endowed with AI capabilities. Legal information retrieval, eDiscovery, legal compliance checking, on-line dispute resolution are just few examples of services which can profit from the representation of legal knowledge in the Semantic Web in terms of rules amena- ble for computation. In this paper we propose an automatic legal compliance checking framework describing legal rules using Semantic Web standards. This framework has been firstly presented in Francesconi (2019), Francesconi and Governatori (2019), while this work presents more extended examples, as well as a generalisation of the approach in terms of a formal model based on recurrent modeling patterns. The approach guarantees the computational tractability of the problem within the Description Logic framework. As developed for the Semantic Web standards, this approach has its natural application in such a scenario like a LOD environment, however it can also be applied in other environments which can exploit the potential of the Semantic Web standards and related reasoning facilities. This paper is organized as follows: in Sect.  2 a contextual background about Semantic Web languages and their computational complexity are introduced; in Sect.  3 a review of related works about legal reasoning is given, including exam- ples within a description logic computational complexity; in Sect.  4 the distinction between the concepts of Provision and Norm from the legal theory point of view is discussed (Marmor 2014); in Sect.  5 an approach for modeling norms using ontol- ogies, able to implement norm compliance checking within a decidable computa- tional framework is described and tested on examples; in Sect.  6 the ability of the approach to deal with norm defeasibility is presented; in Sect. 7 a generalisation of such an approach is proposed by identifying patterns for modeling deontic norms and norms compliance checking. Finally, in Sect.  8 some conclusions and possible future developments are reported. 2 Semantic technologies background For sharing information on the Web in a way that is understandable by both humans and machines, the Semantic Web and LOD principles recommend to use OWL/ RDF(S) standards, able to provide a semantic description of an information sce- nario of interest. RDF is used for describing instances of such scenario in terms of classes and properties, OWL (including RDF Schema) is the language for rep- resenting knowledge models (ontologies) able to give meaning to such classes and properties. Ontology Web Language/Resource Description Framework (Schema). 1 3 Patterns for legal compliance checking in a decidable framework… OWL can be used at different levels of expressiveness, introducing different lev - els of computational complexity: OWL-Full is not decidable, namely an algorithm able to guarantee inferences in a finite time does not exist; OWL-DL is a decid- able fragment of OWL-Full, namely there are algorithms able to guarantee infer- ences in a finite time; finally OWL-Lite is a decidable fragment of OWL-DL, with reduced expressiveness. For OWL-DL (hence for OWL-Lite) several reasoners have 4 5 6 been developed, like Pellet, Racer, HermiT, able to generate inferences based on a knowledge model. More recently OWL 2 has been introduced to extend the expressiveness of OWL, keeping the same three levels of complexity, while intro- ducing three additional decidable languages, optimized in terms of expressiveness and computability, for specific tasks: OWL 2-EL for ontologies with large amount of classes and properties; OWL 2-QL for the purpose of managing large volumes of data; OWL 2-RL for applications that require scalable ways of reasoning without sacrificing the expressive power of the language. In the Semantic Web, the implementation of decidable profiles of OWL or OWL 2 guarantees the computational tractability of specific types of reasoning, in par - ticular reasoning for legal information, like advanced legal information retrieval and norm compliance (Gandon et  al. 2017), while it allows us to use already available reasoners. For representing legal information in the Semantic Web, languages like OWL/ RDF(S) for modeling real world scenarios are usually used, as well as mainly SWRL or RIF for representing legal rules governing such scenarios. Recently, LegalRuleML for modeling legal rules, including defeasible rules representation and defeasible reasoning, has been proposed (Athan et al. 2015; Governatori et al. 2016). 3 Related works OWL is the state-of-the-art language for knowledge modeling in the Semantic Web, effectively used for creating ontologies able to represent concepts and relations of real world scenarios (Casellas 2008): examples in the legal informatics literature are LRI-Core (Breuker 2004), LKIF (Hoekstra et al. 2007), CLO (Gangemi et al. 2005), DALOS (Agnoloni et al. 2007), PrOnto (Palmirani et al. 2018). On the other hand, in the Semantic Web legal rules have been represented in literature using a variety of languages. Hoekstra et al. (2009) proposed to use SWRL or RIF in combination with an ontological representation of norms and facts. Gordon (2011) introduced rules description using specific XML schemas in combination with ontologies. OWL Description Logic. https:// github. com/ stard og- union/ pellet https:// www. ifis. uni- luebe ck. de/ ~moell er/ racer/. http:// www. hermit- reaso ner. com/. https:// www. w3. org/ TR/ owl2- overv iew/. Like OWL 2 DL, OWL 2 EL, OWL 2 QL and OWL 2 RL. 1 3 E. Francesconi, G. Governatori More recently LegalRuleML (OASIS 2017), as specialization of the RuleML stand- ard, has been proposed as language for representing legal rules. In the last few years several studies have been made to approach the problem of legal reasoning in a decidable computational complexity profile. Van de Ven et al. (2008) proposed HARNESS, a knowledge-based system developed within the ESTRELLA project, able to implement reasoning over norms for legal assessment, basically the evaluation whether a case is allowed or disallowed given an appropriate body of legal norms. HARNESS includes two knowledge bases: a domain ontology and a set of norms representing the normative articles. Both are developed within the OWL 2 DL profile. Assessment consists in classifying individuals and properties making up a case description in terms of both ontology and norms simultaneously. The result tells whether norms are violated or not. Ceci and Gangemi (2016) devel- oped an OWL 2 judicial ontology library (JudO) representing the interpretations performed by a judge when conducting legal reasoning towards the adjudication of a case. On the other hand, Ceci in Ceci (2013) combines the features of description logic-based ontologies with non-monotonic logics such as the defeasible one. Deon- tic extensions of Defeasible Logic have been proposed (Governatori et al. 2013) and efficient implementations have been developed (Lam and Governatori 2009) and successfully tested on larges scale encodings (Governatori et  al. 2020; Witt et  al. 2021). To achieve effective reasoning with large dataset, integration with relational databases has been proposed (Islam and Governatori 2018). However, until recent, there was a limited integration with ontologies; to obviate this issue (Bhuiyan et al. 2020) proposed a combination of ontologies and SPARQL queries and a defeasible reasoner for the modeling compliance of autonomous vehicles against traffic rules. Another approach based on non-monotonic reasoning is the PROLEG system pro- posed by Satoh and coworker created initially to provide a formal model of the Japa- nese Civil Code (Satoh et  al. 2009; Fungwacharakorn et  al. 2021). Batsakis et  al. (2018) discussed and comparised some pratical implementations for reasoning with legal norms. A formal framework for reasoning on normative requirements for regulatory compliance is presented by Hashmi et al. (2016). The proposed framework is inde- pendent of any existing formalism, and provides a conceptual representation of the semantics of norms needed for business process compliance checking. The frame- work has been implemented and tested (Governatori et  al. 2016; Palmirani and Governatori 2018). On the other hand, recently Gandon et  al. (2017) proposed an approach to represent legal rules as Linked Open Data. It aims to respond to the requirements of representing the deontic aspects of normative rules and reasoning on them with Semantic Web languages, as RDFS and OWL for knowledge repre- sentation and SPARQL for queries. The rationale of the proposed approach is cou- pling OWL reasoning with SPARQL rules to formalize and implement legal rea- soning (as for example deontic reasoning and compliance checking). In particular normative requirements are represented using LegalRuleML and the deontic conclu- sions of legal rules are added to each named graph of the concerned state of affairs. Recently, implementation of LegalRuleML have been provided with provisions to integrate with other Semantic Web technologies (Lam and Hashmi 2019; Robaldo 2021). For the particular case of legal compliance checking, van Hee et  al. (2010) 1 3 Patterns for legal compliance checking in a decidable framework… Fig. 1 The Provision Model top classes (“prv:” is the namespace for provisions) and Ramezani et  al. (2013) showed other approaches based on Petri-Net patterns and alignments. For a survey of regulatory compliance checking in the context of business process see (Hashmi and Governatori 2018). The main contribution of this paper with respect to the literature is that it presents an approach for legal compliance checking based on the distinction between Provi- sions and Norms represented by using decidable fragments of OWL 2/RDF(S) for knowledge modeling and rules representation. This allows us to rely on available decidable reasoners, while leaving to SPARQL the sole task to query the dataset of inferred triples in order to verify deontic conclusions or norm compliance. Moreo- ver, the approach is able to cope with defeasible rules. 4 Provisions and norms According to the legal theory point of view, the legal order can be seen as a legal discourse composed by linguistic entities or speech acts (Searle 1969) with descrip- tive or prescriptive functions. Every linguistic entity can be seen in a twofold per- spective: as a set of signs organized in words and sentences, as well as the mean- ing of such signs. Following the same twofold view for the legal domain, we can distinguish two levels of interpretation of a linguistic entity expressing a legal rule: in terms of a set of signs organized in words and sentences for creating a normative statement, typically called Provision (Raz 1980; Biagioli 2009), as well as in terms of the meaning for application of such normative statement, typically called Norm (Guastini 2010; Marmor 2014). Provisions have been classified in Biagioli (2009) in terms of provision types, organised into two main groups (Fig. 1): Rules and Rules on Rules. Rules can be Constitutive Rules as Definition introducing entities, or Regulative Rules as the deontic concepts Duty and Right (or in a more deontic oriented terms Obliga- tion and Permission), as well as Power etc., regulating subject roles and activi- ties. Rules on Rules are different kinds of amendments: Temporal, Extension or Content amendments. Each provision type is characterized by specific attributes (for example the Bearer or the Counterpart of a Right/Permission), reflecting the lawmaker directions. Provision types and attributes can be considered as a sort of 1 3 E. Francesconi, G. Governatori Table 1 Relationship with time Provision (in-force) Norm (effective) of Provision and Norm Yes Yes Yes No No Yes No No Retro-activity/ultra-activity metadata model able to analytically describe fragments of legislative texts, hence the name of Provision Model (Biagioli 2009). In this vision, norms represent the way how provisions are applied; as such they represent the product of an interpretative process (Kelsen 1991). Provi- sions and related norms have, therefore, different roles and properties pertaining to different abstraction levels. Moreover, there may be not a bijective relation- ship between them: a norm can be expressed by different provisions, as well as it can be valid the opposite, namely one provision can include more norms (Pino 2016). They have also different relationships with time. Provisions, as pure tex- tual objects, are the product of lawmaking (legal drafting activity and promul- gation) and are characterized by the in-force date, namely the starting date of their existence in the legal order. On the other hand, norms are the meaning of provisions, namely their applicative interpretation; as such they are character- ized by the efficacy date, namely the starting date in which a norm can be con- cretely applied. For example a taxation rule, in-force at time t (time when the related provision enters the legal order), can express the application of a specific tax starting from time t (> t ). In this case t is the efficacy date of the norm. 2 1 2 Therefore (see Table  1), while it is obvious that we can have cases of provisions in-force and related norms effective, as well as provisions not in-force and related norms not effective, we can also have provisions in-force and related norms not effective, as well as the symmetric case, provisions not in-force and related norms effective (this last one is usually referred as retro-activity (efficacy in the past) or ultra-activity (efficacy in the future) of a norm. Having different nature, such concepts operate in different domains. A provision, as pure textual object, represents the building block of the legal order (new provisions can enter or leave the legal order itself). On the other hand, a norm can either modify the text of other provisions (in case of different type of amendments) or can introduce restrictions on the real world (in case of obliga- tions, for example). Advanced legal information retrieval, able to implement reasoning on deontic notions, is a type of reasoning managing textual information, thus pertaining to provisions. A typical example is a system able to implement Hohfeldian reason- ing, in which a user submits a query to a legal document collection in order to find the rights/permissions of a bearer A towards a counterpart B: following an Hohfeldian reasoning the system should be able to retrieve back also the provi- sions expressed as duties/obligations of the bearer B towards the counterpart A, 1 3 Patterns for legal compliance checking in a decidable framework… Fig. 2 Norm R1 represented as restriction on the Supplier’s property hasCommunicatedConditions and examples of non-compliant (s1) and compliant (s2) individuals (note that the subclass relation between SupplierR1Compliant and Supplier is inferred) because such obligations can also be seen as A’s permissions. An OWL 2 DL approach using the Provision Model for this type of reasoning is illustrated in Francesconi (2014, 2016). On the other hand, legal compliance checking is a process aiming to verify if a fact, occurring in the real world, complies with existing norms. Real world scenarios and facts can be effectively represented in terms of ontologies and related individu- als, respectively. Norms, which facts have to be compliant with, provide constraints on the reality, therefore they can be modeled as restrictions on ontology properties. Such modeling can be used for legal compliance checking. Hereinafter we illustrate an OWL 2 DL approach for modeling norms and how such modeling can be used for the aim of legal compliance checking. 5 Modeling norms for legal compliance checking Let’s consider two examples of legal rules, R1 and R2, to illustrate our approach: R1: The supplier shall communicate to the consumer all the contractual terms and conditions R2: According to a [country] law, one cannot drive over 90 km/h Both rules are speech acts, namely Provisions in specific regulations. In this sense R1, can be classified as an Obligation of a Supplier towards a Consumer, while R2 can be classified as an Obligation for any Driver in a specific country. The related modeling, according to the Provision Model approach described in Francesconi (2016), can support advanced legal information retrieval, including Hohfeldian reasoning. Derived from Directive 2002/65/EC art. 5. 1 3 E. Francesconi, G. Governatori Fig. 3 Norm R2 represented as restriction on the Driver’s property hasDrivingSpeed and examples of compliant (d1, d2, d3) and non-compliant (d4) individuals On the other hand, when we consider the application of rules like R1 or R2 on specific facts, we actually talk about Norms. As previously discussed, norms can be viewed as constraints on the real world scenario to be regulated. 5.1 Norm R1 representation and facts compliance checking In case of R1, the scenario which R1 applies to, can be modeled in terms of an ontology including a class Supplier, having a boolean property hasCommunicat- edConditions. In OWL 2 terms, the scenario concerning R1 can be expressed as in Fig. 2, where myo: is a fictitious namespace for the ontology “MyOntology”. Norm R1, expressing an obligation, states that suppliers must communicate pur- chasing conditions to the consumers. In our approach, norm R1 is represented as a restriction on the property hasCommunicatedConditions able to identify the class SupplierR1Compliant of individuals for which the value of the property under consideration is “true”, as shown in Fig.  2. The individuals of the class Supplier complying with this norm are all those and only those belonging to the subclass SupplierR1Compliant (Fig.  2). Such a representation for the real world scenario and related norm expressed by R1, results in the OWL 2 DL decidable profile. This modeling allows us to use a OWL 2 DL decidable reasoner in order to implement reasoning facilities as compliance checking with respect to R1. The inferred model produced by the DL reasoner establishes the rdfs:subClassOf relation between SupplierR1Compliant and Supplier (as shown in Fig.  2). Therefore, compliance checking according to the norm R1 is a problem of checking if an individual of type Supplier belongs also to the class SupplierR1Compliant. Such as Pellet (https:// github. com/ stard og- union/ pellet) and Racer (https:// www. ifis. uni- luebe ck. de/ ~moell er/ racer/). 1 3 Patterns for legal compliance checking in a decidable framework… As a concrete example let’s consider the two individuals s1 and s2 (Fig. 2) of the class Supplier. s1 is an individual not compliant with R1, while s2 is complaint with R1. The following SPARQL query ?  { ?  ∶   ∶ is able to select the individuals which are complaint with R1 (in our case s2). Legal reasoning in terms of norm compliance checking is therefore performed in a LOD framework, using available reasoners in a decidable computational complexity profile. 5.2 Norm R2 representation and facts compliance checking In case of R2, the vehicle drivers circulation scenario can be modeled in terms of an ontology including a class Driver, having a datatype property hasDrivingSpeed with range in the xsd:float datatype. In OWL 2 terms, the vehicle drivers circulation sce- nario concerning R2 can be expressed as in Fig. 3. Norm R2, expressing an obligation, states that, according to a specific country law, one cannot drive over 90 km/h. In our approach norm R2 is represented as a restric- tion on the property hasDrivingSpeed able to identify the class DriverR2Compli- ant of individuals for which the values of the property under consideration are in the range [0.0 km/h, 90.0 km/h], as shown in Fig. 3. In order to represent such constraints, the following restriction on the datatype property myo:hasDrivingSpeed to values (inclusively) between 0.0 and 90.0 km/h can be expressed by the xsd:minInclusive and xsd:maxInclusive datatype bound properties. The individuals of the class Driver complying with this norm are all those and only those belonging to the subclass Driv- erR2Compliant (Fig.  3). Also such a representation for the real world scenario and related norm, expressed by R2, results in the OWL 2 DL decidable profile. As in the previous example, the inferred model, produced by the DL reasoner, establishes a rdfs:subClassOf relation between DriverR2Compliant and Driver (as shown in Fig.  3). Therefore, compliance checking according to the norm R2 is a problem of checking if an individual of type Driver belongs also to the class DriverR2Compliant. As a concrete example, let’s consider the four individuals of the class Driver shown in Fig. 3. The individual d4 is not compliant with R2 (having speed 95.0 Km/h ≥ 90.0 Km/h) (Fig. 3). The following query ?  { ?  ∶   ∶ is able to select the individuals which are complaint with R2 (in our case d1, d2 and d3). Also in this case norm compliance checking is performed within a decidable computational complexity profile. 1 3 E. Francesconi, G. Governatori Fig. 4 New version of norm R2 represented as restriction on the Driver’s property hasDrivingSpeed and examples of compliant and non-compliant individuals 6 Modeling norms defeasibility for legal compliance checking Defeasibility is the property of an argumentation system for which a conclusion is open to revision in case evidence to the contrary is provided (Athan et  al. 2015). This particularly holds in legal reasoning which is a typical case of non-monotonic reasoning, where norm conflicts or norm exceptions might breach a previous con- clusion. In this section, two examples, one dealing with norm conflict and one with norm exception, are modeled within a description logic framework. We also show how such modeling can provide support for defeasible legal reasoning, for example in norm compliance checking. As first example, let’s consider rule R2, modeled in Sect.  5, and the following new version of rule R2, introducing a more strict driving speed limit at 80 Km/h: R2: According to a [country] law, one cannot drive over 80 km/h The new version of R2 can defeat the previous compliance conclusions, in the sense that individuals, which were compliant with the old version of R2, might not be compliant with it anymore (this is the case in the example in Fig. 4 of the individual d3). In order to cope with this change, the same model (without changing anything on the names of the classes) can be updated just by changing the original restriction on the datatype property hasDrivingSpeed with a new one expressed by the new version of R2, as shown in Fig.  4. Without changing anything on the individuals, their membership to the class DriverR2Compliant changes accordingly so that, for example, the individual d3, compliant with the old version of R2 (Fig. 3), is no more compliant with the new version of R2 (Fig.  4). Therefore, the query able to select compliant individuals remains the same: ?  { ?  ∶   ∶ it retrieves the only individuals compliant with the new version of R2, which are d1 and d2 . 1 3 Patterns for legal compliance checking in a decidable framework… Fig. 5 Norm R3 represented as restriction on the AgentEngagingCreditActivity’s properties (note that the subclass relations between AgentEngagingCreditActivity and classes of R3, R3a, R3b and R3c compliant or violating individuals are inferred) As second example, let’s consider the following rule R3 which establishes the limits for engaging credit activities in a jurisdiction, composed by the following 3 statements ( R3 = R3a ∪ R3b ∪ R3c ): (R3a) It is forbidden to engage in a credit activity without a credit license. (R3b) It is permitted to engage in a credit activity if acting on behalf of a principal and the principal holds a credit activity provided the principal has not been elected to the parliament. (R3c) It is permitted to engage in a credit activity if acting on behalf of a body corpo- rate and the person has been appointed as representative of the body corporate. The defeasibility of the norm R3 consists in an exception (R3a) which can defeat the previous compliance conclusions about the engagement of an agent in a credit activity, and in the exceptions of exception to it (R3b and R3c) which can defeat the conclusions about the prohibition established by R3a. The whole scenario addressed by norm R3 can be modeled through an ontol- ogy (see Fig.  5) describing a class Agent and a specific subclass AgentEngag- ingCreditActivity of the subclass of agents who engage in a credit activity. Also in this case the deontic concepts Prohibition and Permission, expressed in R3a, Inspired by Sect. 29 of the Australian Consumer Credit Protection Act. 1 3 E. Francesconi, G. Governatori R3b and R3c, are represented as restrictions on the datatype properties having domain AgentEngagingCreditActivity and expressing the conditions which the norm is subject to. The individuals of the class Agent can engage a credit activ- ity, thus belonging to the subclass AgentEngagingCreditActivity. According to the constraints expressed in R3, individuals can: p1 have a credit license (hasCreditLicense) p2 act on behalf of a principal (isActingOnBehalfOfPrincipal) p3 have principal holding a credit activity (isPrincipalHoldingCreditActivity) p4 have principal elected in Parliament (isPrincipalElectedInParliament) p5 act on behalf of a body corporate (isActingOnBehalfOfBodyCorporate) p6 act as representative of a body corporate (isRepresentativeOfBodyCorporate) Norm R3a states that engaging in a credit activity “is forbidden without a credit license”. Therefore, if an individual of the class AgentEngagingCredi- tActivity has a credit license (hasCreditLicence = “true”) the activity is permit- ted. This is modeled as restriction on the property hasCreditLicence so to create a subclass AgentEngagingCreditActivityR3aCompliant of individuals having “true” as value of the property hasCreditLicence. In Fig. 5 the individual ag2 is compliant to the norm R3a. Norm R3b states that the activity is permitted also when the individual “is acting on behalf of a principal” and “the principal holds a credit activity” and “the principal is not elected in Parliament”. This is modeled through a multiple restriction on the properties isActingOnBehalfOfPrincipal = true, isPrincipal- HoldingCreditActivity = true and isPrincipalElectedInParliament = false, so to create a subclass of individuals for which the previous three restrictions con- temporarily hold (the result is individuals belonging to the intersection of the sub- classes created by the three restrictions). In Fig. 5 the individual ag3 is compliant with norm R3b, because it has the value “true” on both the properties isActin- gOnBehalfOfPrincipal and isPrincipalHoldingCreditActivity and “false” on the property isPrincipalElectedInParliament. Very similar considerations can be made for R3c modeling, concerning restrictions on the properties expressed by the conditions for individuals compliant with R3c. The individuals compliant with the whole R3, composed by R3a, R3b and R3c, are therefore those belonging to the class AgentEngagingCreditActivityR- 3Compliant, obtained as disjoint union of the classes AgentEngagingCreditAc- tivityR3aCompliant, AgentEngagingCreditActivityR3bCompliant, AgentEn- gagingCreditActivityR3cCompliant. In all the other cases, engaging in a credit activity is forbidden. Therefore, the individuals which do not respect the combi- nation of property restrictions, violate norm R3, namely they belong to the class AgentEngagingCreditActivityR3Violating. In Fig. 5 the individual ag1 violates norm R3. The combination of the property restrictions p1, ..., p6 able to identify individuals violating norm R3 can be obtained by the negation of the combina- tion of properties of compliant individuals. In the case of R3, and applying the De Morgan laws, we obtain: 1 3 Patterns for legal compliance checking in a decidable framework… ¬[p1 ∨(p2 ∧ p3 ∧¬p4)∨ (p5 ∧ p6)] (1) =¬p1 ∧ (¬p2 ∨¬p3 ∨ p4)∧(¬p5 ∨¬p6) In order to verify which individuals are compliant or are violating R3, the following queries on the inferred model are respectively sufficient: {? ∶  ∶ {? ∶  ∶ 7 Patterns for deontic norms compliance checking In this section we aim to generalise the approach presented in the previous sections, for representing deontic norms and implementing an automatic compliance check- ing procedure within a description logic computational framework. The examples R1, R2 and R3, discussed in Sects.  5 and 6, represent deontic norms expressed in terms of prohibition, obligation or permission. More in general, given any action description A, prohibition, obligation and permission can be repre- sented by formulas having the following structure: – Forb (A) (it is forbidden that A) – Oblig (A) (it is obliged that A) – Perm (A) (it is permitted that A) As underlined in Sartor (2006) a minimal deontic logic can be expressed through the following definitions and axioms: – Being prohibited to perform an action means being obliged not to do it (Forb A = Obl NOT A). – Being permitted to perform an action means not being forbidden to do it (Perm A = NOT Forb A). – Being obliged to perform an action entails being permitted to perform it (IF Obl A THEN Perm A). – Being both obliged to perform action A and obliged to perform action B entails being obliged to perform both actions (IF (Obl A AND Obl B) THEN Obl (A AND B)). Given the previous relations, the following implications hold: Forb(A)= Obl(¬A)⟹ Forb(¬A)= Obl(A) (2) 1 3 E. Francesconi, G. Governatori Perm(A)=¬Forb(A)⟹ ¬Perm(A)= Forb(A) (3) Combining Eqs. (2) and (3) we have: Forb(A)=¬Perm(A)= Obl(¬A) (4) An example of equivalent relations at (4) is the statement R3a): It is forbidden to engage in a credit activity without a credit license. which is equivalent to: It is not permitted to engage in a credit activity without a credit license. and also equivalent to: It is obliged to engage in a credit activity with a credit license. where the action description A is: to engage in a credit activity without a credit license. An action description A can be decomposed in terms of a subject category S expressing behavioural or productive actions (Sartor 2006), as well as a set of properties p , whose negation q =¬p , represent conditions for A. i i i Therefore we have: Forb(A)= Forb(S(q ∧ q ∧ ... ∧ q )) (5) 1 2 i For example, being R3a = It is forbidden to engage in a credit activity without a credit license and given A = To engage in a credit activity without a credit license S = Agent engaging in a credit activity q =¬p = Has not credit license 1 1 R3a can be expressed as: R3a = it is forbidden that S without credit license and represented as follows R3a = Forb (S (q )) Forb (A) can also be expressed as an obligation of ¬A as follows: Forb(A)= Obl(¬A) (6) 1 3 Patterns for legal compliance checking in a decidable framework… Obl(¬S(q ∧ q ∧ ... ∧ q )) = Obl(S(p ∧ p ∧ ... ∧ p )), where p =¬q (7) 1 2 i 1 2 i i i For example, considering R3a = it is forbidden that S engages in a credit activity without credit license = it is obligatory that S engages credit activity with credit license we have R3a = Forb (S ( q )) = Obl (S ( p )) where: 1 1 S = Agent engaging in a credit activity p = Has credit license q = Has not credit license Therefore, given that Forb (A) = Obl ( ¬A ) and Forb ( ¬A ) = Obl (A), we can model the related norms, equivalently in terms of either obligation or prohibition. For example the norm R = Forb (A) = Obl ( ¬A ) can be modeled in terms of: S, representing the class of subjects which the norm applies to; • p (= ¬q ) representing the properties of S; i i conjuction/disjunction of the properties restrictions p (= ¬q ) expressing the i i conditions which the norm is subject to. Such restrictions create a subclass [S]RCompliant of all the individuals of the class S which are compliant with R, for which: p = true or ¬ q = true where: p =¬q i i i i (8) i i While deontic qualifications “obligatory” and “forbidden” are complete (Sartor 2006), meaning that both the action they are concerned with and the complement of that action is completely determined, this is not the case of a permission. In fact, as pointed out by Sartor in Sartor (2006), if we only know that an action is permitted, we do not know the status of its complement. In particular, when a positive action is permitted (namely, the action is not forbidden: Perm(A)=¬Forb(A) ), then its omis- sion can be either likewise permitted or forbidden (this will be the case when the action, besides being permitted, also is obligatory) (Sartor 2006). Norm compliance can be deterministically checked when its deontic qualifica- tion is complete. For a permission this consists in two cases for an action S : 1. Perm(S(p , p , ...p )) ∧ Perm(¬S(p , p , ...p )) : both the action A is permitted and 1 2 i 1 2 i its negation is permitted (in this case we talk about facultativeness) Sartor (2006) 2. Perm(S(p , p , ...p )) is an exception, subject to conditions p , p , ...p , of a prohi- 1 2 i 1 2 i bition The second case, in particular, can be explicitly expressed as a combination of norms, as for the cases R3a) and R3b) of our example in Sect.  6, or can be implicit, as for example a norm giving the possibility to smoke in a restaurant 1 3 E. Francesconi, G. Governatori having a proper ventilation system, whose deontic qualification is complete because it represents an exception, subject to condition, to the more general norm which prohibits to smoke in restaurants. In case of permissions, therefore, compliance can be checked when the deon- tic status of the action is complete, therefore it is associated with another norm expressing the permission of the complement of that action, or expressing the prohibition of that action, whose specialisation according to conditions is actu- ally permitted. This means that, in case of permissions, compliance checking of an action has to involve the analysis of the norms which determine its complete deontic status. On the other hand, by analysing just a permission qualification of an action, we can deterministically conclude that, if an individual performs a per- mitted action, this individual is compliant with that permission, even if we cannot say anything about the compliance or not of the complement of that action. In our approach checking compliance with a permission means verifying if an individual performs a permitted action, resulting compliant with that permission. The evaluation of the compliance or not compliance of the complement of that action is left to other related norms, if any, contributing to the complete deontic qualification of the permission. This is actually what happens when we want to determine the deontic status of an action by permissions interpretation. Therefore, given that Perm(A)=¬Forb(A), a permission can be modeled according to the approach followed for other deontic norms. Following the notation previously introduced, since A = S(p ∧ p ∧ ... ∧ p ), 1 2 n for a permission whose deontic qualification is complete, we have: Perm(S(p ∧ p ∧ ... ∧ p ))=¬Forb(S(p ∧ p ∧ ... ∧ p )) 1 2 n 1 2 n (9) = Forb(S(¬p ∨¬p ∨ ... ∨¬p )) 1 2 n For example considering: R3b = It is permitted to engage in a credit activity if acting on behalf of a principal and the principal holds a credit activity provided the principal has not been elected to the parliament R3b = Perm(S(p ∧ p ∧ p )) = Forb(S(¬p ∨¬p ∨ ... ∨¬p )) (10) 1 2 3 1 2 n R3b = Perm(S(p ∧ p ∧ p )) = Forb(S(q ∨ q ∨ ... ∨ q )) (11) 1 2 3 1 2 n where S = “agent engaging credit activity”, p = “is acting on behalf of a princi- pal”, p = “is principal holding a credit activity”, p = “is principal not elected 2 3 in parliament”, q = “is not acting on behalf of a principal”, q = “is principal not 1 2 holding a credit activity”, and q = “is principal elected in parliament”. The norm R = Perm(A)=¬Forb(A) can be modeled in terms of: S, representing the class of subjects which the norm applies to; • p (= ¬q ) representing the properties of S; 1 3 Patterns for legal compliance checking in a decidable framework… conjuction/disjunction of the properties restrictions p (= ¬q ) expressing the i i conditions which the norm is subject to. Such restrictions create a subclass [S]RCompliant of all the individuals of the class S which are compliant with R, for which: p = true or ¬ q = true where: p =¬q i i i i (12) i i Similarly, the detection of the violation of norm R, whose deontic qualification is complete, results in the identification of the individuals which do not respect the combination of property restrictions of R. Such individuals belongs to the class [S] RViolating of the individuals for which the combination of properties p of compli- ant individuals are negated. ¬ p = true or q = true where p =¬q i i i i (13) i i Note that the approach aims to test compliance of state of affairs (namely individu- als of the real world scenario and facts) with respect to the norms, not to provide a framework for fully fledged reasoning about norms (namely deriving automatic conclusions giving premises). 8 Conclusions and future developments In this paper we have presented an approach for legal compliance checking within the Semantic Web, to be effectively applied in a Linked Open Data framework. It is based on the representation of deontic norms, as distinct from the related provisions, in terms of domain ontology and ontology properties restrictions. The approach is implemented by decidable fragments of OWL 2, able to guarantee computational tractability and the possibility of using available reasoners. We have also shown how this approach can handle norm defeasibility. Future developments of this work can use more complex modalities to express constraints for specific properties, as using SHACL. Moreover, this approach can be used as a reference model for automatic procedures aimed to extract norms from legal texts and represent them “as code” with the aim of automatic compliance checking of specific state of affairs. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Com- mons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the https:// www. w3. org/ TR/ shacl/. 1 3 E. Francesconi, G. Governatori material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/. References Agnoloni T, Bacci L, Francesconi E, Spinosa P, Tiscornia D, Montemagni S, Venturi G (2007) Build- ing an ontological support for multilingual legislative drafting. In: Proceedings of the Jurix con- ference, pp 9–18 Athan T, Governatori G, Palmirani M, Paschke A, Wyner A (2015) LegalRuleML: Design princi- ples and foundations. In: The 11th reasoning web summer school. https:// doi. org/ 10. 1007/ 978-3- 319- 21768-0_6 Batsakis S, Baryannis G, Governatori G, Ilias T, Antoniou G (2018) Legal representation and reason- ing in practice: A critical comparison. In: Palmirani M (ed) Legal knowledge and information systems, vol 313. Frontiers in artificial intelligence and applications. IOS Press, Amsterdam, pp 31–40. https:// doi. org/ 10. 3233/ 978-1- 61499- 935-5- 31 Bhuiyan H, Governatori G, Bond A, Demmel S, Islam MB, Rakotonirainy A (2020) Traffic rules encoding using defeasible deontic logic. In: Villata S (ed) JURIX 2020: the 33rd international conference on legal knowledge and information systems. Frontiers in artificial intelligence and applications, vol. 334, pp 3–12. IOS Press, Amsterdam. https:// doi. org/ 10. 3233/ FAIA2 00844 Biagioli C (2009) Modelli Funzionali delle Leggi. Verso testi legislativi autoesplicativi. Legal infor- mation and communications technologies series, vol  6. European Press Academic Publishing, Florence Breuker J (2004) Constructing a legal core ontology: Lri-core. In: Proceedings of the workshop on ontol- ogies and their applications. Porto Alegre, Brazil Casellas N (2008) Modelling legal knowledge through ontologies. OPJK: the ontology of professional judicial knowledge. PhD thesis, Institute of Law and Technology, Autonomous University of Bar- celona, Barcelona Ceci M, Gangemi A (2016) An owl ontology library representing judicial interpretations. Semant Web J 7(3):229–253 Ceci M (2013) Representing judicial argumentation in the semantic web. In: Casanovas P, Pagallo U, Palmirani M, Sartor G (eds) Proceedings of the Vth workshop on artificial intelligence and the com- plexity of legal systems (AICOL). Springer, Berlin, pp 172–187 de Ven SV, Breuker J, Hoekstra R, Wortel L (2008) Automated legal assessment in OWL 2. In: Franc- esconi E, Sartor G, Tiscornia D (eds) Legal knowledge and information systems—proceeding of the JURIX conference. Frontiers in artificial intelligence and applications, vol 189. IOS Press, Amster - dam, pp 170–175 Francesconi E (2014) A description logic framework for advanced accessing and reasoning over norma- tive provisions. Int J Artif Intell Law 22(3):291–311 Francesconi E (2016) Semantic model for legal resources: Annotation and reasoning over normative pro- visions. Semant Web J 7(3):255–265 Francesconi E (2019) Reasoning with deontic notions in a decidable framework. In: Peruginelli G, Faro S (eds) Knowledge of the law in the Big Data age. Frontiers in artificial intelligence and applications, vol 317. IOS Press, Amsterdam, pp 63–77 Francesconi E, Governatori G (2019) Legal compliance in a linked open data framework. In: Legal knowledge and information systems. IOS Press, Amsterdam, pp 175–180 Fungwacharakorn W, Tsushima K, Satoh K (2021) Resolving counterintuitive consequences in law using legal debugging. Artif Intell Law 29(4):541–557. https:// doi. org/ 10. 1007/ s10506- 021- 09283-7 Gabbay D, Horty J, Parent X, van der Mayden R, van der Torre L (eds) (2013) Handbook of deontic logic and normative systems. College Publications, London Gandon F, Governatori G, Villata S (2017) Normative requirements as linked data. In: Wyner A, Casini G (eds) Legal knowledge and information systems—proceeding of the JURIX conference, vol 302. IOS Press, Amsterdam, pp 1–10 1 3 Patterns for legal compliance checking in a decidable framework… Gangemi A, Sagri M, Tiscornia D (2005) A constructive framework for legal ontologies. In: Benjamins C, Breuker G (eds) Law and the semantic web. Springer, Berlin Gordon T (2011) Combining rules and ontologies with carneades. In: Proceedings of the 5th international RuleML2011@BRF challenge, vol 799. CEUR-WS.org Governatori G, Olivieri F, Rotolo A, Scannapieco S (2013) Computing strong and weak permissions in defeasible logic. J Philos Logic 42(6):799–829. https:// doi. org/ 10. 1007/ s10992- 013- 9295-1 Governatori G, Casanovas P, de  Koker L (2020) On the formal representation of the australian spent conviction scheme. In: Gutiérrez  Basulto V, Kliegr T, Soylu A, Giese M, Roman D (eds) Rules and reasoning. LNCS, vol 12173. Springer, Cham, pp 177–185. https:// doi. org/ 10. 1007/ 978-3- 030- 57977-7_ 14 Governatori G, Hashmi M, Lam H, Villata S, Palmirani M (2016) Semantic business process regula- tory compliance checking using legalruleml. In: Blomqvist E, Ciancarini P, Poggi F, Vitali F (eds) Knowledge engineering and knowledge management. LNAI, vol 10024. Springer, Cham, pp 746–761 Guastini R (2010) Le Fonti del Diritto. Fondamenti teorici. Giuffrè, Milano Hashmi M, Governatori G (2018) Norms modeling constructs of business process compliance manage- ment frameworks: a conceptual evaluation. Artif Intell Law 26(3):251–305. https:// doi. org/ 10. 1007/ s10506- 017- 9215-8 Hashmi M, Governatori G, Wynn MT (2016) Normative requirements for regulatory compliance: an abstract formal framework. Inf Syst Front 18:429–455 Hoekstra R, Breuker J, di Bello M, Boer A (2009) Lkif core: Principled ontology development for the legal domain. In: Breuker J, Casanovas P, Klein M, Francesconi E (eds) Law, ontologies and the semantic web. Frontiers in artificial intelligence and applications, vol 188. IOS Press, Amsterdam, pp 21–52 Hoekstra R, Breuker J, Bello MD, Boer A (2007) The lkif core ontology of basic legal concepts. In: Casa- novas P, Biasiotti M, Francesconi E, Sagri M (eds) Proceedings of the workshop on legal ontologies and artificial intelligence techniques. CEUR workshop proceedings, pp 43–63. http:// CEUR- WS. org/ Vol- 321 Islam MB, Governatori G (2018) RuleRS: A rule-based architecture for decision support systems. Artif Intell Law 26(4):315–344. https:// doi. org/ 10. 1007/ s10506- 018- 9218-0 Kelsen H (1991) General theory of norms. Clarendon Press, Oxford Lam HP, Hashmi M (2019) Enabling reasoning with legalruleml. Theory Pract Log Program 19(1):1–26. https:// doi. org/ 10. 1017/ S1471 06841 80003 39 Lam HP, Governatori G (2009) The making of SPINdle. In: Governatori G, Hall J, Paschke A (eds) Inter- national symposium on rule interchange and applications. LNCS, vol 5858. Springer, Heidelberg, pp 315–322. https:// doi. org/ 10. 1007/ 978-3- 642- 04985-9_ 29 Marmor A (2014) The language of law. Oxford University Press, Oxford OASIS (2017) LegalRuleML core specification version 1.0. http:// docs. oasis- open. org/ legal ruleml/ legal ruleml- core- spec/ v1.0/ csprd 02/ legal ruleml- core- spec- v1.0- csprd 02. html Palmirani M, Governatori G (2018) Legal knowledge modelling for gdpr compliance checking. In: Palmirani M (ed) Legal knowledge and information systems. Frontiers in artificial intelli- gence and applications, vol 313. IOS Press, Amsterdam, pp 101–110. https:// doi. org/ 10. 3233/ 978-1- 61499- 935-5- 101 Palmirani M, Martoni M, Rossi A, Bartolini C, Robaldo L (2018) Pronto: privacy ontology for legal rea- soning. In: Kő A, Francesconi E (eds) Electronic government and the information systems perspec- tive (EGOVIS 2018). Lecture notes in computer science, vol 11032. Springer, Cham, pp 139–152 Pino G (2016) Teoria analitica del diritto. Norma giuridica. ETS. Giappichelli, Turin, pp 144–183 Prakken H, Sartor G (2015) Law and logic: a review from an argumentation perspective. Artif Intell 227:214–245 Ramezani E, Fahland D, van Dongen B, van der Aalst W (2013) Diagnostic information for compli- ance checking of temporal compliance requirements. In: Salinesi C, Norrie M, Pastor O (eds) Pro- ceedings of the 25th international conference (CAiSE 2013). Lecture notes in computer science, vol 7908. Information Systems WSK & Process Science, pp 304–320 Raz J (1980) The concept of a legal system. Oxford University Press, Oxford Robaldo L (2021) Towards compliance checking in reified I/O logic via SHACL. In: Maranhão J, Wyner AZ (eds) ICAIL ’21: 18th international conference for artificial intelligence and law, São Paulo Bra- zil, 21–25 June 2021. ACM, New York, pp 215–219. https:// doi. org/ 10. 1145/ 34627 57. 34660 65 1 3 E. Francesconi, G. Governatori Sartor G (2006) Fundamental legal concepts: a formal and teleological characterisation. Artif Intell Law 14(1–2):101–142 Satoh K, Kubota M, Nishigai Y, Takano C (2009) Translating the japanese presupposed ultimate fact theory into logic programming. In: Governatori G (ed) Legal knowledge and information systems— JURIX 2009: The 22nd annual conference on Legal knowledge and information systems, Rotter- dam, The Netherlands, 16–18 December 2009. Frontiers in artificial intelligence and applications, vol 205. IOS Press, Amsterdam, pp 162–171. https:// doi. org/ 10. 3233/ 978-1- 60750- 082-7- 162 Searle J (1969) Speech acts: an essay in the philosophy of language. Cambridge University Press, Cambridge van Hee K, Hidders J, Houben GJ, Paredaens J, Thiran P (2010) On-the-fly auditing of business pro- cesses. Springer, Berlin, pp 144–173. https:// doi. org/ 10. 1007/ 978-3- 642- 18222-8_7 Witt A, Huggings A, Governatori G, Buckley J (2021) Converting copyright legislation into machine- executablecode: interpretation, coding validation and legal alignment. In: Wyner A (ed) Proceedings of ICAIL 2021. ACM, New York, pp 139–148. https:// doi. org/ 10. 1145/ 34627 57. 34660 83 Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. 1 3 http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Artificial Intelligence and Law Springer Journals

Patterns for legal compliance checking in a decidable framework of linked open data

Loading next page...
 
/lp/springer-journals/patterns-for-legal-compliance-checking-in-a-decidable-framework-of-60jUUHnAdJ
Publisher
Springer Journals
Copyright
Copyright © The Author(s) 2022
ISSN
0924-8463
eISSN
1572-8382
DOI
10.1007/s10506-022-09317-8
Publisher site
See Article on Publisher Site

Abstract

This paper presents an approach for legal compliance checking in the Semantic Web which can be effectively applied for applications in the Linked Open Data envi- ronment. It is based on modeling deontic norms in terms of ontology classes and ontology property restrictions. It is also shown how this approach can handle norm defeasibility. Such methodology is implemented by decidable fragments of OWL 2, while legal reasoning is carried out by available decidable reasoners. The approach is generalised by presenting patterns for modeling deontic norms and norms compli- ance checking. Keywords Legal reasoning · Norm compliance · Semantic Web · OWL 2 1 Introduction Modeling legal rules represents a precondition for developing systems endowed with automatic reasoning facilities for advanced information services in the legal domain. In literature several approaches have been proposed aiming to formalize legal rules to support automatic reasoning, as reasoning on deontic notions (Gabbay et al. 2013), reasoning for norm compliance (Hashmi and Governatori 2018) or for legal argumentation (Prakken and Sartor 2015). The current successful trend of Semantic Web implementation according to a Linked Open Data (LOD) approach is producing, and is supposed to produce in the next few years, a huge and growing amount of data, semantically qualified, avail- able for sharing and reuse. RDF is the language of the Semantic Web, able to describe a scenario of interest by triples composed by master data (namely entities Resource Description Framework. * Enrico Francesconi enrico.francesconi@igsg.cnr.it Istituto di Informatica Giuridica e Sistemi Giudiziari – IGSG-CNR, Florence, Italy Brisbane, Australia Vol.:(0123456789) 1 3 E. Francesconi, G. Governatori like concepts or real world objects), metadata (namely properties of such entities) and their values (reference data). Such RDF triples are able to provide a semantic description of a specific domain: for example in the legal one, they can describe con- cepts, legal rules and facts. In the next future the ability of a legal information sys- tem to process Linked Open Data and to show legal reasoning capabilities will be an essential aspect for having an automatic legal assistant in large scale, endowed with AI capabilities. Legal information retrieval, eDiscovery, legal compliance checking, on-line dispute resolution are just few examples of services which can profit from the representation of legal knowledge in the Semantic Web in terms of rules amena- ble for computation. In this paper we propose an automatic legal compliance checking framework describing legal rules using Semantic Web standards. This framework has been firstly presented in Francesconi (2019), Francesconi and Governatori (2019), while this work presents more extended examples, as well as a generalisation of the approach in terms of a formal model based on recurrent modeling patterns. The approach guarantees the computational tractability of the problem within the Description Logic framework. As developed for the Semantic Web standards, this approach has its natural application in such a scenario like a LOD environment, however it can also be applied in other environments which can exploit the potential of the Semantic Web standards and related reasoning facilities. This paper is organized as follows: in Sect.  2 a contextual background about Semantic Web languages and their computational complexity are introduced; in Sect.  3 a review of related works about legal reasoning is given, including exam- ples within a description logic computational complexity; in Sect.  4 the distinction between the concepts of Provision and Norm from the legal theory point of view is discussed (Marmor 2014); in Sect.  5 an approach for modeling norms using ontol- ogies, able to implement norm compliance checking within a decidable computa- tional framework is described and tested on examples; in Sect.  6 the ability of the approach to deal with norm defeasibility is presented; in Sect. 7 a generalisation of such an approach is proposed by identifying patterns for modeling deontic norms and norms compliance checking. Finally, in Sect.  8 some conclusions and possible future developments are reported. 2 Semantic technologies background For sharing information on the Web in a way that is understandable by both humans and machines, the Semantic Web and LOD principles recommend to use OWL/ RDF(S) standards, able to provide a semantic description of an information sce- nario of interest. RDF is used for describing instances of such scenario in terms of classes and properties, OWL (including RDF Schema) is the language for rep- resenting knowledge models (ontologies) able to give meaning to such classes and properties. Ontology Web Language/Resource Description Framework (Schema). 1 3 Patterns for legal compliance checking in a decidable framework… OWL can be used at different levels of expressiveness, introducing different lev - els of computational complexity: OWL-Full is not decidable, namely an algorithm able to guarantee inferences in a finite time does not exist; OWL-DL is a decid- able fragment of OWL-Full, namely there are algorithms able to guarantee infer- ences in a finite time; finally OWL-Lite is a decidable fragment of OWL-DL, with reduced expressiveness. For OWL-DL (hence for OWL-Lite) several reasoners have 4 5 6 been developed, like Pellet, Racer, HermiT, able to generate inferences based on a knowledge model. More recently OWL 2 has been introduced to extend the expressiveness of OWL, keeping the same three levels of complexity, while intro- ducing three additional decidable languages, optimized in terms of expressiveness and computability, for specific tasks: OWL 2-EL for ontologies with large amount of classes and properties; OWL 2-QL for the purpose of managing large volumes of data; OWL 2-RL for applications that require scalable ways of reasoning without sacrificing the expressive power of the language. In the Semantic Web, the implementation of decidable profiles of OWL or OWL 2 guarantees the computational tractability of specific types of reasoning, in par - ticular reasoning for legal information, like advanced legal information retrieval and norm compliance (Gandon et  al. 2017), while it allows us to use already available reasoners. For representing legal information in the Semantic Web, languages like OWL/ RDF(S) for modeling real world scenarios are usually used, as well as mainly SWRL or RIF for representing legal rules governing such scenarios. Recently, LegalRuleML for modeling legal rules, including defeasible rules representation and defeasible reasoning, has been proposed (Athan et al. 2015; Governatori et al. 2016). 3 Related works OWL is the state-of-the-art language for knowledge modeling in the Semantic Web, effectively used for creating ontologies able to represent concepts and relations of real world scenarios (Casellas 2008): examples in the legal informatics literature are LRI-Core (Breuker 2004), LKIF (Hoekstra et al. 2007), CLO (Gangemi et al. 2005), DALOS (Agnoloni et al. 2007), PrOnto (Palmirani et al. 2018). On the other hand, in the Semantic Web legal rules have been represented in literature using a variety of languages. Hoekstra et al. (2009) proposed to use SWRL or RIF in combination with an ontological representation of norms and facts. Gordon (2011) introduced rules description using specific XML schemas in combination with ontologies. OWL Description Logic. https:// github. com/ stard og- union/ pellet https:// www. ifis. uni- luebe ck. de/ ~moell er/ racer/. http:// www. hermit- reaso ner. com/. https:// www. w3. org/ TR/ owl2- overv iew/. Like OWL 2 DL, OWL 2 EL, OWL 2 QL and OWL 2 RL. 1 3 E. Francesconi, G. Governatori More recently LegalRuleML (OASIS 2017), as specialization of the RuleML stand- ard, has been proposed as language for representing legal rules. In the last few years several studies have been made to approach the problem of legal reasoning in a decidable computational complexity profile. Van de Ven et al. (2008) proposed HARNESS, a knowledge-based system developed within the ESTRELLA project, able to implement reasoning over norms for legal assessment, basically the evaluation whether a case is allowed or disallowed given an appropriate body of legal norms. HARNESS includes two knowledge bases: a domain ontology and a set of norms representing the normative articles. Both are developed within the OWL 2 DL profile. Assessment consists in classifying individuals and properties making up a case description in terms of both ontology and norms simultaneously. The result tells whether norms are violated or not. Ceci and Gangemi (2016) devel- oped an OWL 2 judicial ontology library (JudO) representing the interpretations performed by a judge when conducting legal reasoning towards the adjudication of a case. On the other hand, Ceci in Ceci (2013) combines the features of description logic-based ontologies with non-monotonic logics such as the defeasible one. Deon- tic extensions of Defeasible Logic have been proposed (Governatori et al. 2013) and efficient implementations have been developed (Lam and Governatori 2009) and successfully tested on larges scale encodings (Governatori et  al. 2020; Witt et  al. 2021). To achieve effective reasoning with large dataset, integration with relational databases has been proposed (Islam and Governatori 2018). However, until recent, there was a limited integration with ontologies; to obviate this issue (Bhuiyan et al. 2020) proposed a combination of ontologies and SPARQL queries and a defeasible reasoner for the modeling compliance of autonomous vehicles against traffic rules. Another approach based on non-monotonic reasoning is the PROLEG system pro- posed by Satoh and coworker created initially to provide a formal model of the Japa- nese Civil Code (Satoh et  al. 2009; Fungwacharakorn et  al. 2021). Batsakis et  al. (2018) discussed and comparised some pratical implementations for reasoning with legal norms. A formal framework for reasoning on normative requirements for regulatory compliance is presented by Hashmi et al. (2016). The proposed framework is inde- pendent of any existing formalism, and provides a conceptual representation of the semantics of norms needed for business process compliance checking. The frame- work has been implemented and tested (Governatori et  al. 2016; Palmirani and Governatori 2018). On the other hand, recently Gandon et  al. (2017) proposed an approach to represent legal rules as Linked Open Data. It aims to respond to the requirements of representing the deontic aspects of normative rules and reasoning on them with Semantic Web languages, as RDFS and OWL for knowledge repre- sentation and SPARQL for queries. The rationale of the proposed approach is cou- pling OWL reasoning with SPARQL rules to formalize and implement legal rea- soning (as for example deontic reasoning and compliance checking). In particular normative requirements are represented using LegalRuleML and the deontic conclu- sions of legal rules are added to each named graph of the concerned state of affairs. Recently, implementation of LegalRuleML have been provided with provisions to integrate with other Semantic Web technologies (Lam and Hashmi 2019; Robaldo 2021). For the particular case of legal compliance checking, van Hee et  al. (2010) 1 3 Patterns for legal compliance checking in a decidable framework… Fig. 1 The Provision Model top classes (“prv:” is the namespace for provisions) and Ramezani et  al. (2013) showed other approaches based on Petri-Net patterns and alignments. For a survey of regulatory compliance checking in the context of business process see (Hashmi and Governatori 2018). The main contribution of this paper with respect to the literature is that it presents an approach for legal compliance checking based on the distinction between Provi- sions and Norms represented by using decidable fragments of OWL 2/RDF(S) for knowledge modeling and rules representation. This allows us to rely on available decidable reasoners, while leaving to SPARQL the sole task to query the dataset of inferred triples in order to verify deontic conclusions or norm compliance. Moreo- ver, the approach is able to cope with defeasible rules. 4 Provisions and norms According to the legal theory point of view, the legal order can be seen as a legal discourse composed by linguistic entities or speech acts (Searle 1969) with descrip- tive or prescriptive functions. Every linguistic entity can be seen in a twofold per- spective: as a set of signs organized in words and sentences, as well as the mean- ing of such signs. Following the same twofold view for the legal domain, we can distinguish two levels of interpretation of a linguistic entity expressing a legal rule: in terms of a set of signs organized in words and sentences for creating a normative statement, typically called Provision (Raz 1980; Biagioli 2009), as well as in terms of the meaning for application of such normative statement, typically called Norm (Guastini 2010; Marmor 2014). Provisions have been classified in Biagioli (2009) in terms of provision types, organised into two main groups (Fig. 1): Rules and Rules on Rules. Rules can be Constitutive Rules as Definition introducing entities, or Regulative Rules as the deontic concepts Duty and Right (or in a more deontic oriented terms Obliga- tion and Permission), as well as Power etc., regulating subject roles and activi- ties. Rules on Rules are different kinds of amendments: Temporal, Extension or Content amendments. Each provision type is characterized by specific attributes (for example the Bearer or the Counterpart of a Right/Permission), reflecting the lawmaker directions. Provision types and attributes can be considered as a sort of 1 3 E. Francesconi, G. Governatori Table 1 Relationship with time Provision (in-force) Norm (effective) of Provision and Norm Yes Yes Yes No No Yes No No Retro-activity/ultra-activity metadata model able to analytically describe fragments of legislative texts, hence the name of Provision Model (Biagioli 2009). In this vision, norms represent the way how provisions are applied; as such they represent the product of an interpretative process (Kelsen 1991). Provi- sions and related norms have, therefore, different roles and properties pertaining to different abstraction levels. Moreover, there may be not a bijective relation- ship between them: a norm can be expressed by different provisions, as well as it can be valid the opposite, namely one provision can include more norms (Pino 2016). They have also different relationships with time. Provisions, as pure tex- tual objects, are the product of lawmaking (legal drafting activity and promul- gation) and are characterized by the in-force date, namely the starting date of their existence in the legal order. On the other hand, norms are the meaning of provisions, namely their applicative interpretation; as such they are character- ized by the efficacy date, namely the starting date in which a norm can be con- cretely applied. For example a taxation rule, in-force at time t (time when the related provision enters the legal order), can express the application of a specific tax starting from time t (> t ). In this case t is the efficacy date of the norm. 2 1 2 Therefore (see Table  1), while it is obvious that we can have cases of provisions in-force and related norms effective, as well as provisions not in-force and related norms not effective, we can also have provisions in-force and related norms not effective, as well as the symmetric case, provisions not in-force and related norms effective (this last one is usually referred as retro-activity (efficacy in the past) or ultra-activity (efficacy in the future) of a norm. Having different nature, such concepts operate in different domains. A provision, as pure textual object, represents the building block of the legal order (new provisions can enter or leave the legal order itself). On the other hand, a norm can either modify the text of other provisions (in case of different type of amendments) or can introduce restrictions on the real world (in case of obliga- tions, for example). Advanced legal information retrieval, able to implement reasoning on deontic notions, is a type of reasoning managing textual information, thus pertaining to provisions. A typical example is a system able to implement Hohfeldian reason- ing, in which a user submits a query to a legal document collection in order to find the rights/permissions of a bearer A towards a counterpart B: following an Hohfeldian reasoning the system should be able to retrieve back also the provi- sions expressed as duties/obligations of the bearer B towards the counterpart A, 1 3 Patterns for legal compliance checking in a decidable framework… Fig. 2 Norm R1 represented as restriction on the Supplier’s property hasCommunicatedConditions and examples of non-compliant (s1) and compliant (s2) individuals (note that the subclass relation between SupplierR1Compliant and Supplier is inferred) because such obligations can also be seen as A’s permissions. An OWL 2 DL approach using the Provision Model for this type of reasoning is illustrated in Francesconi (2014, 2016). On the other hand, legal compliance checking is a process aiming to verify if a fact, occurring in the real world, complies with existing norms. Real world scenarios and facts can be effectively represented in terms of ontologies and related individu- als, respectively. Norms, which facts have to be compliant with, provide constraints on the reality, therefore they can be modeled as restrictions on ontology properties. Such modeling can be used for legal compliance checking. Hereinafter we illustrate an OWL 2 DL approach for modeling norms and how such modeling can be used for the aim of legal compliance checking. 5 Modeling norms for legal compliance checking Let’s consider two examples of legal rules, R1 and R2, to illustrate our approach: R1: The supplier shall communicate to the consumer all the contractual terms and conditions R2: According to a [country] law, one cannot drive over 90 km/h Both rules are speech acts, namely Provisions in specific regulations. In this sense R1, can be classified as an Obligation of a Supplier towards a Consumer, while R2 can be classified as an Obligation for any Driver in a specific country. The related modeling, according to the Provision Model approach described in Francesconi (2016), can support advanced legal information retrieval, including Hohfeldian reasoning. Derived from Directive 2002/65/EC art. 5. 1 3 E. Francesconi, G. Governatori Fig. 3 Norm R2 represented as restriction on the Driver’s property hasDrivingSpeed and examples of compliant (d1, d2, d3) and non-compliant (d4) individuals On the other hand, when we consider the application of rules like R1 or R2 on specific facts, we actually talk about Norms. As previously discussed, norms can be viewed as constraints on the real world scenario to be regulated. 5.1 Norm R1 representation and facts compliance checking In case of R1, the scenario which R1 applies to, can be modeled in terms of an ontology including a class Supplier, having a boolean property hasCommunicat- edConditions. In OWL 2 terms, the scenario concerning R1 can be expressed as in Fig. 2, where myo: is a fictitious namespace for the ontology “MyOntology”. Norm R1, expressing an obligation, states that suppliers must communicate pur- chasing conditions to the consumers. In our approach, norm R1 is represented as a restriction on the property hasCommunicatedConditions able to identify the class SupplierR1Compliant of individuals for which the value of the property under consideration is “true”, as shown in Fig.  2. The individuals of the class Supplier complying with this norm are all those and only those belonging to the subclass SupplierR1Compliant (Fig.  2). Such a representation for the real world scenario and related norm expressed by R1, results in the OWL 2 DL decidable profile. This modeling allows us to use a OWL 2 DL decidable reasoner in order to implement reasoning facilities as compliance checking with respect to R1. The inferred model produced by the DL reasoner establishes the rdfs:subClassOf relation between SupplierR1Compliant and Supplier (as shown in Fig.  2). Therefore, compliance checking according to the norm R1 is a problem of checking if an individual of type Supplier belongs also to the class SupplierR1Compliant. Such as Pellet (https:// github. com/ stard og- union/ pellet) and Racer (https:// www. ifis. uni- luebe ck. de/ ~moell er/ racer/). 1 3 Patterns for legal compliance checking in a decidable framework… As a concrete example let’s consider the two individuals s1 and s2 (Fig. 2) of the class Supplier. s1 is an individual not compliant with R1, while s2 is complaint with R1. The following SPARQL query ?  { ?  ∶   ∶ is able to select the individuals which are complaint with R1 (in our case s2). Legal reasoning in terms of norm compliance checking is therefore performed in a LOD framework, using available reasoners in a decidable computational complexity profile. 5.2 Norm R2 representation and facts compliance checking In case of R2, the vehicle drivers circulation scenario can be modeled in terms of an ontology including a class Driver, having a datatype property hasDrivingSpeed with range in the xsd:float datatype. In OWL 2 terms, the vehicle drivers circulation sce- nario concerning R2 can be expressed as in Fig. 3. Norm R2, expressing an obligation, states that, according to a specific country law, one cannot drive over 90 km/h. In our approach norm R2 is represented as a restric- tion on the property hasDrivingSpeed able to identify the class DriverR2Compli- ant of individuals for which the values of the property under consideration are in the range [0.0 km/h, 90.0 km/h], as shown in Fig. 3. In order to represent such constraints, the following restriction on the datatype property myo:hasDrivingSpeed to values (inclusively) between 0.0 and 90.0 km/h can be expressed by the xsd:minInclusive and xsd:maxInclusive datatype bound properties. The individuals of the class Driver complying with this norm are all those and only those belonging to the subclass Driv- erR2Compliant (Fig.  3). Also such a representation for the real world scenario and related norm, expressed by R2, results in the OWL 2 DL decidable profile. As in the previous example, the inferred model, produced by the DL reasoner, establishes a rdfs:subClassOf relation between DriverR2Compliant and Driver (as shown in Fig.  3). Therefore, compliance checking according to the norm R2 is a problem of checking if an individual of type Driver belongs also to the class DriverR2Compliant. As a concrete example, let’s consider the four individuals of the class Driver shown in Fig. 3. The individual d4 is not compliant with R2 (having speed 95.0 Km/h ≥ 90.0 Km/h) (Fig. 3). The following query ?  { ?  ∶   ∶ is able to select the individuals which are complaint with R2 (in our case d1, d2 and d3). Also in this case norm compliance checking is performed within a decidable computational complexity profile. 1 3 E. Francesconi, G. Governatori Fig. 4 New version of norm R2 represented as restriction on the Driver’s property hasDrivingSpeed and examples of compliant and non-compliant individuals 6 Modeling norms defeasibility for legal compliance checking Defeasibility is the property of an argumentation system for which a conclusion is open to revision in case evidence to the contrary is provided (Athan et  al. 2015). This particularly holds in legal reasoning which is a typical case of non-monotonic reasoning, where norm conflicts or norm exceptions might breach a previous con- clusion. In this section, two examples, one dealing with norm conflict and one with norm exception, are modeled within a description logic framework. We also show how such modeling can provide support for defeasible legal reasoning, for example in norm compliance checking. As first example, let’s consider rule R2, modeled in Sect.  5, and the following new version of rule R2, introducing a more strict driving speed limit at 80 Km/h: R2: According to a [country] law, one cannot drive over 80 km/h The new version of R2 can defeat the previous compliance conclusions, in the sense that individuals, which were compliant with the old version of R2, might not be compliant with it anymore (this is the case in the example in Fig. 4 of the individual d3). In order to cope with this change, the same model (without changing anything on the names of the classes) can be updated just by changing the original restriction on the datatype property hasDrivingSpeed with a new one expressed by the new version of R2, as shown in Fig.  4. Without changing anything on the individuals, their membership to the class DriverR2Compliant changes accordingly so that, for example, the individual d3, compliant with the old version of R2 (Fig. 3), is no more compliant with the new version of R2 (Fig.  4). Therefore, the query able to select compliant individuals remains the same: ?  { ?  ∶   ∶ it retrieves the only individuals compliant with the new version of R2, which are d1 and d2 . 1 3 Patterns for legal compliance checking in a decidable framework… Fig. 5 Norm R3 represented as restriction on the AgentEngagingCreditActivity’s properties (note that the subclass relations between AgentEngagingCreditActivity and classes of R3, R3a, R3b and R3c compliant or violating individuals are inferred) As second example, let’s consider the following rule R3 which establishes the limits for engaging credit activities in a jurisdiction, composed by the following 3 statements ( R3 = R3a ∪ R3b ∪ R3c ): (R3a) It is forbidden to engage in a credit activity without a credit license. (R3b) It is permitted to engage in a credit activity if acting on behalf of a principal and the principal holds a credit activity provided the principal has not been elected to the parliament. (R3c) It is permitted to engage in a credit activity if acting on behalf of a body corpo- rate and the person has been appointed as representative of the body corporate. The defeasibility of the norm R3 consists in an exception (R3a) which can defeat the previous compliance conclusions about the engagement of an agent in a credit activity, and in the exceptions of exception to it (R3b and R3c) which can defeat the conclusions about the prohibition established by R3a. The whole scenario addressed by norm R3 can be modeled through an ontol- ogy (see Fig.  5) describing a class Agent and a specific subclass AgentEngag- ingCreditActivity of the subclass of agents who engage in a credit activity. Also in this case the deontic concepts Prohibition and Permission, expressed in R3a, Inspired by Sect. 29 of the Australian Consumer Credit Protection Act. 1 3 E. Francesconi, G. Governatori R3b and R3c, are represented as restrictions on the datatype properties having domain AgentEngagingCreditActivity and expressing the conditions which the norm is subject to. The individuals of the class Agent can engage a credit activ- ity, thus belonging to the subclass AgentEngagingCreditActivity. According to the constraints expressed in R3, individuals can: p1 have a credit license (hasCreditLicense) p2 act on behalf of a principal (isActingOnBehalfOfPrincipal) p3 have principal holding a credit activity (isPrincipalHoldingCreditActivity) p4 have principal elected in Parliament (isPrincipalElectedInParliament) p5 act on behalf of a body corporate (isActingOnBehalfOfBodyCorporate) p6 act as representative of a body corporate (isRepresentativeOfBodyCorporate) Norm R3a states that engaging in a credit activity “is forbidden without a credit license”. Therefore, if an individual of the class AgentEngagingCredi- tActivity has a credit license (hasCreditLicence = “true”) the activity is permit- ted. This is modeled as restriction on the property hasCreditLicence so to create a subclass AgentEngagingCreditActivityR3aCompliant of individuals having “true” as value of the property hasCreditLicence. In Fig. 5 the individual ag2 is compliant to the norm R3a. Norm R3b states that the activity is permitted also when the individual “is acting on behalf of a principal” and “the principal holds a credit activity” and “the principal is not elected in Parliament”. This is modeled through a multiple restriction on the properties isActingOnBehalfOfPrincipal = true, isPrincipal- HoldingCreditActivity = true and isPrincipalElectedInParliament = false, so to create a subclass of individuals for which the previous three restrictions con- temporarily hold (the result is individuals belonging to the intersection of the sub- classes created by the three restrictions). In Fig. 5 the individual ag3 is compliant with norm R3b, because it has the value “true” on both the properties isActin- gOnBehalfOfPrincipal and isPrincipalHoldingCreditActivity and “false” on the property isPrincipalElectedInParliament. Very similar considerations can be made for R3c modeling, concerning restrictions on the properties expressed by the conditions for individuals compliant with R3c. The individuals compliant with the whole R3, composed by R3a, R3b and R3c, are therefore those belonging to the class AgentEngagingCreditActivityR- 3Compliant, obtained as disjoint union of the classes AgentEngagingCreditAc- tivityR3aCompliant, AgentEngagingCreditActivityR3bCompliant, AgentEn- gagingCreditActivityR3cCompliant. In all the other cases, engaging in a credit activity is forbidden. Therefore, the individuals which do not respect the combi- nation of property restrictions, violate norm R3, namely they belong to the class AgentEngagingCreditActivityR3Violating. In Fig. 5 the individual ag1 violates norm R3. The combination of the property restrictions p1, ..., p6 able to identify individuals violating norm R3 can be obtained by the negation of the combina- tion of properties of compliant individuals. In the case of R3, and applying the De Morgan laws, we obtain: 1 3 Patterns for legal compliance checking in a decidable framework… ¬[p1 ∨(p2 ∧ p3 ∧¬p4)∨ (p5 ∧ p6)] (1) =¬p1 ∧ (¬p2 ∨¬p3 ∨ p4)∧(¬p5 ∨¬p6) In order to verify which individuals are compliant or are violating R3, the following queries on the inferred model are respectively sufficient: {? ∶  ∶ {? ∶  ∶ 7 Patterns for deontic norms compliance checking In this section we aim to generalise the approach presented in the previous sections, for representing deontic norms and implementing an automatic compliance check- ing procedure within a description logic computational framework. The examples R1, R2 and R3, discussed in Sects.  5 and 6, represent deontic norms expressed in terms of prohibition, obligation or permission. More in general, given any action description A, prohibition, obligation and permission can be repre- sented by formulas having the following structure: – Forb (A) (it is forbidden that A) – Oblig (A) (it is obliged that A) – Perm (A) (it is permitted that A) As underlined in Sartor (2006) a minimal deontic logic can be expressed through the following definitions and axioms: – Being prohibited to perform an action means being obliged not to do it (Forb A = Obl NOT A). – Being permitted to perform an action means not being forbidden to do it (Perm A = NOT Forb A). – Being obliged to perform an action entails being permitted to perform it (IF Obl A THEN Perm A). – Being both obliged to perform action A and obliged to perform action B entails being obliged to perform both actions (IF (Obl A AND Obl B) THEN Obl (A AND B)). Given the previous relations, the following implications hold: Forb(A)= Obl(¬A)⟹ Forb(¬A)= Obl(A) (2) 1 3 E. Francesconi, G. Governatori Perm(A)=¬Forb(A)⟹ ¬Perm(A)= Forb(A) (3) Combining Eqs. (2) and (3) we have: Forb(A)=¬Perm(A)= Obl(¬A) (4) An example of equivalent relations at (4) is the statement R3a): It is forbidden to engage in a credit activity without a credit license. which is equivalent to: It is not permitted to engage in a credit activity without a credit license. and also equivalent to: It is obliged to engage in a credit activity with a credit license. where the action description A is: to engage in a credit activity without a credit license. An action description A can be decomposed in terms of a subject category S expressing behavioural or productive actions (Sartor 2006), as well as a set of properties p , whose negation q =¬p , represent conditions for A. i i i Therefore we have: Forb(A)= Forb(S(q ∧ q ∧ ... ∧ q )) (5) 1 2 i For example, being R3a = It is forbidden to engage in a credit activity without a credit license and given A = To engage in a credit activity without a credit license S = Agent engaging in a credit activity q =¬p = Has not credit license 1 1 R3a can be expressed as: R3a = it is forbidden that S without credit license and represented as follows R3a = Forb (S (q )) Forb (A) can also be expressed as an obligation of ¬A as follows: Forb(A)= Obl(¬A) (6) 1 3 Patterns for legal compliance checking in a decidable framework… Obl(¬S(q ∧ q ∧ ... ∧ q )) = Obl(S(p ∧ p ∧ ... ∧ p )), where p =¬q (7) 1 2 i 1 2 i i i For example, considering R3a = it is forbidden that S engages in a credit activity without credit license = it is obligatory that S engages credit activity with credit license we have R3a = Forb (S ( q )) = Obl (S ( p )) where: 1 1 S = Agent engaging in a credit activity p = Has credit license q = Has not credit license Therefore, given that Forb (A) = Obl ( ¬A ) and Forb ( ¬A ) = Obl (A), we can model the related norms, equivalently in terms of either obligation or prohibition. For example the norm R = Forb (A) = Obl ( ¬A ) can be modeled in terms of: S, representing the class of subjects which the norm applies to; • p (= ¬q ) representing the properties of S; i i conjuction/disjunction of the properties restrictions p (= ¬q ) expressing the i i conditions which the norm is subject to. Such restrictions create a subclass [S]RCompliant of all the individuals of the class S which are compliant with R, for which: p = true or ¬ q = true where: p =¬q i i i i (8) i i While deontic qualifications “obligatory” and “forbidden” are complete (Sartor 2006), meaning that both the action they are concerned with and the complement of that action is completely determined, this is not the case of a permission. In fact, as pointed out by Sartor in Sartor (2006), if we only know that an action is permitted, we do not know the status of its complement. In particular, when a positive action is permitted (namely, the action is not forbidden: Perm(A)=¬Forb(A) ), then its omis- sion can be either likewise permitted or forbidden (this will be the case when the action, besides being permitted, also is obligatory) (Sartor 2006). Norm compliance can be deterministically checked when its deontic qualifica- tion is complete. For a permission this consists in two cases for an action S : 1. Perm(S(p , p , ...p )) ∧ Perm(¬S(p , p , ...p )) : both the action A is permitted and 1 2 i 1 2 i its negation is permitted (in this case we talk about facultativeness) Sartor (2006) 2. Perm(S(p , p , ...p )) is an exception, subject to conditions p , p , ...p , of a prohi- 1 2 i 1 2 i bition The second case, in particular, can be explicitly expressed as a combination of norms, as for the cases R3a) and R3b) of our example in Sect.  6, or can be implicit, as for example a norm giving the possibility to smoke in a restaurant 1 3 E. Francesconi, G. Governatori having a proper ventilation system, whose deontic qualification is complete because it represents an exception, subject to condition, to the more general norm which prohibits to smoke in restaurants. In case of permissions, therefore, compliance can be checked when the deon- tic status of the action is complete, therefore it is associated with another norm expressing the permission of the complement of that action, or expressing the prohibition of that action, whose specialisation according to conditions is actu- ally permitted. This means that, in case of permissions, compliance checking of an action has to involve the analysis of the norms which determine its complete deontic status. On the other hand, by analysing just a permission qualification of an action, we can deterministically conclude that, if an individual performs a per- mitted action, this individual is compliant with that permission, even if we cannot say anything about the compliance or not of the complement of that action. In our approach checking compliance with a permission means verifying if an individual performs a permitted action, resulting compliant with that permission. The evaluation of the compliance or not compliance of the complement of that action is left to other related norms, if any, contributing to the complete deontic qualification of the permission. This is actually what happens when we want to determine the deontic status of an action by permissions interpretation. Therefore, given that Perm(A)=¬Forb(A), a permission can be modeled according to the approach followed for other deontic norms. Following the notation previously introduced, since A = S(p ∧ p ∧ ... ∧ p ), 1 2 n for a permission whose deontic qualification is complete, we have: Perm(S(p ∧ p ∧ ... ∧ p ))=¬Forb(S(p ∧ p ∧ ... ∧ p )) 1 2 n 1 2 n (9) = Forb(S(¬p ∨¬p ∨ ... ∨¬p )) 1 2 n For example considering: R3b = It is permitted to engage in a credit activity if acting on behalf of a principal and the principal holds a credit activity provided the principal has not been elected to the parliament R3b = Perm(S(p ∧ p ∧ p )) = Forb(S(¬p ∨¬p ∨ ... ∨¬p )) (10) 1 2 3 1 2 n R3b = Perm(S(p ∧ p ∧ p )) = Forb(S(q ∨ q ∨ ... ∨ q )) (11) 1 2 3 1 2 n where S = “agent engaging credit activity”, p = “is acting on behalf of a princi- pal”, p = “is principal holding a credit activity”, p = “is principal not elected 2 3 in parliament”, q = “is not acting on behalf of a principal”, q = “is principal not 1 2 holding a credit activity”, and q = “is principal elected in parliament”. The norm R = Perm(A)=¬Forb(A) can be modeled in terms of: S, representing the class of subjects which the norm applies to; • p (= ¬q ) representing the properties of S; 1 3 Patterns for legal compliance checking in a decidable framework… conjuction/disjunction of the properties restrictions p (= ¬q ) expressing the i i conditions which the norm is subject to. Such restrictions create a subclass [S]RCompliant of all the individuals of the class S which are compliant with R, for which: p = true or ¬ q = true where: p =¬q i i i i (12) i i Similarly, the detection of the violation of norm R, whose deontic qualification is complete, results in the identification of the individuals which do not respect the combination of property restrictions of R. Such individuals belongs to the class [S] RViolating of the individuals for which the combination of properties p of compli- ant individuals are negated. ¬ p = true or q = true where p =¬q i i i i (13) i i Note that the approach aims to test compliance of state of affairs (namely individu- als of the real world scenario and facts) with respect to the norms, not to provide a framework for fully fledged reasoning about norms (namely deriving automatic conclusions giving premises). 8 Conclusions and future developments In this paper we have presented an approach for legal compliance checking within the Semantic Web, to be effectively applied in a Linked Open Data framework. It is based on the representation of deontic norms, as distinct from the related provisions, in terms of domain ontology and ontology properties restrictions. The approach is implemented by decidable fragments of OWL 2, able to guarantee computational tractability and the possibility of using available reasoners. We have also shown how this approach can handle norm defeasibility. Future developments of this work can use more complex modalities to express constraints for specific properties, as using SHACL. Moreover, this approach can be used as a reference model for automatic procedures aimed to extract norms from legal texts and represent them “as code” with the aim of automatic compliance checking of specific state of affairs. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Com- mons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the https:// www. w3. org/ TR/ shacl/. 1 3 E. Francesconi, G. Governatori material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/. References Agnoloni T, Bacci L, Francesconi E, Spinosa P, Tiscornia D, Montemagni S, Venturi G (2007) Build- ing an ontological support for multilingual legislative drafting. In: Proceedings of the Jurix con- ference, pp 9–18 Athan T, Governatori G, Palmirani M, Paschke A, Wyner A (2015) LegalRuleML: Design princi- ples and foundations. In: The 11th reasoning web summer school. https:// doi. org/ 10. 1007/ 978-3- 319- 21768-0_6 Batsakis S, Baryannis G, Governatori G, Ilias T, Antoniou G (2018) Legal representation and reason- ing in practice: A critical comparison. In: Palmirani M (ed) Legal knowledge and information systems, vol 313. Frontiers in artificial intelligence and applications. IOS Press, Amsterdam, pp 31–40. https:// doi. org/ 10. 3233/ 978-1- 61499- 935-5- 31 Bhuiyan H, Governatori G, Bond A, Demmel S, Islam MB, Rakotonirainy A (2020) Traffic rules encoding using defeasible deontic logic. In: Villata S (ed) JURIX 2020: the 33rd international conference on legal knowledge and information systems. Frontiers in artificial intelligence and applications, vol. 334, pp 3–12. IOS Press, Amsterdam. https:// doi. org/ 10. 3233/ FAIA2 00844 Biagioli C (2009) Modelli Funzionali delle Leggi. Verso testi legislativi autoesplicativi. Legal infor- mation and communications technologies series, vol  6. European Press Academic Publishing, Florence Breuker J (2004) Constructing a legal core ontology: Lri-core. In: Proceedings of the workshop on ontol- ogies and their applications. Porto Alegre, Brazil Casellas N (2008) Modelling legal knowledge through ontologies. OPJK: the ontology of professional judicial knowledge. PhD thesis, Institute of Law and Technology, Autonomous University of Bar- celona, Barcelona Ceci M, Gangemi A (2016) An owl ontology library representing judicial interpretations. Semant Web J 7(3):229–253 Ceci M (2013) Representing judicial argumentation in the semantic web. In: Casanovas P, Pagallo U, Palmirani M, Sartor G (eds) Proceedings of the Vth workshop on artificial intelligence and the com- plexity of legal systems (AICOL). Springer, Berlin, pp 172–187 de Ven SV, Breuker J, Hoekstra R, Wortel L (2008) Automated legal assessment in OWL 2. In: Franc- esconi E, Sartor G, Tiscornia D (eds) Legal knowledge and information systems—proceeding of the JURIX conference. Frontiers in artificial intelligence and applications, vol 189. IOS Press, Amster - dam, pp 170–175 Francesconi E (2014) A description logic framework for advanced accessing and reasoning over norma- tive provisions. Int J Artif Intell Law 22(3):291–311 Francesconi E (2016) Semantic model for legal resources: Annotation and reasoning over normative pro- visions. Semant Web J 7(3):255–265 Francesconi E (2019) Reasoning with deontic notions in a decidable framework. In: Peruginelli G, Faro S (eds) Knowledge of the law in the Big Data age. Frontiers in artificial intelligence and applications, vol 317. IOS Press, Amsterdam, pp 63–77 Francesconi E, Governatori G (2019) Legal compliance in a linked open data framework. In: Legal knowledge and information systems. IOS Press, Amsterdam, pp 175–180 Fungwacharakorn W, Tsushima K, Satoh K (2021) Resolving counterintuitive consequences in law using legal debugging. Artif Intell Law 29(4):541–557. https:// doi. org/ 10. 1007/ s10506- 021- 09283-7 Gabbay D, Horty J, Parent X, van der Mayden R, van der Torre L (eds) (2013) Handbook of deontic logic and normative systems. College Publications, London Gandon F, Governatori G, Villata S (2017) Normative requirements as linked data. In: Wyner A, Casini G (eds) Legal knowledge and information systems—proceeding of the JURIX conference, vol 302. IOS Press, Amsterdam, pp 1–10 1 3 Patterns for legal compliance checking in a decidable framework… Gangemi A, Sagri M, Tiscornia D (2005) A constructive framework for legal ontologies. In: Benjamins C, Breuker G (eds) Law and the semantic web. Springer, Berlin Gordon T (2011) Combining rules and ontologies with carneades. In: Proceedings of the 5th international RuleML2011@BRF challenge, vol 799. CEUR-WS.org Governatori G, Olivieri F, Rotolo A, Scannapieco S (2013) Computing strong and weak permissions in defeasible logic. J Philos Logic 42(6):799–829. https:// doi. org/ 10. 1007/ s10992- 013- 9295-1 Governatori G, Casanovas P, de  Koker L (2020) On the formal representation of the australian spent conviction scheme. In: Gutiérrez  Basulto V, Kliegr T, Soylu A, Giese M, Roman D (eds) Rules and reasoning. LNCS, vol 12173. Springer, Cham, pp 177–185. https:// doi. org/ 10. 1007/ 978-3- 030- 57977-7_ 14 Governatori G, Hashmi M, Lam H, Villata S, Palmirani M (2016) Semantic business process regula- tory compliance checking using legalruleml. In: Blomqvist E, Ciancarini P, Poggi F, Vitali F (eds) Knowledge engineering and knowledge management. LNAI, vol 10024. Springer, Cham, pp 746–761 Guastini R (2010) Le Fonti del Diritto. Fondamenti teorici. Giuffrè, Milano Hashmi M, Governatori G (2018) Norms modeling constructs of business process compliance manage- ment frameworks: a conceptual evaluation. Artif Intell Law 26(3):251–305. https:// doi. org/ 10. 1007/ s10506- 017- 9215-8 Hashmi M, Governatori G, Wynn MT (2016) Normative requirements for regulatory compliance: an abstract formal framework. Inf Syst Front 18:429–455 Hoekstra R, Breuker J, di Bello M, Boer A (2009) Lkif core: Principled ontology development for the legal domain. In: Breuker J, Casanovas P, Klein M, Francesconi E (eds) Law, ontologies and the semantic web. Frontiers in artificial intelligence and applications, vol 188. IOS Press, Amsterdam, pp 21–52 Hoekstra R, Breuker J, Bello MD, Boer A (2007) The lkif core ontology of basic legal concepts. In: Casa- novas P, Biasiotti M, Francesconi E, Sagri M (eds) Proceedings of the workshop on legal ontologies and artificial intelligence techniques. CEUR workshop proceedings, pp 43–63. http:// CEUR- WS. org/ Vol- 321 Islam MB, Governatori G (2018) RuleRS: A rule-based architecture for decision support systems. Artif Intell Law 26(4):315–344. https:// doi. org/ 10. 1007/ s10506- 018- 9218-0 Kelsen H (1991) General theory of norms. Clarendon Press, Oxford Lam HP, Hashmi M (2019) Enabling reasoning with legalruleml. Theory Pract Log Program 19(1):1–26. https:// doi. org/ 10. 1017/ S1471 06841 80003 39 Lam HP, Governatori G (2009) The making of SPINdle. In: Governatori G, Hall J, Paschke A (eds) Inter- national symposium on rule interchange and applications. LNCS, vol 5858. Springer, Heidelberg, pp 315–322. https:// doi. org/ 10. 1007/ 978-3- 642- 04985-9_ 29 Marmor A (2014) The language of law. Oxford University Press, Oxford OASIS (2017) LegalRuleML core specification version 1.0. http:// docs. oasis- open. org/ legal ruleml/ legal ruleml- core- spec/ v1.0/ csprd 02/ legal ruleml- core- spec- v1.0- csprd 02. html Palmirani M, Governatori G (2018) Legal knowledge modelling for gdpr compliance checking. In: Palmirani M (ed) Legal knowledge and information systems. Frontiers in artificial intelli- gence and applications, vol 313. IOS Press, Amsterdam, pp 101–110. https:// doi. org/ 10. 3233/ 978-1- 61499- 935-5- 101 Palmirani M, Martoni M, Rossi A, Bartolini C, Robaldo L (2018) Pronto: privacy ontology for legal rea- soning. In: Kő A, Francesconi E (eds) Electronic government and the information systems perspec- tive (EGOVIS 2018). Lecture notes in computer science, vol 11032. Springer, Cham, pp 139–152 Pino G (2016) Teoria analitica del diritto. Norma giuridica. ETS. Giappichelli, Turin, pp 144–183 Prakken H, Sartor G (2015) Law and logic: a review from an argumentation perspective. Artif Intell 227:214–245 Ramezani E, Fahland D, van Dongen B, van der Aalst W (2013) Diagnostic information for compli- ance checking of temporal compliance requirements. In: Salinesi C, Norrie M, Pastor O (eds) Pro- ceedings of the 25th international conference (CAiSE 2013). Lecture notes in computer science, vol 7908. Information Systems WSK & Process Science, pp 304–320 Raz J (1980) The concept of a legal system. Oxford University Press, Oxford Robaldo L (2021) Towards compliance checking in reified I/O logic via SHACL. In: Maranhão J, Wyner AZ (eds) ICAIL ’21: 18th international conference for artificial intelligence and law, São Paulo Bra- zil, 21–25 June 2021. ACM, New York, pp 215–219. https:// doi. org/ 10. 1145/ 34627 57. 34660 65 1 3 E. Francesconi, G. Governatori Sartor G (2006) Fundamental legal concepts: a formal and teleological characterisation. Artif Intell Law 14(1–2):101–142 Satoh K, Kubota M, Nishigai Y, Takano C (2009) Translating the japanese presupposed ultimate fact theory into logic programming. In: Governatori G (ed) Legal knowledge and information systems— JURIX 2009: The 22nd annual conference on Legal knowledge and information systems, Rotter- dam, The Netherlands, 16–18 December 2009. Frontiers in artificial intelligence and applications, vol 205. IOS Press, Amsterdam, pp 162–171. https:// doi. org/ 10. 3233/ 978-1- 60750- 082-7- 162 Searle J (1969) Speech acts: an essay in the philosophy of language. Cambridge University Press, Cambridge van Hee K, Hidders J, Houben GJ, Paredaens J, Thiran P (2010) On-the-fly auditing of business pro- cesses. Springer, Berlin, pp 144–173. https:// doi. org/ 10. 1007/ 978-3- 642- 18222-8_7 Witt A, Huggings A, Governatori G, Buckley J (2021) Converting copyright legislation into machine- executablecode: interpretation, coding validation and legal alignment. In: Wyner A (ed) Proceedings of ICAIL 2021. ACM, New York, pp 139–148. https:// doi. org/ 10. 1145/ 34627 57. 34660 83 Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. 1 3

Journal

Artificial Intelligence and LawSpringer Journals

Published: Jul 4, 2022

Keywords: Legal reasoning; Norm compliance; Semantic Web; OWL 2

References