a knowledge representation and inference system for procedural law

41
New Generation Computing, 5 (1988) 319-359 OHMSHA, LTD. and Springer-Verlag OHMSHA, LTD. 1988 A Knowledge Representation and Inference System for Procedural Law Katsumi NITTA Electrotechnical Laboratory, Tsukuba City, Ibaraki 305, Japan. Juntaro NAGAO Nihon Business Consultant Co., Dogenzaka, Shibuya-ku, Tokyo 150, Japan. Tetsuya MIZUTORI Meidensha Co., Ohternachi, Chiyoda-ku, Tokyo 100, Japan. Received 29 May 1986 Revised manuscript received 8 December 1986 Abstract KRIP-2 is a name of a software tool for building expert systems of a legal problem. It was developed to build an expert system for the Patent Law. Laws can be classified into the substantive laws and the procedural laws, and the Patent Law contains both of them. As these laws have different features, it is inconvenient to develop the knowledge base of these in the same knowledge representation. To develop a knowledge base of laws, a knowledge representation language KRIP/L was introduced. KRIP/L was an integration of the object oriented concept and extended Prolog, and has useful mechanisms to describe the phenomena occured in the legal problem. KRIP/L-2 is the second version of KRIP/L. KRIP-2 is an implementation of KRIP/L-2, and composed of some utility modules. KRIP-2 is implemented in Prolog, and an expert system for the Patent Law is developed in KRIP-2. Keywords: Expert System, Object, Prolog, Knowledge Representation, Law w Introduction An expert system of legal problems seems easy to develop because the knowledge is explicitly given as the law. However, to develop a knowledge base of the law contains two difficulties--the existence of meta-knowledge and the lack of ability of knowledge representation language. The first problem is that the knowledge contained in the law is not sufficient to apply it to an actual problem. For example, the terms used in the law sometimes contain complex meanings, and an expert (lawyer) interprets the

Upload: katsumi-nitta

Post on 22-Aug-2016

225 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: A knowledge representation and inference system for procedural law

New Generation Computing, 5 (1988) 319-359 OHMSHA, LTD. and Springer-Verlag

�9 OHMSHA, LTD. 1988

A Knowledge Representation and Inference System for Procedural Law

Katsumi NITTA Electrotechnical Laboratory, Tsukuba City, Ibaraki 305, Japan. Juntaro N A G A O Nihon Business Consultant Co., Dogenzaka, Shibuya-ku, Tokyo 150, Japan. Tetsuya MIZUTORI Meidensha Co., Ohternachi, Chiyoda-ku, Tokyo 100, Japan.

Received 29 May 1986 Revised manuscript received 8 December 1986

Abstract KRIP-2 is a name of a software tool for building expert systems of a legal problem. It was developed to build an expert system for the Patent Law. Laws can be classified into the substantive laws and the procedural laws, and the Patent Law contains both of them. As these laws have different features, it is inconvenient to develop the knowledge base of these in the same knowledge representation. To develop a knowledge base of laws, a knowledge representation language KRIP/L was introduced. KRIP/L was an integration of the object oriented concept and extended Prolog, and has useful mechanisms to describe the phenomena occured in the legal problem. KRIP/L-2 is the second version of KRIP/L. KRIP-2 is an implementation of KRIP/L-2, and composed of some utility modules. KRIP-2 is implemented in Prolog, and an expert system for the Patent Law is developed in KRIP-2.

Keywords: Expert System, Object, Prolog, Knowledge Representation, Law

w Introduction An expert system of legal problems seems easy to develop because the

knowledge is explicitly given as the law. However, to develop a knowledge base of the law contains two difficulties--the existence of meta-knowledge and the

lack of ability of knowledge representation language. The first problem is that the knowledge contained in the law is not

sufficient to apply it to an actual problem. For example, the terms used in the law sometimes contain complex meanings, and an expert (lawyer) interprets the

Page 2: A knowledge representation and inference system for procedural law

320 K. Nitta J. Nagao T. Mizutori

provisions containing the terms by making up for meta-knowledge, and applies them to the actual problem. Therefore, to build a knowledge base of laws, the provisions should be interpreted legally with meta-knowledge, and the interpre- tation should be contained in it.

The second problem is that the ability of knowledge representation language is not sufficient. To represent the knowledge of laws, a logic or a frame structure or a network structure has been employed by some research groups. However, to describe the interpretation of provisions in detail, the ability of the above structures is not sufficient, because the legal effect is sometimes different from the facts of the real world.

In this paper, we will introduce a language to describe the knowledge of laws, a software tool for building an expert system, and an expert system for Patent Law. The tool is called KRIP (a Knowledge Representaion and Inference system for Procedural laws), and has convenient software modules to develop expert systems for legal problems. The purpose of the expert system of the Patent Law is to help a user to study a whole structure of the law by simulating the actual problem.

In Section 2, we explain the patent system in Japan and point out some features of the Patent Law. In Section 3, a knowledge representation language KRIP/L-2 is introduced. KRIP/L-2 employs the integration of the object oriented concept and extended Prolog, and has convenient functions to describe the relation between provisions. In Section 4, KRIP-2 system is introduced. KRIP-2 supports an expert (lawyer) to construct the knowledge base of the laws, and supports the user utilizing it. In Section 5, functions of the expert system of the Patent Law are shown. These systems have been developed in Prolog.

w Patent System and Features of the Patent Law In this section, the patent system and the features of the Patent Law are

pointed out. The patent right is an exclusive right to commercially work the invention.

The effect of the patent right is so powerful that most manufacturing industries have the patent division to manage their patents. However, the staff of the division is not always familiar with the Patent Law. If they understand the patent system in detail, they will cope with patent applications more adequately.

The Patent Law provides proceedings before the Patent Office and protections of the patent rights. There are more than 200 sections, and more than 50 procedures are prescribed in the Patent Law. They are classified into four phases--an examination, a trial, a retrial, and a l i t igat ion--and they are related closely. Therefore, it takes much time for a person to understand the whole structure of the Patent Law.

2 . 1 The Patent System in Japan When a person invented something and wants to get a patent right for it,

Page 3: A knowledge representation and inference system for procedural law

A Knowledge Representation and Inference System for Procedural Law 321

he has to take proceedings before the Patent Office. The fundamental proceed- ings are as fol lows (Fig. 1).

publication of application

I filing an application

1 request for I examination

start of [ examination

laying open of application

I

notification of ] reasons for refusal

decision of refusal I

1 1 oppositions to [ ] amendment grant of patent |

l decision of grant

Fig. 1 Flow of procedures of patent application.

(1) He files an application before the Patent Office. The application consists of a 'request', a 'specification' and 'drawings.' The specification states a 'detailed explanation of the invention,' a 'claim,' a 'name of the inven- tion' and 'a brief explanation of the drawings.' He can get the patent right for only the invention described in both a 'claim' and a 'detailed explana- tion of the invention.'

(2) He can request for the examination within 7 years from the date of the application. Only the requested application is examined by the examiner in the order of the request.

(3) In the examination, patentability of the invention such as the novelty, the inventive advance, the capability of industrial application and so on, are examined. If the examiner finds that the application does not satisfy the patentability, he notifies the applicant of the reasons of refusal. If the

Page 4: A knowledge representation and inference system for procedural law

322 K. Nitta J. Nagao T. Mizutori

applicant makes the amendment or submits a statement of his arguments within the time limit, the application may come to satisfy the patentability. However, if the amendment or the statement is not inade- quate, the application is refused.

(4) If the examiner finds the application satisfies the patentability, the application is published. Any person may file the opposition to the grant of a patent within 2 months from the date of the publication. If the examiner finds the defaults of the application by the opposition, he notifies the applicant the reasons of refusal. If no opposition is filed by the time limit, he decides that a patent is to be granted on the application.

(5) Where an amendment to the specication attached to the request would change the gist thereof, the examiner shall decline the amendment by a ruling.

(6) After 1 year and 6 months from the date of the application, every application is laid open for public inspection even if it is not requested for examination.

(7) Where two patent applications relating to the same invention are filed on the different dates, only the first applicant may obtain a patent for the invention.

(8) A person who has received the refusal decision, who has received a ruling to decline an amendment, or who has found that a patent does not satisfy the patentability, may demand a trial before the Patent Office. If a trial is demanded during the examination procedure, it is suspended until the trial decision has become final (Fig. 2).

(9) A person who is against the trial decision can institute an action to the Tokyo High Court.

Besides the above proceedings, the follwing points are important in order to understand the Patent Law.

(10) When a person invented something, the right to obtain a patent arises. The right grows up as the examination advances, and finally it disappears when the patent right arises. For example, when the application is laid open, the right to require compensation arises and it is added to the right to obtain a patent. And when the application is published, the exclusive right to commercially work the invention arises and it is added to the right to obtain a patent. These two rights are tentative, and if the application is refused, these rights shall be deemed never to have arisen.

(11) When a person makes a procedure explained from (1) to (8), it is pre-examined by the Director General of the Patent Office whether it satisfies prerequisites of the procedure or not. If the procedure does not satisfy them, the Director General will invite amendments. If the person leaves it without amendment by the time limit, the procedure is invalidat- ed (Fig. 3). If a procedure is invalidated, such a procedure is deemed

Page 5: A knowledge representation and inference system for procedural law

A Knowledge Representation and Inference System for Procedural Law

< EXAMINATION >

323

start demand trial

"<-- . . . . . . . < suspended > . . . . . . . . decision

< TRIAL >

start I

action to ~---< suspended >---~ -*,-- decision High Court

< LITIGATION >

start ~ decision

(12)

Fig. 2 An examinat ion, a trial and a litigation.

I taking a procedure

I before the Patent Office

J I

pre- examination [ ~*

I by Director General

invitation of [ amendment

invalidation

_ I making amendment I -I I

Fig. 3 Pre-examination by the Director General.

never to have been made. However, if the fact that the prerequisites are not satisfied is not caught, and the problems are found after the procedures come into effect, their effeect is not always invalid. To invalidate the effect of such procedures, another procedure should be taken. For example, if an invention which does not satisfy the patentability is granted for a patent, the patent right is effective until it is invalidated by a trial. Where a trial decision has become final, the patent right is deemed never to have existed.

Page 6: A knowledge representation and inference system for procedural law

32,t K. Nitta J. Nagao T. Mizutori

2 . 2 S u b s t a n t i v e L a w and a Procedura l L a w

Laws can be classified into substantive laws and procedural laws. A 'substantive' law is the norm of people, and a 'procedural' law prescribes procedures to realize the norm. For example, the relation between a crime and punishment is provided in the Criminal Law, and the procedures of a trial is provided in the Code of Criminal Law. The former is an example of a substan- tive law and the latter is an example of a procedural law. A substantive law is useless without a procedural law.

The Patent Law is composed of general provisions, the substantive laws, and the procedural laws though the explicit distinction between them is not made.

(1) General Provisions: General provisions prescribe the definitions of impor- tant concepts, the way to compute terms, conditions to make an amend- ment of procedures, and prerequisites common with proceedings such as the capacity of taking procedures, the capacity of enjoying rights and the power of representatives. These provisions provide knowledge to inter- pret procedural provisions and substative provisions.

(2) Substantive Law: In the Patent Law, the substantive law prescribes the patentability of an applied invention, and provides the effect of the rights such as the patent right and the right to obtain the patent. The provisions of the patentability are referred to during the examination (Fig. 4).

PROCEDURAL LAW

(3)

84/5/6 85/4/7

I I [ request for applieation I examination

86/5/20 86/9/5

I I examination I decision

i i I refer I

SUBSTANTIVE LAW ', patentability !

Fig. 4 Relation between procedural law and substantive law.

Procedural Law: Proceedings before the Patent Office are prescribed in the procedural law. In addition to principle procedures explained in Section 2.1, there are some exceptional procedures which suspend other procedures. These exceptional procedures such as making amendment, withdrawing of an application and invalidation of a procedure, cannot be described in the flowchart like in Fig. 1, because they may occur various parts in the chart.

The prerequisite and the effect of each procedure are prescribed in the

Page 7: A knowledge representation and inference system for procedural law

A Knowledge Representation and Inference System for Procedural Law 325

1984 1985 1986

T o m ~ J o h n ~ T o m ~

(a) facts

1984 1985

(b) legal effect Fig. 5 Retroactive effect.

procedural law. The 'prerequisite' contains the temporal limitation, the situation of the examination, the form of the procedure, and so on. The followings are examples of a temporal information and the power of a person.

"The examination of patent application shall be carried out upon a request for examination. The request should be made within seven years from the date of patent application."

"Minors and persons declared to be under disability may proceed before the Office only through their legal representatives."

The 'effect' contains the birth and the death of a right, the modification of the state of the examination, and so on. Usually, the proceeding comes into effect at the time of making the proceeding. However, certain proceedings such as an amendment, a divisional application, an application declared of a priority under the Paris Convention, comes into effect retroactively. For example, let consider the following case (Fig. 5(a)).

"Tom filed an application in 1984. John filed an application in 1985. In Tom's specification, two inventions, say A and B, were contained and he claimed only B. In John's specification, two inventions, say A and C, were contained and he claimed only A.

In this case, if there is not another reason for refusal, Tom and John can be granted for patents because the inventions claimed by Tom and John are different. However, consider the case.

"Tom made an amendment changing a claim from B to A in 1986."

Page 8: A knowledge representation and inference system for procedural law

326 K. Nitta J. Nagao T. Mizutori

Because of the retroactive effect, it is deemed that Tom claimed A from the beginning (Fig. 5(b)). Therefore, claims of Tom and John are the same, and John's application is refused because Tom has the priority.

2 . 3 Features of Provisions Provisions are written in natural language. Generally speaking, these

provisions are written more logically than ordinary sentences. However, to interpret the provisions correctly, not only the analysis of each provision but the relations between provisions must be considered. In the case of the Patent Law, following points must be taken into account to interpret it.

(1) A procedure is sometimes provided in more than one section. For example, consider the following case.

"section a. If A holds, a person may carry out procedure P."

"section b. If B holds, a person may not carry out P, notwithstanding section a."

In this case, section b provides an exceptional provision, and if A does not hold or if B holds, a person cannot take P.

(2) Some sections play roles as default provisions. For example, consider the following provision.

"If A holds, a person may carry out P unless there is another provision about P."

This provision is referred to after all provisions relating to P are referred t o .

(3) Some provisions refer to other provisions explicitly. For example,

"The invention claimed in the patent application is not patentable in accordance with section 25, 29, 29 (bis), 31, 32, 37, or 39 (1) to (4)."

(4) Some provisions provide only the definition or procedure. For example,

"Time limits fixed in this Law or an order or ordinance under this Law shall be computed according to the following provisions ...... "

(5) Some provisions prescribe obligation, permission or prohibit ion as fol- lows.

"When a patent application has been filed any person may, within 7 years from the date thereof, make a request for examination to the Director General of the Patent Office".

Page 9: A knowledge representation and inference system for procedural law

A Knowledge Representation and Inference System for Procedural Law 327

"The Director General of the Patent Office shall have applications for patent and oppositions to the grant of a patent examined by an examiner."

The expressions 'shall,' 'may,' 'shall no t /may not' mean obligation, permission and prohibit ion, respectively. In the case of obligation, if a person fails to take the proceeding, it is illegal. In the case of permission, even if a person fails to take the proceeding, it is not illegal.

2 .4 Knowledge for Interpretation of Law (Meta-Knowledge) When a lawyer analyzes the law, he makes up for the knowledge of legal

domain. Such meta-knowledge is not provided in the law explicitly. However, without it, the strict analysis is impossible. The followings are examples.

(1) There exist some provisions which conflict with other provisions. In many cases, the priority between them can be settled beforehand. Follow- ing are examples of the Patent Law.

( i ) The Patent Law is a particular law of the Civil Law, and provi- sions of the Civil Law are regarded as default knowledge of the Patent Law. Therefore, if provisions of the Patent Law conflict with provisions of Civil Law, those of the Patent Law have priority.

(ii) Certain provisions concerning an examination are inconsistent with those concerning a trial.

(2) A provision is not always complete because the situation in which the provision is used is abbreviated. For example, in the case of the following provision,

"If A holds, a person may carry out P."

'during the pendency of the case' is abbreviated implicitly. (3) Sometimes a word has different meanings in different sections. Its

meaning is decided by the role of the provision or by how it is used. (4) The strict analysis of certain provisions are difficult. Because provisions

are provided as sentences of natural language and certain provisions contain ambiguous expression, more than one analyzes exist in them.

If the provision is analized with these types of mata-knowledge, the strict meanings of provisions become sometimes more complex than a non expert's analyses.

(1) and (2) are argued in Section 2.5 as the problem of the control.

2 .5 Knowledge for Control of Applying Provisions (Meta-Knowledge) When a lawyer solves an actual problem, he doesn't consult laws exaus-

Page 10: A knowledge representation and inference system for procedural law

328 K. Nitta J. Nagao T. Mizutori

tively. He must have already understood the role of each provision and orga- nized the structure of provisions in his mind. When he solves an actual legal problem, he recognizes the situation of the problem and selects only a proper provision using this structure. The followings are examples of selection of laws.

(1) As stated in Section 2.4, the Patent Law is a special law of a Civil Law. When the provisions of th Patent Law conflict with those of the Civil Law, the attorney selects the provision of the Patent Law, if the situation of the problem is concerning a patent. However, if the situation is concerning another problem such as a tax or a traffic accident, he selects the provisions of the Civil Law. The Patent Law contains provisions concerning an examination and those of a trial, and they are often inconsistent. However, the patent attorney doesn't confuse them because he recognizes whether the actual problem is in the examintion phase or in the trial phase, and selects only the proper provisions.

(2) Some provisions are related to each other. For example, a certain provi- sion prescribes the exception of other provision, and a certain provision prescribes the default rule for another provision. The patent attorney knows such relation between provisions beforehand, and takes the proceedings without mistakes.

(3) If the patent attorney is given a key word, he can enumerate provisions related to the word without consulting provisions.

They are possible because the expert has knowledge about the relations between provisions and searches the proper provisions using the knowledge. The knowl- edge is used not only to search provisions but to control the application of provisions. This meta-knowledge is not contained in provisions explicitly, and is obtained by a long time experience of the expert.

w KRIP/L-2 As stated in the previous section, to build a knowledge base of a law, the

knowledge of interpretation and control are needed. Though the previous explanation has made for the Patent Law, the following problems are in common with many other laws.

(1) Not only the provisions themselves but meta-knowledge for interpreta- tion and control are needed.

Knowledge of Law = Provision + Interpretation + Control Interpretation=Strict analysis of each provision Control= Relation between provisions (structure of the Law)

+

Selection of proper provisions at a given situation

Page 11: A knowledge representation and inference system for procedural law

A Knowledge Representation and Inference System for Procedural Law

(2)

(3)

329

Changes of situation such as the birth and the death of a right must be expressed. Obligation, permission and prohibition must be expressed.

Usually, provisions are provided logical natural sentences. Therefore, the logic seems appropriate language to describe the law. However, as stated in Section 2.5, the knowledge of the law contains control information, and if both control information and logical information are expressed in a logic program- ming language without any distinction, the expression will be complex and difficult to understand.

KRIP/L-2 (KRIP/L-2 is the second version of KRIP/L) is developed to build the knowledge base of laws--especially that of procedural laws. It em- ployed integration of extended Prolog and the object oriented concept. Descrip- tion of features of a group of objects is called a 'class.' The object which stands for an action occuring in a certain time is called an 'event.' The concepts such as proceedings, inventions, rights are expressed as classes, and provisions are expressed as clauses of extended Prolog. To each clause, the identification mark

C L A S S LOGIC

'refer

FACT DATA B A S E

D

instance / / /

"~ section ( . . )

[A'B] . . . .

�9 ~ s e c ~ [ C " D]---~ may P

: -objec t ( . . ) . . .

U earch

Fig. 6 KRIP/L-2.

Page 12: A knowledge representation and inference system for procedural law

330 K. Nitta J. Nagao T. Mizutori

is attached in order to control the inference. The meta-knowledge about the interpretation is contained in clauses

because the provisions are analyzed with the help of the expert and then the analysis is described in clauses. The mata-knowledge about the control is contained in classes (Fig. 6).

Actual problem is expressed as a set of objects/events and stored in the fact data base (FDB). The current situation is expressed as a set of internal state of all objects in FDB. When a person wants to know the effect of an event, searching the related provision is easy, because concerning provisions and the information for control are provided in its class description.

3 . 1 Class Each concept which occurs in the laws is described using a frame struc-

ture called 'class.' A class is a description of the features of a group of objects. The 'is_a' relation between classes composes a tree-like taxonomy, and the lower class inherits the information from the upper class (Fig. 7). The class description is composed of internal variables (called slots) and procedures (called methods). The syntax of a class is as follows.

class <class name>. super: <upper class>. <slot name>: <value> OR{ <class name>~.

<message) - - ) <Goal Sequence of Prolog>.

event

< date >

I procedure before

the Director General

of the Patent Office

I I I

I procedure

< subject >

1 [ procedure before

the exam iner

[ procedure before the trial examiner

in chief

Fig. 7 Hierarchy of proced

Page 13: A knowledge representation and inference system for procedural law

A Knowledge Representation and Inference System for Procedural Law 331

end_class.

If the value of each slot is undefined, the class name is described in the value part. This information works as constraint of the types of the value. The following is an example for description.

class proceedings. super: event. subject: {a_person_who_has capacity for proceeding_before_

the_Office}. end_class. class proceedings_to_Director General.

super: proceedings. receiver: 'Director_General of_the~Patent_Office.'

end_class. class filing_an_application.

super: proceedings_to_Director General. claim: {technical_idea}.

legal_check(X) - -) legal(self, section(patent_36)), legal(self, section(patent_37)) . . . .

effect(X) - -) exec(self, section(cabinet_order)). end_class.

In this example, the following information is asserted.

(1) an 'filing_an_application' is a lower concept of the 'proceeding_to_ Director General.'

(2) the subject of 'filing_an_application' must satisfy the conditions of a personwho_has capacity for_proceeding_before the Office,

(3) the 'claim' of an application must be an instance of technical_idea, (4) the prerequisites of 'applicat ion' are provided in sections 36 and 37 of the

Patent Law, (5) the effect of the 'application' is provided in the cabinet order.

To check if a person is a_personwhohas_capac i ty for_proceeding_before_the _Office or not, the system has to refer to another provision in which the definition of a_person_who_has_capacity for_proceeding_before_the_Office is provided. This function is explained as the pseudo object in Section 3.3. 'Self' is bound to the object whose method is being executed.

Each slot may have different values at different times. Therefore, in this case, the value of each slot is composed of a list whose component is a pair of a date and value as follows.

% the value of a slot 'address' of 'Tom' % [ 1987/3/4: 'Tokyo,' 1985/7/10: 'Osaka,' 1980/4/1: 'Tsukuba']

Page 14: A knowledge representation and inference system for procedural law

332 K. Nitta J. Nagao T. Mizutori

The example shows that the address changed from Tsukuba to Osaka in 1985/ 7/10, and from Osaka to Tokyo in 1987/3/4. To access the value of the slot, not only the slot name but the date of basis must be given as follows.

?-slot_val('Tom,' address, X, 1986/4/7). X = 'Osaka' yes

The method which is a goal sequence of Prolog is activated when a message (selector+arguments) comes to the object.

As stated in (4), for each procedure, the provisions which provides the prerequisite are given in the methods explicitly. This treatment is reasonable because the relating provisions are known beforehand. In the description of a method, more than one sections can be described as follows.

legal_check(X)--> legal(ID, section(A)), legal(ID, section(B)). legal_chedk(X)--7 legal(ID, section(A)), legal(ID, section(B)). legal_cbedk(X) - - ) not(legal(ID, section(A))), legal(ID, section(B)).

Their meanings are that procedure ID is legal if ID satisfies both sections A and B, that procedure ID is legal if ID satisfies either sections A or B, and that ID is legal if ID does not satisfy A and satisfies B, respectively. The sections are referred to from left to the right, and backtracking may occur. By using the cut operator of Prolog, the priority between provisions can be represented in detail.

3 . 2 Extended Prolog

[1) Provisions Provisions are described in the following syntax.

provisionID. provision clause.

ProvisionlD is the identification of the provision clause. It is usually the section number of the provision or the combination of the section number and sub section number. The form of provision clauses is introduced from Templog, 4~ and it is defined as follows.

provision clause ::= P : -(body). % a clause of Prolog[ [A: B[ => P :-(body).[ [A: B[ => -P :-(body).[ T @ P :-(body).[ T @ -P :-(body).[ [A: B[ --> may Q :-(body).[ [A: B[ --> must Q :-<body>.l

Page 15: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 333

[A: B] - - ) mustnot Q :-(body). (body)::--a goal sequence of Prolog

'EA: B] --)P:-(body) ' means that if the (body) is true, predicate P holds during the interval defined by EA:B~. 'IA: B] =)-P:-(body>' means that if the (body) is true, predicate P does not hold during the interval defined by [A: B~. 'T @ P:-(body)' means that during the time the (body> is true, predicate P holds. In (body), a variable T which corresponds to time is contained. 'T @ -P:-(body) ' means that during the time the (body> is true, predicate P does not hold. '~A: B] --> may Q :-(body)' means that if the (body) is true, procedure Q may be taken during the interval defined by ~A: B~. 'IA: B] - - ) m u s t Q :-(body)' means that if the (body) is true, procedure Q must be taken during the interval defined by [A: B]. 'EA: B] - - ) mustnot Q :-(body>' means that if the (body> is true, procedure Q must not be taken during the interval defined by ~A: BJ.

Clauses containing ' = ) ' are used mainly to describe the substantive law, and clauses containing ' - - ) ' are used mainly to describe the prerequisite of procedural law.

(2) Interval An interval form [A: B] is defined as a pair of point forms. The point_

form defines an event or a combination of events. When a point_form is evaluated, the value is the date when the event occurred.

A date is described as a triple of the integers (year/month/day). Because each point form of interval_form defines the date, if the interval_form is evaluat- ed, the value is a time interval defined by two dates. For example, if John enters into a school on 80/9/1, and graduates on 85/6/30, then

[event(_, entrance, ..): event (_, graduation, ..)]

corresponds to the interval of <80/9/1, 85/6/30) (Fig. 8). The point form is defined as follows.

point form:: = <event_term> ', (limit_term} ', (point_form) & (point form)] (point_form) ; (point form)]

<80/9/1, 85/6/30>

80/9/1 85/6/30 [ 1 TIME

le'an" ! i Fig, 8 Example of interval.

Page 16: A knowledge representation and inference system for procedural law

334 K. Nitta J. Nagao T. Mizutori

(integer) / (integer) / (integer)

'event (ID, CL, CD, T)' means that the occurrence of the event ID whose class name is CL and whose slots satisfies CD at time T is recognized. Here, ID is an identifier that identifies an object, CL is a class name, CD is the condition in which slots of ID should satisfy, and T is the date. For example,

event (ID, person, [nationality: japan, address: -japan, age: X, X)20, hobby: (ID2 # hobby)],

86/4/5)

is used to find a person whose nationality is Japanese, and whose address is not of Japan, and whose age is greater than 20, and the hobby equaling the value of the slot "hobby" of the object ID2 at 86/4/5. If T is undefined, the newest values are used. 'limit (T1, PR, T2)' means that date T2 is the date after the period PR from the date T1. The followings are examples of PR.

5 years, [3 years, 4 months], 40 days

'A & B' means that both A and B hold, and 'A;B' means that either A or B holds. For example, if events ID and ID2 occur on 83/5/6 and 84/3/4, respec- tively, then

[event (ID .. . . ) & event(ID2 .. . . ): limit(ID # time, 2 years,_)3

corresponds to the interval (84/3/4, 85/5/6).

(33 Proof The clauses

[A: B] = ) P :-(body). [A :B3 = ) - P :-(body). T @ P : - (body) . T @ -P :-(body).

can be considerd as an extension of Prolog clause 'P:-(body). ' 'P : - (body) ' is equivalent to '[infinite_past: infinitLfuture] = )P : - (body) ' (it is abbreviated as '~ ] = )P : - (body) ' ) . To validate that predicate P is true at date T, the time must be specified as follows.

?- hold(P, T).

The execution of 'hold' is almost the same as that of 'call' (the evaluable predicate of DEC-10 Prolog). However, if the proof o f - P is successful, the execution of 'hold (P, T)' fails even if the proof of P is successful. For example, let consider the following clauses.

Page 17: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 335

[A: B] ----)P(X) :-q(X). [C: D] =)q(1). % equivalent to '[C: D]----) q(1):-true.' [E : F] ---- > ~P(1). % equivalent to ' [E : F] = > ~P(1):-true.'

If the evaluations of [A: B] and [C: D] and [E: F] correspond to intervals (84/ 2/3, 85/10/21) and (83/11/2, 84/10/87 and (84/10/2, 85/2/26) respectively, then the proof of 'hold (p(X), 84/2/5)' is successful because the first and second clauses are valid in 84/2/5, and because the last clause is invalid in 84/2/5. However, the proof of 'hold (p(X), 84/10/3)' fails because the last clause is valid in 84/10/3.

?- hold(p(X), 84/2/5). X = I yes

9- hold(p(X), 84/10/3). no

To check the legality of the prerequisite of procedure Q, the predicate 'legal' is used as follows.

?- legal(Q, ProvisionID).

The predicate 'legal' refers to the following types of clauses.

FA: B] --> may Q:-(body). FA: B] - - ) must Q:-(body). EA: B] - - ) mustnot Q:-(body).

In the first two cases, if the date of Q is between A and B, and body part is satisfied, then Q is legal. In the case of 'must,' if no proceeding is taken between A and B, that is illegal. In the last case, if Q is taken between A and B, then Q is illegal.

The variable 'ProvisionID' is the identification of a provision clause that is referred to. If ProvisionID is already instantiated when 'legal' is called, the legality of Q is examined ay only the provision identified by ProvisionID. If ProvisionID is undefined, all provisions of the three types are examined. In this case, the proof of legality is successful if one of first two types of clauses succeeds in the proof and all of last type of clauses fail.

The extended Prolog and the objects can refer to each other, For example, the clause is referred in the method of objects by the system predicate "legal (ObjectlD, ProvisionlD)." On the contrary, the value of each slot of the objects is referred to in the clause by the system predicate "slot val (ObjectlD, Slot, Value, Time)."

(4) Compile The clauses of extended Prolog and the classes are compiled into Prolog

Page 18: A knowledge representation and inference system for procedural law

336 K. Nitta J. Nagao T. Mizutori

program. Therefore, KRIP/L-2 program is executed by Prolog interpreter, and backtracking may occur. For example, the clause

ProvisionlD. [event(ID, A, ..): event(ID2, B, ..)] - - ) may Q :- C.

can be compiled into following two Prolog clauses. These are brief versions, and detail parts are abbreviated. Provision ID is embedded in the head of compiled clause.

legal(ID, ProvisionlD):- nonvar(ID), nonvar(ProvisionlD), time(ID, TO), event(ID1, A, [time: T1, ..],_), nonvar(ID1), event(ID2, B, [time: T2, ..],_), (nonvar(ID2) -)between(T0, T I, T2); before(T1, TO)), hold(C, TO), event(ID, Q, ..).

may(T, Q, ProvisionlD):- nonvar(T), nonvar(Q), var(ProvisionlD), event(ID1, A, [time: T1, ..], ..), nonvar(ID1), event(ID2, B, [time: T2, ..1, ..), (nonvar(ID2) -) between(T, T1, T2); before(T1,T)), hold(C, TO).

The former clause is called to check the legality of Q. The latter clause is called to list up all proceedings at given time as follows.

?- may(1987/3/5, Proc, Section). Proc = request_for_examination Section= section(patent 48) yes

For the present, the sematics of the extended Prolog depends on the Prolog program compiled from KRIP/L-2 program. The form of the provision clause can be considerd as a syntax sugar of Prolog. The semantics of clauses of Templog is provided in Ref. 4) and semantics of "obligation/permission/prohi- bition" is discussed in Ref. 11). It is our next work to combine them.

3 . 3 System Predicates About 30 system predicates are prepared for utilization. Some predicates

such as 'event,' 'limit,' 'slot_val,' 'legal' and 'hold' are already explained in Section 3. 2.

(1) 'o_create (ID, Class, Condition, Time)' creates a new object that satisfies the condition at a given time in the fact data base.

(2) 'o_modify (ID, Condition, Time)' modifies of an internal state of an object specified by ID at a given time. For example, consider the follow-

Page 19: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 337

(3) (4)

(5)

ing case.

"Tom gave the book to Bill in 1986/4/5."

The situation is expressed by three objects ( 'Tom,' 'Bill,' b o o k ^F ) and one event (give^l). 'Tom' and 'Bill' are instances of class 'person,' 'book ^ 1' is an instance of class 'book, ' and 'give^ 1 ' is an instance of class 'give.' Let the initial state of the b o o k ^ l be as follows.

book ̂ 1 title: ' Introduction_of Prolog' owner: E1978/5/6: 'Tom'~

By giving the book to Bill, the state of book^ l is changed as follows.

book ̂ 1 title: ' Introduction_of Prolog' owner: ~1986/4/5: 'Bill,' 1978/5/6: 'Tom'~

This modification is executed by using o_modify.

? - o_modify(book ̂ 1, ~owner: 'Bill'], 1986/4/5)

'delete(ID, Time)' deletes an object specified by ID at a given time. 'send_rnsg(ID, Message)' sends a message to an object specified by ID. If an undefined variable is contained in the message, when the execution of 'send_msg' finishes, the caller can receive the result by the value bound to the variable. 'object(ID, Class, Condition, Time)' searches an object that satisfies the condit ion at given time from the fact data base. For example,

? - object(ID, book, [title: ' Introduction_of Prolog,' owner: 'Tom'] , 1982/7/7)

searches the object whose title is ' Introduction_of Prolog' and the owner was Tom in 1982/7/7. If this command is executed for the example given in (2), ID is bound to book^ l . The system predicate 'object' has extended functions as follows.

( i ) The system predicate 'object ' can be used to search objects of the lower class. For example, if a sports car is defined as a lower concept of a car as follows

class car. class sports_car. super: car.

end_class. end_class.

then by using the following term, not only an instance of a car but

Page 20: A knowledge representation and inference system for procedural law

338 K. Nitta J. Nagao T, Mizutori

an instance of a sports_car can be searched.

?- object(ID, car, Condition, Time)

( i i ) The system predicate 'object' can be used to search a pseudo object. A pseudo object is defined as a object which is a such instantiation of a class that satisfies prescribed conditions. For example, according to the section 7 of the Patent Law, a child or a blind person may not take proceedings before the Patent Office by himself. A person who may take proceedings is called as 'party _that_has_litigation_capacity.'

section 7. T @ party_that_has_litigation_capacity(ID) :-

object(ID, person, [nationality: japan, adult: y, blind: n, ..], T).

class person. super: object. nationality: {string}. adult: {bool}. blind: {bool}.

end class.

In this case the 'party that has litigation_capacity' is not defined in the class. It is defined as an instantiation of a 'person' whose value of 'adult' is 'y' and whose value of 'blind' is 'n.' To search the pseudo-object, the system predicate 'object' is used as follows.

?- object(ID, party_that has_litigation_capacity, Condition, Time).

For example, if 'Tom' is an instance of class 'person' and its internal state is as follows,

T o m

nationality: adult: blind:

[1950/3/3:japan] [1970/3/3: y, 1950/3/3: n] [1950/3/3: n]

then Tom is a 'party_that_has_litigation_capacity' in 1987. (6) 'invalidate(ID, Time)' invalidates an event. The invalidated event cannot

be searched by system predicates 'event.' (7) 'freeze(Time)' saves the internal states of all objects at the given time. (8) 'retry(Time)' is a special predicate which makes the inference engine to

execute the simulation again from the given time. An example is given in

Page 21: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 339

(9) Section 4. 2. 'exec(ID, ProvisionlD)' executes the Prolog clause the head of which is exec(ID), and the identification of which is ProvisionlD. ID is the identification of the caller object/event.

3 .4 Examples for Description of Provisions To demonstrate the representation by KRIP/L-2, consider the following

provisions.

section al. Any person may get into debt if he is an adult.

section a2. A person may not get into debt notwithstanding section al if there already exists a credit whose debtor is him.

section a3. If a person gets into debt, a credit arises.

section a4. A person shall pay his debt within one year from the date of debt.

section a5. If a person pays his debt, the credit dissapears.

The description by KRIP/L-2 is as follows.

class event. super: object. time: {date}. valid: {bool}.

end_class.

class commercial_transaction. super: event. legal(_) - - ) legal(...). % Civil Law or Commercial Law

end_class.

class get_into_debt. super: commercial_transaction. debtor: {person}. creditor: {person}. amount: {positive_integer}. legal(_) - - ) legal(self, section(a2)),

legal(self, section(al)). effect(_) --> exec(self, section(a3)).

end class.

class pay debt.

Page 22: A knowledge representation and inference system for procedural law

340 K. Nitta J. Nagao T. Mizutori

super: commercial_transaction. debtor: {person}. creditor: {person}. amount: {positive_integer}. object: {credit}. legal(_)--> legal(self, section(a4)). effect(_) --> exec(self, section(a5)).

end_class.

class credit. super: right. debtor: {person}. creditor: {person}. amount: {positive integer}. reason: {get_into_debt}. end_class.

class right. super: object. birth_date: {date}.

end_class.

class person. super: object. age: {positive_integer}.

end_class.

section(a 1). [ ] --> may get_into_debt([debtor: PersonlD])

:-object(PersonlD, person, [age: X, X>20], self# time). section(a2).

[ ] --> mustnot get into_debt([debtor: PersonlD]) :-object(CreditlD, credit,

[debtor: PersonlD], self# time). section(a3).

exec(DebtlD) :-o_create(_, credit, [creditor: (DebtlD # creditor), debtor: (DebtlD # debtor), amount: (DebtlD # amount)],

DebtlD # time). section(a4).

[event(EventlD, get_into_debt, [ ], T): limit(T, 1 year, T2)] --> must pay_debt([debtor: (ID # debtor),

amount: (CreditlD # amount)]) :-object(CreditlD, credit, [reason: EventlD], _) .

Page 23: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 3 d l

section(a5). exec(PayID):-PayID # amoun t= (PayID # object) # amount, T ,

delete(PayID # Object). exec(PayID):-Rest is (PayID # object). # amount-PayID # amount,

o modify(PayID # object, [amount: Rest], PayID # time).

In this description, 'Credit # debtor' means 'the value of a slot "debtor" of an object instantiated to "Credit", ' and ' [ ] - - ) . . . ' means 'there is no temporal limitation.' 'Get_into_debt' and 'pay_debt' are lower classes of 'commercial transaction.' The methods of the upper class are inherited to lower classes. Therefore, to check the legality of 'get_into_debt,' methods contained in the classes ' ge t jn to_debt ' and 'commercial transaction' are referred to.

Let consider the following case problem.

"Tom obtained the loan of 50 dollar from Bill in 1984/5/3. At that time Tom was 21 years old. He payed 30 dollar in 1985/2/2."

This case is expressed by two objects( 'Tom' and 'Bill') and two events('get into _debt ̂ 1' and 'pay_debt ̂ 1').

'Tom' 'Bill' age: [1984/5/3: 21]. age: *

get_into_debt ̂ 1 pay_debt ̂ 1 time: 1984/5/3 time: 1985/2/2 debtor: 'Tom' debtor: 'Tom' creditor: 'Bill' creditor: 'Bill'

amount: 50 amount: 30

To check the legality of 'ge t into_debt ̂ 1,' let send a message 'legal' to 'get_into _event ̂ 1.'

? -send_rnsg(get_into_debt^l, legal(_)).

Then, the method of 'ge t into_debt' is activated and section(a2) and section(al) are reffered in this order. As 'get_into_debt^l ' satisfies both of them, the execution of 'send_msg(get_into_debt^l, legal (_))' is successful.

Next, to simulate the effect of ' ge t jn to_deb t^ 1,' let send a message 'effect' to 'get_into_debt ̂ 1.'

? -send_msg(get_into_debt ̂ 1, effect(_)).

The method of 'get into_debt^l ' is activated and section(a3) is executed. As the result, a new object 'credit ̂ 1' is created.

credit ̂ 1 birth: 1984/5/3 debtor: [1984/5/3: 'Tom'] .

Page 24: A knowledge representation and inference system for procedural law

342 K. Nitta J. Nagao T. Mizutori

creditor: [1984/5/3:'Bi11'] amount: [1984/5/3: 50] reason: get into_debt ̂ 1

Also the simulation of 'pay debt^ l ' is done by following messages.

?-send_msg(pay debt^l , legal(_)). ?-send msg(pay debt^l , effect(_)).

Then, credit^l is changed as follows.

credit ̂ 1 birth: 1984/5/3 debtor: [1984/5/3: 'Tom'] . creditor: [1984/5/3: 'Bill']. amount: [1985/2/2: 20, 1984/5/3: 50] reson: get into_debt ̂ 1

This is the way of the simulation of event by KRIP/L-2. In this example, the class corresponding to "obtain the loan" is not given in the knowledge base. Therefore, in order to express the "obtain the loan," a concept 'get_into_debt' is used instead. If the following class is added to the knowledge base,

class obtain_the loan. super: get into_debt.

end_class.

then the first event can be expressed as follows.

obtain_the_loan ̂ 1 time: 1984/5/3 debtor: 'Tom' creditor: 'Bill' amount: 50

w KRIP-2: Knowledge Representation System of Laws Relating to Industrial Property

4.1 Structure of KRIP-2 The software tool for building legal expert systems is called KRIP-2.

KRIP-2 is an implementation of KRIP /L-2 and provides a programming environment. It is implemented in P ro log /KABA on a NEC PC-9801 personal computer with a mouse. It is composed of two sub-systems--the expert support system and the user support system (Fig. 9).

The 'expert support system' is composed of 4 modules--2 editors and 2 translators. The lawyer describes and stores the knowledge of the law using the class editor and the logic editor.

Page 25: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 3,t3

I H H class editor class description . . . . . . : I

i logic editor clauses ] I I I .J = I

expert support sub-system

translator

translator

[ I - - - - - 1 ~ I I

I -L___'

I r - - - ] i t . _ _ _ . l

Knowledge Base

event editor fact database inference engine m

user support sub-system

Fig. 9 Organization of KRIP/L-2.

The 'class editor' is an editor of spread sheet type. The expert defines all terms occurring in the provisions as classes. The technical terms are registered in the dictionary, and the expert can input these words without typing by pointing them out using a mouse.

The 'logic editor' is an Emacs-like screen editor. Besides the functions of Emacs, the user of the editor can use a mouse and the dictionary of technical terms.

When the knowledge of the law is provided, the knowledge is converted into the internal form (Prolog) using tranlators. The Prolog programs created are the knowledge base of the expert system.

The 'user support system' is composed of the fact input module and the inference engine.

If a user wants to consult the system about the problems concerning the procedures, he inputs the facts using the 'fact input module. ' The user can input the facts by either a spread sheet type editor or restricted natural language (Japanese). All facts are expressed as objects or events and registered in the fact data base.

When the user finishes inputing the facts, he starts the inference engine. The standard role of the inference engine is to simulate the effect of each event in the fact data base. The 'inference engine' sends three messages

'constraint' - - t y p e checking of each slot 'legal_check' - - checking of prerequisites 'effect' - - side effect of the event

Page 26: A knowledge representation and inference system for procedural law

344 K. Nitta J. Nagao T. Mizutori

to each event in the order of the date of occurrence, and checks the legality and accumulates the effect of the event as the internal state of the objects. These messages are prepared as standard, and the user can change the inference engine easily by writing a Prolog program.

The system displays the result of legal checking on the screen (appendix). I f the user wants to know the reason of the results in more detail, by using the H O W function, he can know the section numbers that are referred in the checking procedure. The system can show the original provision, its representa- tion in K R I P / L - 2 and the internal states of any objects at the any time.

4 . 2 Retroact ive Effect One of difficult problems in describing laws is the expression of the

retroactive effect. For example, if a procedure is invalidated or withdrawn, its effect is deemed never to have arisen.

In KRIP-2, the effect of each procedure is accumulated as the internal state of each object. Therefore, if a procedure is invalidated, its effect must be set

TA TB TC

( a ) fact

(9 @ @ (b) legal effect (before TC )

@ ( c ) back to TA

@ (d)

| legal effect ( after T C )

Fig. 10 Retroactive effect.

Page 27: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 345

as the prior state. For example, in Fig. 10(a), let A, B and C be the procedures. Let the prerequisite of B be that A is taken beforehand,

Eevent(.., A, ..): infinite future] - -> may B :- ...

and let the effect of C be an invalidation of procedure A. The effects of these procedures are simulated in the order of A, B, C. When B is checked, B is legal and the situation (a set of internal states of all object at the time) is changed

from Y to Z (Fig. 10(b)). At time of TC, C is checked. The effect of C is an invalidation of A.

Therefore, the situation is set back to X which is the one before A is taken (Fig. 10(c)), and the simulation restarts from the date of A. In the second checking, the existence of A is neglected. Therefore, the prerequisite of B is not satisfied and B is judged to be illegal.

In this example, B is legal when the simulation is performed before TC, and B is illegal after TC. Therefore, the result of the legal checking varies by the date of basis, and the situation before set back (Z in this example) is frozen and saved. The freezing of the situations and a retrying of the simulation can be carried out using special system predicates 'freeze' and 'retry' as follows.

class invalidation.

effect(ObjectProc) - -> freeze(self # time), invalidate(ObjectProc, self # time), retry(ObjectProc # time).

end_class.

4 . 3 Related Works

~1) KRI~P/L-1 KRIP/L-2 is the second version of KRIP/L. 1) For the distinction, we call

the first version as KRIP/L-1. Also KRIP/L-1 employed the integration of object oriented concept and the extended Prolog. The most important difference between KRIP/L-1 and KRIP/L-2 is the expression of the effect of each proceedings. In KRIP/L-2, the effect of a proceedings is expressed as creation, modification or deletion of objects. The situation is defined as a set of internal states of objects. On the contrary, in KRIP/L-1, the effect of the proceedings is expressed as a assertion. For example, let consider the 'debt' case appeared in Section 3. 4 again.

In KRIP/L-2 , it is expressed as follows.

class get into_debt.

effect(_) - -> exec(self, section(a3)). end_class.

Page 28: A knowledge representation and inference system for procedural law

346 K. Nitta J. Nagao T. Mizutori

section(a3). exec(DebtID):-o_create(_, credit, ..).

A 'credit' is expressed as an object, and it is stored in the fact database. The effects of a series of proceedings are accumulated as internal states of objects.

In KRIP/L-1 , this case is expressed as follows.

class ge t jn to_debt .

action: [section(a3)]. end_class.

section(a3). [event(_, ge t jn to_debt , ..): infinite_future]

= )credit([debtor: ...] ).

In this case, a 'credit ' is not stored in the fact database. Every time when the system wants to know whether a credit exists or not, the system has to prove the effective event 'get into_debt ' exists or not ('effect' is a system predicate which checks the legality of a procedure). In other word, the inference of K R I P / L - 1 is done in goal driven, and the inference of K R I P / L - 2 is done in event driven. In the case of KRIP /L-1 , it takes much time to grasp the current situation, if the case problem consists of many events. Besides that, if the credit is transfered to other person or if it disappears, the assertion of the credit must be denied and a new effect must be asserted.

The advantages of KRIP/L-1 are that the effect of each proceeding is expressed strictly in a logic, and that the retroactive affect is easy to express. The advantages of K R I P / L - 2 are that because the effect of each proceeding is accumulated in the order of occurence, the legality check is done quickly and that the description of change of a situation is easy.

~2] Knowledge representation of temporal information There are lots of works concerning the representation of temporal

information. 2-6) We employed the notat ion of Templog 4) which is based on the interval logic, s) and modified it to suit the representation of the Patent Law. The reasons why we select the combinat ion of the interval notat ion and the event simulation are as follows.

(1) In the patent case, most changes of the situation are caused by proceed- ings. Therefore, if each proceeding is regarded as an event, the event simulation is suitable to describe the phenomena happened in the real world.

(2) For the representation of temporal information, most provisions of the Patent Law uses the 'date' or 'month ' or 'year ' as the time unit. Therefore, we can think the time consists of a sequence of date, and it is not

Page 29: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 347

continuous. (3) Many prerequisites of proceedings are provided using interval between

other proceedings. Therefore, the notation of the interval is easy to represent them.

(4) In the patent case, the order of proceedings taken before the Patent Office is important. However, all of the dates of proceedings are decided definitely as data, because they are recorded in the Patent Office. There- fore, it is very easy to decide the order of proceedings.

Because of these reasons, we need not complex reasoning about time, and our method of simulation is simpler than other works. 6)

[31 Knowledge representation of laws To build the knowledge base o f the law, many researchers employs the

logic, because the provisions consist of logical sentences, s-'~ They think that solving a legal problem is realized as the proof of logic. However, there are two problems in treating the legal problem as the proof of logic.

(1) The knowledge of the law contains the control information which is not expressed explicitly. Usually, the proof of the logic can not be controlled. In KRIP/L-2 , the inference is controlled by the description of classes. Therefore, the provision and its control is separated clearly.

(2) The provisions are logical when they are observed locally. However, if we observe the system of the law totally, there are lots of provisions which conflict with each other. To cope with it, the extended logic may be needed. Let consider the simple example.

"If A holds, a person may carry out procedure P." "If B holds, a person may not carry out procedure P."

The priority between them is decided by the domain knowledge. Let the latter provision have the priority, then they can be expressed as follows.

First order logic A and not(B) = >may_carry(P)

Non-montonic logic A and M may carry(P) =>may_carry(P) B = >-may_carry(P)

% 'M Q' means that -Q has not been proven. %

In the case of the First order logic, two provisions are merged into one clause. The disadvantage of this method is that if there are a lot of exceptional provisions, or if there are exception of exceptional provisions, the expression will become very complex. In the case of the Non-montonic logic, the expression is natural. The disadvantage of this method is that the most of provisions of the Civil Law must be expressed with 'M' because there are many special laws of the

Page 30: A knowledge representation and inference system for procedural law

348 K. Nitta J. Nagao T. Mizutori

Civil Law. In KRIP/L-2 , these provisions are expressed as follows.

section(a 1 ). [ ~ - - ) may P : - A.

section(bl). [ ~ - - ) mustnot P :- B.

According to the function of the predicate 'legal,' if the check of the legality of section (bl) fails, P is regarded illegal even if the check of section (al) is successful.

? - legal(P, _). n o

Therefore, we can prove the legality of P as the similar semantics to the non-monotonic logic.

In KRIP/L-2, there is another way to refer to the provisions. For exam- ple, let the knowledge base contain the following description.

class foo. legal(_) - - ) legal(self, section(b 1)),

legal(self, section(al)). end_class.

In this case, as the provisions referred to are indicated explicitly, another provisions will never be referred to. By this mechanism, the effective proof is realized.

(4) Object oriented languages KRIP/L-2 employs object oriented concept. Our specification is simpler

than those of another object oriented languages such as Smalltalk-80, ABCL, Orient/85 and so on. KRIP/L-2 has no class method and no meta-class, and the object of KRIP/L-2 can access other object's slots directly. However, for the purpose of the simulation of the legal problem, our specification is sufficient.

KRIP/L-2 is similar to ESP 14) because the method is described as a logic program. However, for present, the value of each slot of ESP is restricted to atomic data.

w Expert System for the Patent Law The expert system of the Patent Law is implemented in KRIP. Generally

speaking, the functions of the expert system of the Patent Law can be enumerat- ed as follows.

(1) Searching of filed applications concerning some technical term. (2) Judgement if an invention infringes other patent right.

Page 31: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 349

(3) Consulting about the form and fee of each proceeding. (4) Consultion the strict interpretation of each provision. (5) Explaining the effects of a series of proceedings. (6) Prediction the result of the patent examination.

Among these, (1) is already available as a commercial database service. (2) is very difficult because a lot of knowledge of technical idea is needed and because the description of a claim is often written in abstract sentences. (6) is also difficult, because at any phase during examination process, the number of proceedings a person can take is usually more than one. For example if the examiner notifies the applicant the reasons of refusal, the applicant may make an amendment, submit a statement of his arguments, file a divisional application, or withdraw the application. He can select one of them freely. Therefore, prediction of the result of examination is impossible.

5 . 1

( i )

( i i )

(iii)

Function of the System The functions of our system are as follows. When the user wants to know the form and fee of each proceeding, or when he wants to get the arranged information from the law, this system can show them with advice. For example, the system can answer the following question.

"I want to know the fee of the request for the examination." "Please enumerate the conditions of patentability of events." "What will happen if the applicant doen't request for examination

by the time limit ? " "Show me all the provisions concerning the pre-examination." "Is there any advice, when my application is refused ? "

When the user can't understand the meaning of a provision, this system can show one of its strict analyses in the clause of KRIP /L . When the user wants to find illegal proceedings or to know the effects of a case problem, the system realizes them by simulating the effect. For example,

"From the following case problem, find an illegal proceeding, and explain the change of the situation. And then, enumerate the proceedings John can take.

John invented a machine X and filed an application for X before the Patent Office in 1980/5/6. His application was laid open in 1981/12/3. He found that Tom was selling the similar machines in 1982/3/2, and he warned that John would require Tom to pay in compensation. John received the notification of reasons of refusal by the Patent Office in 1984/5/3. To get rid of the reason, John

Page 32: A knowledge representation and inference system for procedural law

350 K. Nitta J. Nagao T. Mizutori

made amendment changing the claimed invention from X to X'. X' is not similar to the machine that Tom had sold. Tom demand- ed for a trial because John's right to require compensation is deemed never to have arisen and Tom was damaged by John's warning."

Although this is rather simple case problem, it is not easy for a non expert to find illegal proceedings and to explain what right has arisen. This system can simulate even more complex problems.

5 . 2 Development of a Knowledge Base of the Patent Law To build a knowledge base of the Patent Law, the help of an expert (a

patent attorney) was needed since the important point is not the literal interpre- tation of provisions, but the substance interpretation. To develop our system, we interpreted the meaning of provisions from the viewpoint of the object model, and described the interpretation in KRIP/L-2. For each provison, there have been discussion about how to describe it in KRIP/L-2. As the Patent Law is a special law of the Civil Law, also some provisions of the Civil Law are contained in the knowledge base.

One of difficult problems is the correspondence between the legal concept and the real world concept. For example, in the Patent Law, 'working of an invention of a product' is defined as 'acts of manufacturing, using, assigning, leasing, displaying, or importing, the product.' However, in the real world, 'repairing the product' may happen, and if the repairing is done on the main part of the product, it will regarded as 'manufacturing.' To cope with the various actions in the real world, many concepts of actions are contained as classes in the knowledge base even if they don't occur in the Patent Law.

In the knowledge base of classes, not only the hierarchical relation between concepts, other information concerning the law has been expressed. Followings are examples.

( i ) The information of the flow of proceedings (Fig. 1) has been expressed in class description by indicating the next proceeding.

class application.

next step: request_for examination.

end_class.

class request_for_examination.

next_step: start_of examination.

end_class.

Page 33: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 351

( i i ) Comments or advice have been contained in the class description.

class application. , . .

comment: "If the right to obtain a patent is owned jointly, the patent must be filed jointly."

. . .

end_class.

(iii) Structure information of the Patent Law which is organized and stored in the mind of the expert has been contained.

class conditions_of patentability.

end_class. class condition_of_applicant.

super: conditions of_patentability. , . .

end_class. class condition of invention.

super: conditions_o f patentability. . , ,

end_class. class condition_of proccedings.

super: conditions of_patentability.

end_class. class power_to_enjoy ar ight .

super: condition_of_applicant.

end_class.

The concept of 'conditions_of patentability' is not appeared in the Patent Law explicitly. It is extracted knowledge by arranging the law. If the system contains such arranged knowledge, when the system is asked as

"Please enumerate the conditions of patentability of events."

the system can enumerate the conditions in the arranged form which is helpful for the user.

5.3 Example As examples for the description, a procedure 'request for_examination' is

described in KRIP/L-2. The prerequisite of the procedure is provided in section 48 (ter), and the effect is provided in section 48 (bis) of the Patent Law.

Page 34: A knowledge representation and inference system for procedural law

352 K. Nitta J. Nagao T. Mizutori

Section 48 (ter) (1) When a patent application has been filed, any person may, within seven years from the date thereof, make a request for examination to the Director General of the Patent Office.

Section 48 (bis) The examination of patent application shall be carried out upon a request for examination.

The description of these provisions is as follows. The meaning of section 48 (bis) is changed into the modification of the internal state of the registered_applica- tion.

section 48-3. [event(ID, filing_an_application, [ 1, -): limit(ID # date, 7 years,_)~

- -) may request for_examination([application: ID2~) :- object(ID2, registered_application, [application: IDa, _).

section 48-2-1. exec(ProcID):- o_modify(ProcID # object,

[state: requestS, ProcID # time). section 48-2-2.

[ ] - - ) must examination([application: IDJ) :- object(ID2, registered_application,

[application: ID, state: request],_).

class request_for_examination. super: proceedings_before the_Director_General. application: (registered application}. fee: "Fee is 38, 300 yen". form: "The form is provided in the Minister Order. Use form

12". comment: "This proceeding must be done within 7 years from

the date of the application." caution: "When a request for examination has not been made

within the time limit, the patent application shall be deemed withdrawn."

l ega l (_ ) - - ) legal(self, section(48-3)). effect(_) - -) exec(self, section(48-2-1)).

end_class.

class proceedings before_the_Director_General. super: proceedings_of_the_applicant. subject: ~party}.

end_class.

Page 35: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law

5 .4 The Evaluation of the Expert System of the Patent Law As explained in Section 5. 1, this system has three functions.

( i ) ( i i ) (iii)

353

To show the information extracted from the law. To show strict analysis of the law. To show the effect of proceedings by simulation, and find the illegal proceeding.

( i ) is useful for the staff of the patent division of a company because the system provides the detail information such as fee, form and advice. ( ii ) is useful for the student to study the law, because the description by KRIP/ L-2 is more strict than original provisions. (iii) is useful for the student because he can exercise the application of law to the case problem. This function is useful also for the expert, because the law sometimes revised and the exercise is needed to get familiar with the revised provisions.

w Conclusion In this paper, we have presented the software tool to build the expert

ststem of the Patent Law. The description language KRIP/L-2 is the integration of the object oriented concept and the extended Prolog. KRIP/L-2 is proposed to describe the Patent Law. The retroactive effect and the temporal requisite and the effect of a procedure are described easily by KRIP/L-2. KRIP/L-2 is useful to develop the expert systems of other procedural laws because problems contained in the description of the Patent Law are common in other laws.

In this system, the legal checking is performed in the order of procedures as a kind ofd event simulation. This is a reasonable way because the legality of each procedure cannot checked individually. By accumulating the effects of procedures taken before, the legality of a procedure can be judged.

This system provides not only the results of legal checking but the situation of any time. Such information can be used to select an appropriate strategy.

Sections described in KRIP/L-2 are 3, 6, 7, 8, 17, 17-2, 17-3, 18, 29, 32, 33, 36, 39, 48-2, 48-3, 49, 50, 51, 52, 55, 57, 58, 60, 62, 64, 65-2. Because of the restriction of the memory space, we can't contain another knowledge. The description of these sections is more difficult than expected. There is ambiguity in interpreting provisions, and sometimes temporal provisions should be made up for. When the interpretation of a provision is controversial, we selected an opinion which is supported by many legal scholars. KRIP-2 system can be applied to not only to legal problems but to simulation problems as well.

Page 36: A knowledge representation and inference system for procedural law

354 K. Nitta J. Nagao T. Mizutori

References 1) Nitta, K. et al., "KRIP: a Knowledge Representation System for Laws relating to

Industrial Property," Lecture Notes in Computer Science, Vol. 221, 1986. 2) Fites, R. et al., "STRIPS: A New Approach to Application of Theorem," Artificial

Intelligence, Vol. 2, 1971. 3) McDermott, D., "A Temporal Logic for Reasoning about Processes and Plans,"

Cognitive Science, 6, 1982. 4) Yonezaki, N., "Templog: A Tempral Logic Programming Language," Proc. Conference

of Japan Society of Software Science and Technology, 1984 [in Japanese]. 5) Schwartz, R. L. et al., "An Interval Logic for Higher-Level Temporal Reasoning." 6) Shoham, Y., "Ten Requirements for a Theory of Change," New Generation Computing,

Vol. 3, 1985. 7) Brachman, R. J. et al., "Krypton: A Functional Approach to Knowledge Representa-

tion," Computer, Vol. 16 No. 10, 1983. 8) Sergot, M. J. et al., "The British Nationality Act as a Logic Program," Research Memo,

Imperial College, 1985. 9) Yoshino, H. et al., "Legal Expert System LES-2," Logic Programming Conference '86,

1986 [in Japanese]. 10) Tojoh, S., "Automatic Searching of Provisions," Master Thesis, Tokyo University,

1983 [in Japanese]. 11) McCarty, L. T., "Permission and obligations: an informal introduction," 1986. 12) Yoshifuji, K., The Patent Law, Yuhikaku [in Japanese]. 13) Explanation of the Laws relating to Industrial Property, Association of the Invention,

1986 [in Japanese]. 14) Chikayama, T., "ESP Reference Manual," ICOT, TR-044, 1984.

A p p e n d i x When the user starts the KRIP-2 system, the top level figure is displayed as Fig.

A-1. The left-hand side is the expert support subsystem, and the right-hand side is the user support subsystem. The rectangulars correspond to the modules. If the user points out one by a mouse, the module will be activated.

Figure A-2 is the screen of the class editor. The user can define the class by filling in each column of a slot name, a slot type and a provision. The editor has a dictionary of the procedure names. By pointing the word using the mouse, the user can input the word without typing.

Figure A-3 is the screen of the logic editor. It is called as 'Turbo Emacs' because this editor has most of the functions of the Emacs/editor. The user can use the mouse and the dictionary of the procedure names, too.

Figure A-4 is the screen of event editor (facts generator). It is similar to the class editor. The fact is stored as the form of objects by this editor into the fact database.

After the user activates the inference engine, the user inputs the file name of the fact database. Then, the objects are read into the inference engine and all objects are displayed for the user. If the user points out one object using the mouse, the internal state is shown as in Fig. A-5.

The legality of each object is checked from the oldest one, and the results are shown to the user (Fig. A-6 (a)). If the user wants the detail explanation of the

Page 37: A knowledge representation and inference system for procedural law

A Knowledge Represen ta t ion Inference System for Procedura l Law 355

checking, by pointing the [REASON] of the lower part of the screen, the explanation is displayed in the upper part of the screen. In the example of Fig. A-6 (b), it says the section 48 (ter) is referred. Then, if the user points out the [SECT. ENGLISH] , the original provision is displayed (Fig. A-6 (c)). If the user points out the [SECT ( K R I P / L)], its description in KRIP/L-2 is displayed (Fig. A-6 (d)). The user can know the internal state of any object by [OBJECT. DISP].

K R I P S Y S T E M

eng ine

K R I P

Fig . A - 1

~ i i e a f i o n :

,,,,,

.... !ii :iii: ~ ~ ~ ~,~n~ ~ ( ~ ~ j~]~[i~ i ~ ~ ~ :: ~ :~:::;~:~ :t~ ~ I

7 i i ....

Fig . A - 2

m ~ e n ~ h u m a ~ nar ,: ~

: H m t t

....

~ii%;~i~ ~ % ~;~:~

Page 38: A knowledge representation and inference system for procedural law

356 K. Nitta J. Nagao T. Mizutori

section ( 'pat0 ' , 0, 7 ) T @ ( 'person- proc ' (ID, Cond ) : -

stand ( 'person _right ' ( ID, Cond ), T, - ) ).

section ("pat 0 ' , 0, 8 ) T @ (' publish' (ID, [ 'content ' : ID 2, 'place ' : ' japan' ]) : -

event ( ID, ' laying_open' , [ 'claim' : ID 2 ], ~ time' : T 2 ] ,_ ), before ( T 2, T ) ).

section ( 'pat 0 ' , 0, 9 ) . T@ ('public work' (ID, Cond) : -

ext event ( ID , 'work ing ' , [ 'public ' : yes [ Cond], T ) ) .

section ( 'pat 2 ' , 1, 0 ) . T @ ( ' invention' (ID, Cond) : -

object ( I D , ' t e c h idea ' , [ 'na tur i ty ' : yes, ' c rea t iv i ty ' : yes, 'advance ' : yes [ Cond] , T )) .

section ( 'pat 2', 3, 1 ). T @ (' working' ( ID, Cond ) : - a s soc list ( 'content ' : ID 2, Cond ),

ext object ( ID 2, ' invention' , [ ' ca tegory ' : 'product ' I Cond], T ), object ( ID 3, 'product ' , [ ], T ).

Turbo Emacs [ v e r 1.06] : Visit file : jobun, txt * Text : [jobun. tx t ] Buff : {new_file}

Fig. A-3

app| ication :~:"]

I

I [

get C L A S S

[

~ub~ic

.... ac t ibn t

Fig. A-4

Page 39: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 357

event 43/8 / 8-~ smith' s_invention (-invention) 49/10/21 ""Smith' s application" [ application 50/1 / I "=smith' s_req_exam [ r eq_e 51/5 / I " : smi th ' s_laying~open [ la 53/4 / 5 "-- smith~ s_exam (exam) 53/5 / 1 "~= smith, s_rend_pubtic [ re 54/1 / 1 -=~ Smith s_transm_ruling_p 5 4 / 5 / 1 --- smith' s_publieation [pu 54/5 / 1 --- smith' s_dec_~ant [dee_

obiect --- object --- smith [ human] object --- fiber_optics ~tech-idea

hidden object

[please select with mouse ]

file namel "' fact 1.k

Fig. A-5

current procedure smith s req exam [ 5 0 / 1 / 1 ]

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

s tar t type_check of smith's_req_exam

star t to check whether the type of value (smith) of (subject) is ( p e r s o n - p r o c ) o r not OK

star t to check whether the type of value (application_A) of (body_appli) is (body-appli) or not OK

star t to check whether the type of value (yes ) of (valid) is ( b o o l ( y e s ) ) or not OK

execution of message (constraint) is success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

s tar t legal_check of smith 's-req~exam k

execution of message (legal_check) is success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

[ ST OP] ~ OBJE CT D!SPi ] [ SECT(KRIP]L)~ ~ S E C T ENGLISH] [REASON]::[eraWiND] ::

Fig. A-6(a)

Page 40: A knowledge representation and inference system for procedural law

358 K. Nitta J. Nagao T. Mizutori

current procedure smi th ' s req exam [50/1/1]

s t a r t to check with section pa t48 te r , 1, 1 smi th ' s _ application [application~ is investigated

(valid) is (bool (yes)) or not OK

execution of nvssage (constraint) is success

start legal - check of smith' s - req_ exam

execution of message (legal_check) is success

::[ ST OP~:~O~ECT: DISpI:

Fig. A-6(b)

current procedure s m i t h ' s req exam [50/1/1/]

(subject) is (person_proc) or not

OK

s ta r t to check whether the type of value (application_A) of

(body_appli) is (body-appli) or not

OK

s ta r t to check whether the type of value (yes) of (valid) is (bool (yes)) or not OK

execution of message (constraint) is success

s ta r t legal -check of s m i t h ' s - r e q - e x a m

execution of message of message ( legal-check) is success

Fig. A-6(c)

Page 41: A knowledge representation and inference system for procedural law

A Knowledge Representation Inference System for Procedural Law 359

current procedure smith 's req exam [50/1/1]

n i t (iD ~ time, 7year;~l ] ~ - may r e q . e x a m ( [ b o ...... i, Estate, appliCation] , self ~ time)) : : ..... : !xam

s tar t to check whether the type of value (smith) of (subject) is (person-proc) or not OK

start to check whether the type of value (application A) of (body-appli) is (body-appli) or not OK

star t to check whether the type of value (yes) of (valid) is (bool (yes)) or not

OK

execution of message (constraint) is success

s tar t legal _ check of smith' s - r e q - exam

execution of message (legal-cheek) is success

[ STOP ][OBJECT DISP: ] [SECT(KRIP/L)] [ SECT. ENGLISH] [REASON] [eraWIND ] \

Fig. A-6(d)

current procedure smith 's req exam [50/1/1]

(subject) is (person-proc) or not OK star t to check whether the type of value (application-A) of (body appli) is (body-appli) or not OK

star t to check whether the type of value (yes) of (valid) is (bool (yes)) or not OK

execution of message (constraint) is success

s tar t legal_ check of smith ' s - req_ exam

execution of message (legal- check) is success

[ S T O P ] [ O B J E C T DIS P : ] [ SECT(KRIP /L i ] [ ~ E C T E N G U S H ] [ REASON ]:[ er~WiND ]

\ Fig. A-6(e)