® InfoJur.ccj.ufsc.br
Paper Prepared for the
III International Conference Logica Informatica Diritto - Expert Systems in Law
to be held 2-5 November 1989 at Florence, Italy
Daniel Poulin, Ejan Mackaay, Paul Bratley, Jacques Frémont
Daniel Poulin, Ejan Mackaay, Jacques Frémont
Centre de recherche en droit public , Faculty
of Law
Paul Bratley
Department of Computer Science and Operational
Research
Financial support for this research is provided by the Social Science Research Council of Canada and by the Fonds FCARof the Quebec government under its programme of Actions structurantes.
In recent years a number of prototype legal expert systems have made their appearance. Researchers in this field are now more interested in developments which will allow them to go beyond the implementation of prototypes to the construction of useful and easily usable large-scale systems.
Many conditions remain to be fulfilled before the construction of such systems can become a matter of routine. One in particular has engaged our attention : the ability to take proper account of the temporal aspects of legal rules.
Numerous branches of the law require the use of rules in which the temporal dimension is frequently present, and sometimes even all-pervading. The area of social legislation, and in particular of the laws concerning unemployment insurance in Canada, is an example of this. Our work on Chomexpert[1] , a prototype expert system for deciding questions on unemployment insurance in Canada, convinced us that to express legal rules in this area we need a formal language capable of describing time and its effects. We began in the obvious way, by exploring thoroughly the field of temporal logic as developed by workers in artificial intelligence.[2] The result of this investigation was to convince us of the need to develop a new temporal logic more suitable for the expression of legal rules. The language EXPERT/T and the time specialist presented here represent a first step towards defining and implementing such a new temporal logic.
To be useful in the context of an expert system, a temporal logic must be accompanied by an automatic proof procedure for the logic in question. The development of a suitable formalism for our logic therefore naturally goes hand in hand with the development of proof procedures for the system we are building. Prolog interpreters were already available to provide such procedures for a large subset of first order logic. We decided to proceed by adding to this foundation a set of procedures able to handle the necessary temporal aspects. These in turn would suggest how to design a formal temporal logic allowing us to express the legal rules we intend to model.
In fact the whole process is circular : the requirements of the logic impose certain constraints that must be satisfied by the proof procedures ; for the proof procedures to be efficient, or even to be feasible, may require changes to the formalism ; and so on. The collection of proof procedures, including the features provided by Prolog, will be referred to henceforth as our "time specialist."
In what follows we describe the progress we have made towards defining a suitable
temporal logic for legal rules and implementing a time specialist. The power of these new
tools is illustrated examples drawn from the field of unemployment insurance law. First we
describe the difficulties encountered in handling the temporal aspects of these examples
in the prototype implementation. After introducing our temporal logic and the time
specialist, we return to these examples to show how these difficulties can now be handled.
The relationship of time and law falls into two broad categories which one might call law in time and time in law. As to the first, law changes over time. Such changes must be reflected in the knowledge base of an expert system. In the case of legislative changes, there may be a question of whether the new law applies retroactively to existing institutions or whether the old law continues to apply. This too raises difficulties for the design of expert systems. We do not study these problems here.[3]
Instead we are concerned with the second type of relationship of law and time, to wit that legal rules refer to dates and intervals for establishing legal consequences. The importance of this phenomenon varies from one field of law to the next. In no field of law are questions of time entirely absent, but they are paramount in unemployment insurance legislation.[4]
The essence of the Unemployment Insurance Act is set out in Appendix I. Of interest here is that the Act contains numerous references to time concepts: events such as "interruption of earnings" (sec. 2, 6)[5] , "stoppage of work" and "termination of stoppage of work"(sec. 31), "refusal of suitable employment" (sec. 27); periods of time such as "qualifying period" (sec. 7), "benefit period" (sec. 8 et 9), "waiting period" (sec. 12). In many cases legal consequences depend upon particular configurations of time concepts.
This may be illustrated first by the simplest case of determination of the qualifying period. The relevant statute provisions read as follows:
Sec. 7. (1) [...] the qualifying period of an insured person is the shorter of(a) the period of fifty-two weeks that immediately precedes the commencement of a benefit period under subsection (1) of section 9(1), and [...]
Sec. 9. (1) A benefit period begins on the Sunday of the week in which(a) the interruption of earnings occurs, or(b) the initial claim for benefit is made, whichever is the later.
To determine the qualifying period, one must compare the dates of the interruption of earnings and that of the initial claim, decide which is the later and count back 52 weeks from that date. This is illustrated in Figure
1.[6]
Figure 1. Basics of Unemployment Insurance Law:
Computation of the Qualifying Period
Let us complicate the example by looking at the problem of determining the "qualifying period" for those who have suffered some unemployment during the previous year and have already been entitled to an earlier benefit period. We now need the full text of subsection 9(1), which reads as follows:
Sec. 7. (1) [...] the qualifying period of an insured person is the shorter of(a) the period of fifty-two weeks that immediately precedes the commencement of a benefit period under subsection 9(1), and(b) the period that begins on the commencement date of an immediately preceding benefit period and ends with the end of the week preceding the commencement of a benefit period under subsection 9(1).
The end of the "qualifying period" is determined as before. As for its beginning, because of paragraph (b) it is not sufficient to count back 52 weeks but one must determine whether, within that period, another "benefit period" has started. If so, the beginning of the latter will be the beginning of the new "qualifying period." Figure 2 illustrates graphically what happens. The reasoning steps are numbered 1,2 and 3).
Figure 2. Computation of a new qualifying period where there has been a previous period of benefit
The determination of the duration of the qualifying period may be further complicated where for legitimate reasons one has been unable to work during the weeks that would normally count as the "qualifying period." In such a case one counts back further, as subsections 2 and 3 of section 7 indicate.
sec. 7 [...]
(2) Where a person proves [...] that during any qualifying period mentioned in paragraph (a) of subsection (1) he was not employed in insurable employment for the reason that he was for any week
(a) incapable of work by reason of any prescribed illness, injury, quarantine or pregnancy;
[...]
that qualifying period shall [...] be extended by aggregate of any of those weeks.
(3) Where a person proves [...] that for any week during any extension of a qualifying period referred to in the subsection (2) he was not employed in insurable employment for any of the reasons specified in subsection (2), that qualifying period shall [...] be further extended by the aggregate of those weeks.
We will not pursue the example any further. The foregoing should suffice to show how the rules defining one of the basic concepts of the Act give rise to fairly complicated computations. To the lawyer, such operations, while no doubt complex, do not pose a conceptual problem. Yet in our prototype formalisation of the Act, they did since the various comparisons of date and intervals could not readily be represented by means of the rules used in expert systems. It is easy enough to write in the form of a rule that
If a person has worked twenty or more weeks during his qualifying period
and
has an interruption of earnings
then he or she qualifies to receive benefits under the Act. (subsec. 6 (2)
But to determine where the benefit period should start in the example given above requires a series of comparisons (the earlier ; the shorter ; does work period a fall within qualifying period b, which implies checking beginning and end dates, and so on.) We formalised these operations as best we could but were convinced that the formalisation was rather cumbersome (very detailed) and moreover ad hoc. For any set of comparisons of this kind (rather standard in the Act), the operations would have to be spelled out in similar detail. Any change of the Act would entail substantial rewriting of the knowledge base.
In the face of these difficulties, we decided to investigate whether the operations on
temporal elements of our domain could be represented by a small number of primitive
operators whose combinations could be spelled out in a temporal logic. The expert system
would then draw upon this logic for any inference involving temporal elements. In the
following section we present the results of this investigation. In section 4 we return to
the example given above in order to show how its formalisation in an expert system may be
simplified by means of the temporal logic proposed here.
The system we propose in this paper has two principal elements : the design of a language which allows us to express the temporal aspects of legal rules, and the use of a time specialist. Other ways of implementing temporal logics have been explored.[7] However it seems to us that the most appropriate way to design data bases for legal applications in areas where temporal considerations play a major part is to use a combination of a specialised language and a module intended specifically for handling time.
The idea of using a special temporal module, a time specialist, is not new. As far back as 1977, Kahn and Gorry proposed such an approach. They defined such a time specialist as "a program knowledgeable about time in general which can be used by a higher level program to deal with the temporal aspects of its problem-solving". [8] This first time specialist was quite limited and by no means efficient. However the underlying idea was sound, and gave rise to a number of improvements.
The best-known work in this area is probably that by J.F. Allen. Allen proposed a time specialist using reasoning based on the notion of an interval. He also proposed a temporal logic built on this same basic concept.[9] In later work Allen described a way to include in his interval-based system the notions of an event occurring at a point in time, with zero duration, and of a "moment" : a short interval which cannot be further subdivided.[10] However up till now this later work has remained of largely theoretical interest.
The work we describe here takes Allen's papers as its starting point, and goes on to
propose a new way of handling intervals and events and to introduce a technique for
dealing with the reference times of such temporal entities.
EXPERT/T is a language designed to express knowledge which includes a temporal dimension ; such knowledge can be expressed in the form of facts and rules which may include temporal constraints. It is specifically designed to represent judicial rules in those areas of the law where time plays a particularly important role. Of course this does not preclude the possibility of using the language in other areas where temporal aspects must be considered.
EXPERT/T has similarities to the temporal logic proposed by J.F. Allen. Temporal references can be associated with propositions. The language allows both intervals and point events to be handled correctly. Temporal references can be given either in relative or in absolute form. (For instance, "interval A starts before interval B" or "interval A starts on September 22nd.") All the temporal aspects of a problem being considered are controlled by a specialised module, the time specialist. The EXPERT/T language serves to express the data and the conclusions which can be drawn using either Prolog or the time specialist.
We can use this language to express rules and items of knowledge concerning a particular area of the law, and to keep them in a data base. Such a data base includes a description of the temporal aspects of some initial situation, one or more descriptions of desirable final situations, and a set of rules. Figure 3 describes the syntax of EXPERT/T.
expert/T -> rule | element | Prolog rules rule -> id : if expression then conclusion expression -> expression and expression | expression or expression | not expression | ( expression ) | list-of-elements list-of-elements -> element , list-of-elements | element element -> temporal_term | term temporal_term -> term holds_on vt | term occurs_at vt | relation | temp_function relation -> i ( cond_op[1] ) i | pt ( cond_op[2] ) pt | pt ( cond_op[3] ) i | i ( cond_op[3] ) pt cond_op[1] -> { =, <, >, m, mi, o, oi, d, di, s, si, f, fi } cond_op[2] -> { <, >, =} cond_op[3] -> { <, s, d, f, > } temp_function -> i has_duration INTEGER {years | months | weeks ...} | and other functions...[11] conclusion -> add( list-of-elements ) | sub( list-of-elements )term -> any Prolog term... vt -> i | pt i -> i( name, date, date )pt -> pt( name, date )date -> [year [, month [, day [, hour,...]]]] | VARIABLE year,month,... -> suitable integers name -> identifier
FIGURE 3. The EXPERT/T Language
Any form allowed by this grammar is a valid way to express an item of knowledge in EXPERT/T. The principal elements of the language are temporal rules, elements (which are either temporal facts or simple Prolog terms) or items of knowledge expressed as Prolog rules. In the following paragraphs we consider each of these possibilities.
A temporal rule is the main mechanism for expressing knowledge. From the semantic point of view, such rules express necessary dependencies between elements, in particular between those found in the expression in the first part of the rule, and those in the list of the conclusion. Such rules allow us to add elements to the temporal data base, or to retract them, when the stated condition is true. A temporal expression is considered to be true whenever the knowledge base contains enough facts, temporal or otherwise, for the Prolog interpreter and the time specialist to be able to prove this expression.
Expressions are defined recursively so as to allow the construction of combinations of conditions. The latter are expressed as elements, temporal or not, which are to be proved. Parentheses can be used to avoid ambiguity. An expression without parentheses is interpreted using rules similar to those which apply to the Prolog language.[12]
The elements which appear in rules or which are contained in the knowledge base may or may not have a temporal dimension. Those which do not (the terms) are considered to be always true. Thus an element with no temporal references in the knowledge base is assumed to be true at all the times which interest us.
There are four kinds of temporal_term. First there are facts which have an extent in time, and hold throughout some interval. There are events, or facts which hold at a precise point in time. There are relations between temporal objects (intervals or time points), and finally there are special-purpose temporal functions which form part of the time specialist.
Properties or states are propositions which are true throughout an interval. In EXPERT/T they can be placed in the knowledge base at the outset, or added whenever a conclusion of the type add(
term
holds_on
vt
) is reached. This indicates that the proposition expressed by a term (which can be a Prolog term, an atom or a predicate) is true at vt. If vt is an interval, the property or state holds throughout the interval. If vt is a point in time, the property or state holds throughout an interval whose beginning and end are unknown, but which certainly includesvt . Finally vt can be a variable, in which case the proposition holds during an interval yet to be determined. Furthermore, if the system comes across a proposition of the type p
holds_on
VAR while evaluating a temporal expression, the time specialist will bind the variable VAR to the interval throughout which the proposition p holds. If no such interval exists, the time specialist signals failure. Similarly a proposition in the form p
holds_on
vt, where vt is a point or an interval, causes the time specialist to check whether there exists an interval I containing vt, and such thatp
holds_on
I. If so, the specialist signals success ; otherwise it signals failure.
Events take place at instants. Generally speaking they are associated with time points, but the language also allows an event to be added to the knowledge base by associating it with an interval known to contain the instant when it occurs. Events are added to the knowledge base using conclusions of the form add(
e
occurs_at
vt
). If vt is a time point, the system considers that the event took place at this time. If vt is an interval, the point when the event occurred is somewhere inside the given interval. Finally if vt is a variable, the event is associated with an undetermined time point. Requests to the specialist concerning events are treated similarly to requests concerning properties. On a call with the form e
occurs_at
VAR the specialist links the variable VAR with the time when the event took place, if this is known. If the event has happened, but the moment when it happened is unknown, the variable VAR is left unbound. Finally if the event is not mentioned in the knowledge base, the specialist signals failure. On a call of the form e
occurs_at
pt, where pt is a point, the specialist returns true if the event occurred exactly at that time ; otherwise the value false is returned.
Using temporal relations we can add or verify constraints concerning temporal objects. For instance add(
i1 (
<,
s,
d
)
i2
)[13] specifies that the relation between intervals i1 and i2 must be one of those indicated. If information in the knowledge base contradicts the new constraint, the base is unchanged and an error is signaled ; otherwise the knowledge base is updated. A request of the type Vt
(
<
)
i3 returns a list of all the temporal objects satisfying the relation < with i3, that is, all those which come strictly before the interval i3.
The language includes intervals and points. The beginning of a valid interval must be strictly before its end, that is, there are no zero-length intervals. Dates are used to denote the beginning and the end of intervals, and to denote instants when events occur. They have the following form : [1989,6], [1989,6,12,4,34] , etc., where the first example denotes the beginning of June 1989 (i.e. midnight at the start of June 1st), and the second denotes 4:34 a.m. on the 12th of June, 1989. The same instant can be referred to in several different ways : for instance, both the following dates refer to the same instant, although their precision is different : [1989,2] and [1989,2,1,0,0] .[14] Other systems for the dates can be used. In the area of unemployment insurance law, reference is made constantly to the week in which something happened. To facilitate this, we could also define dates to include a number for each week, in the form [year, month, day, ...; #week], so the week number is always available without recalculation.
EXPERT/T accepts rules written in Prolog so that the latter can be used directly to
control dialogues with the user, to refer if necessary to external data bases, to express
algorithmic knowledge, and so on.
Like the language, our time specialist uses intervals as the basic temporal element. Time points are defined in terms of special intervals. A suitable network allows us to represent the possible relations between any two temporal objects : for instance, they may overlap, meet, and so on. Points either precede or follow one another or are simultaneous. Relations between points and intervals are also possible. As each new item of temporal information is obtained, the time specialist computes all its implications for this network of relations. Therefore at any moment it provides a complete description of the system's knowledge of the temporal constraints on the existing temporal objects.
Besides these relations, the time specialist uses reference times attached to points, to the ends of intervals or to the duration of intervals. If two or more end-points of two intervals are known, for example, the time specialist can calculate the possible relations between these intervals and update the network. Conversely, if the information available from the network and known end-points is sufficient to fix the end-points of other intervals, then this is done. (A similar remark applies to points.) The time specialist is designed to handle a logic which is non-monotonic in certain aspects : if an item of temporal information assumed to be true is later contradicted, it can be removed from the network and the situation which obtains without it reassessed.
Finally the time specialist can deal with requests involving a kind of pattern matching. Such a request might ask, for instance, which known intervals extend across a given date and meet some other given interval. Quite complicated requests can be formulated in this way.
While implementing the time specialist, we improved some of the algorithms used for handling temporal constraints in previous similar work. These improvements allow us to incorporate reference times and durations into our time specialist while maintaining the level of efficiency attained previously.
To each proposition (a property or a state) which involves the notion of duration we associate an interval during which this proposition holds. Intervals possess a name and two end-points. [15] In our context temporal propositions and their associated intervals correspond to periods when a person is working, when he or she is unemployed, and so on. We also deal with events, which we associate either with a short interval during which the event takes place, or else with one end-point (the beginning, in fact) of a special interval bounded by this event.
We use the following notation to refer to intervals and points :
i(interval name, beginning, end)
pt(point name, time point)
Thus i(work,2,8)[16] might refer to a period of work beginning at time 2 and ending at time 8, while i(insurance, 8, F) might refer to a period during which insurance payments are made, beginning at time8 and ending at some time F which is not yet determined. Similarly, pt(fired,8) could mean that our client lost his job at time 8.
iii) Relations between Temporal Objects
For intervals, we use the relations proposed by Allen[17] . If a and b are two intervals, there are thirteen possible relations between them. Seven of these are illustrated in the following table :
Name Symbol Situation equal .................... a = b ......... aaaa bbbb before ................... a < b ......... aaa bbbb starts ................... a s b ......... aaa bbbbbb finishes ................. a f b ......... aaa bbbbbb overlaps ................. a o b ......... aaaaaa bbbbbb meets .................... a m b ......... aaa bbb during ................... a d b ......... aaa bbbbbbb
FIGURE 4. Allen's Relations Between Intervals
The remaining six relations are the inverses of those shown above, with the exception of "equal", which has no inverse. Denoting the inverse of any relation r by ri we define a ri b if and only if b r a. (We shall however write >instead of <i.) Thus a
>
b means that a is after b (the inverse relation to before),a si
b means that a is started byb, and so on.
These relations between intervals are exhaustive and mutually exclusive. Usually, however, our knowledge of the temporal relationship between a pair of intervals is incomplete. In this case we summarize the available information using a list of possible relations, with the notation
a (list of possible relations) b.
(If the list contains only one element, the parentheses are superfluous, and we suppress them.) Thus if work1 and work2 are the names of two intervals when a client was working, then
work1 < work2
means that the interval work1 was before the interval work2 , while
work1 ( <, m, o ) work2
means that work1 was before work2 , metwork2 , or overlapped it.
We use these same ideas to fix the notion of a time point or instant, defined as the beginning of a special, fictitious interval. In fact, whenever we tell the time specialist to add a time point to the temporal knowledge base, it will add an interval starting at the indicated time. Only the beginning of this interval is known, but this is all that is necessary. In this way, points can be related to other intervals and hence to one another.
Only three relations are possible between two points, namely <, = and >. Let p andq be two points, andip and iq be two "fictitious" intervals such that p is the beginning of ip and q the beginning of iq. The possible relations between points can be defined in terms of relations between the corresponding intervals as follows :
Relation between points Relation between associated intervals p < q ................... ip ( <, di, o, m, fi ) iq p = q ................... ip ( =, s, si ) iq p > q ................... ip ( >, d, oi, mi, f ) iq
FIGURE 5. Relations between points
Relations between points and intervals are defined similarly. There are five relations possible between a point and an interval, namely <, s, d, f and >. Supposing the interval associated with the point p to be ip, these relations can be defined as follows :
Relation between the Relation between the associated point p and the interval j interval ip and the interval j p < j ....................... ip ( <, o, m, fi, di ) j p s j ....................... ip ( =, s, si ) j p d j ....................... ip ( f, d , oi ) j p f j ....................... ip ( mi ) j p > j ....................... ip ( > ) j
FIGURE 6. Relations between point and interval
Inverse relations between intervals and points can be defined similarly.
These definitions and their consequences give us all we need both conceptually and from a practical point of view to control our temporal information.[18]
The network used by our time specialist has one node for each interval (real or fictitious) known to the system. The arc between any pair of nodes is labelled with the list of the possible relations between the two corresponding intervals. This label is continually updated, so that at every instant it summarizes the extent of our knowledge concerning the relationship between the intervals in question.
Whenever new information is added, the time specialist tries to make these lists more precise (that is, shorter). If the system is given more precise information about a particular pair of intervals, this new information is propagated throughout the network in case it allows us to shorten lists elsewhere. As a simple example, suppose we know that
work1 ( <, m, o ) work2
andwork1 m illness.
(That is, the interval work1 precedes, meets, or overlaps work2, while it also meets the interval illness.) Then the extra information that
work2 s illness
(that is, work2 starts the interval illness) allows us to infer that in fact work1 must meet work2.
Information about the end-points of intervals can also serve to make the possible relations between them more precise, and in turn information about the possible relations between intervals may allow us to fix certain end-points exactly. This process of propagating temporal information through the network of intervals is the principal task of the time specialist.
iv ) Adding Information about temporal objects
A new interval need not be completely defined when it is added to the network. Indeed it is possible to add an interval for which we know neither the starting point nor the ending point nor even the name. At the other extreme the new interval may be completely determined.
When the new interval is added, the time specialist first validates the new information. We check, for instance, that any specified end-points have non-conflicting values. Only valid data is added to the network ; any invalid data is refused, and an error message is issued.
Next the time specialist calculates the possible relations between the new interval and those already known to the system, that is, those with a corresponding node in the network of relations. For example, suppose that, starting from an empty system, we add the three following completely specified intervals (one at a time) :
i(illness, 1, 5), i(qualifying, 0, 58), i(work1, 2, 8)
Then when the third interval has been added, the temporal network will contain three nodes corresponding to these three intervals, and the arcs will be labelled to indicate that only the following relations are possible :
illness d qualifying, illness o work1
qualifying di illness, qualifying di work1
work1 oi illness, work1 d qualifying
As a second example, suppose that, starting once again from an empty system, we add intervals illness and work1 defined as above, but that the third interval reference is only partially specified :
i(qualifying, A, 58),
where A is a variable whose value is not yet defined. This time the network will show the following possible relations after the addition of the third interval :
illness ( <, d, m, o, s ) qualifying, illness o work1
qualifying(>, di, mi, oi, si) illness,
qualifying(>, di, mi, oi, si) work1
work1 oi illness, work1 ( <, d , m , o , s ) qualifying
The time specialist treats events similarly. For instance, suppose the system knows
that event p1 happened at time 5 , that this event happened during
interval i2, and finally that this interval i2 is either the same asi3
or meets i3, where i3 runs from time 6 to 7. In
this case the specialist will be able to deduce that event p1 happened before
i3, that i2 meets i3, and therefore that i2 ends at time6.
We may now reconsider the formalisation of unemployment insurance law in an expert system by means of the conceptual tools developed in section 3. At the outset, the system has a knowledge base of the legal rules and general data accessible to the "problem solver." To analyse a given problem, the facts of the case and other data must be added to the data base, by means of a dialogue with the user or otherwise.
These facts are added as elements, which may be either simple Prolog terms or facts with a temporal dimension, called temporal_terms. For instance the following term may be added
région_de(Lévis,Québec)
to indicate the region where the case arises. The date of the initial request for benefits by a person named Aline may be added by means of the following temporal_term
demande('Aline','Lévis') occur_at [1989,8,16].
Similarly because the regional unemployment rate has a bearing on the benefits that may be payable, the following general fact may be supplied as atemporal_term
taux_de_chômage_régional('Québec',12) holds_on (trim3,[1989,7],[1989,10]))
The system must now be informed of what it has to calculate, that is, the objectives. For a determination of the amount and duration of the benefits, the objectives would be specified as follows.
prestations(Aline,VALEUR) holds_on PERIODE_PRESTATIONSpériode_prest_max(Aline) holds_on PERIODE_MAXand so on.
It is essential to consider what the new representation allows us to gain. Let us consider how the problem of determining the "qualifying period" examined in section 2 would be handled. The relevant legal rules can be formalised in 10 expert system rules which are listed in Appendix B.
The first two rules allow us to solve the problem of the beginning of the benefit period, presented in the text around Diagram 1. If the initial claim takes place during the same week as the interruption of earnings, the interruption of earnings starts the benefit period (Rule 1). If these two events do not occur during the same week, it is the initial claim which starts the benefit period (Rule 2). This determines at the same time the end point of the "qualifying period."
Normally the "qualifying period" begins 52 weeks earlier (Rule 4). In Diagram 2 we presented the case where this is not so because the insured person has had a previous benefit period during those 52 weeks. In such a situation the "qualifying period" begins at the commencement of the previous benefit period. Rule 5 expresses this case.
Rules 6 and 7 contain the information required for determining the "qualifying period" in the case of an extension because of illness or for similar reasons.
The new representation has several advantages over its predecessor. It is parsimonious in that, for instance, the test of whether a previous benefit period has occurred during the standard 52 week interval can be expressed simply as "during or finish." Moreover, the formalisation is transparent, in that an ordinary user knowledgeable of the Act, upon reading the 10 rules, immediately understands which tests are being addressed. The simplification of the language, furthermore, makes it possible to attain uniformity of expression. Taken together these three characteristics make for a much more workeable tool than were the earlier ad hoc tests on dates.
The temporal logic developed here has the further advantage of specifying exhaustively and, we hope, consistently the relationships between temporal elements. This makes it feasible to determine the permissible inferences from two known relationships to a third one which is not given. This enhances our understanding of intuitive reasoning with temporal relationships.
The temporal logic developed here appears sufficiently promising to warrant
implementation. A prototype has been programmed and is running. In a future paper we hope
to report on its effectiveness in the creation of expert systems in law.
Allen, J.F., Maintaining Knowledge about Temporal Intervals. Commun. ACM 26, 11 (1983) 510-521
Allen 84
Allen, J. F., Towards a General Theory of Action and Time, Artificial Intelligence 23,2 (1984) 123-154
Allen 87a
Allen, J.F. and Hayes, P.J., Short Time Periods. In Proceedings of the 10th International Joint Conference on Artificial Intelligence ,1987, pp. 981-983
Allen 87b
Allen, J.F. and Hayes, P.J., Moments and Points in a Interval-Based Temporal Logic,
Dept. of Computer Science, Technical Report TR
180, 1987
Kahn 77
Kahn, K.M. and Gorry A.G., Mechanizing Temporal Knowledge, Artificial Intelligence 9,2 (1977) 87-108
Ladkin 87
Ladkin, P., The Logic of Time Representation, Kestrel Institute Technical Report KES.U.87.13
Mackaay, E., Poulin D., Frémont J. and Deniger C., La composition du temps dans les systèmes experts juridiques, forthcoming in Proceedings of the Conference de IRETIJ - Colloque sur les apports de l'informatique à la connaissance du droit, Montpellier, France, 10-11 March 1989
Mackaay, E., Poulin D., Frémont J. , Deniger C. and Bratley P., The Logic of Time in Law and Legal Expert System, forthcoming in Proceedings of the Conference on Expert Systems in Law, Bologna, Italy, 3-5 May 1989
Poulin 88
Poulin, D., Etude des particularités du droit du point de vue de la conception d'un système expert et réalisation de Chomexpert, Master's Thesis, Département d'Informatique et de recherche opérationnelle, Université de Montréal, 1988
Poulin 89
Poulin D. and Bratley P., Notion de points dans l'algèbre des intervalles de J.F. Allen, Working Paper, Equipe Chomexpert, 1989
Rule 1 (sec. 9) Determination of the beginning of benefit period - standard case :IF ....... interruption_earnings occurs_at INTERUPTION_EARN [20] AND ...... initial_claim occurs_at INITIAL_CLAIM AND ...... INTERUPTION_EARN same_week_as INITIAL_CLAIM THEN ..... add( benefit_period holds_on BENEFIT_PER, sunday(INTERUPTION_EARN) starts BENEFIT_PER )
Rule 2 (sec. 9) Determination of the beginning of benefit period with a late initial claim :IF ....... Interruption_earnings occurs_at INTERUPTION_EARN AND ...... initial_claim occurs_at INITIAL_CLAIM AND ...... INTERUPTION_EARN before_week INITIAL_CLAIM THEN ..... add( benefit_period holds_on BENEFIT_PER, sunday(INITIAL_CLAIM) starts BENEFIT_PER )
Rule 3 (art. 7 (1) a)) Determination of the standard 52 weeks period :IF ....... benefit_period holds_on BENEFIT THEN ..... add( standard_52 holds_on STANDARD_52, STANDARD_52 meets BENEFIT, STANDARD_52 has_duration 52 weeks )
Rule 4 (art. 7 (1) a)) Determination of the qualifying period - standard case :IF ....... standard_52 holds_on STANDARD_52 AND (NOT . prec_benefit_period holds_on RECENTLY OR( . prec_benefit_period holds_on PREC_BENEFIT_PERIOD AND NOT PREC_BENEFIT_PERIOD during or finish STANDARD_52 ) ) AND (NOT . extensions holds_on RECENTLY OR( . extensions holds_on POSS_EXTENSIONS AND NOT POSS_EXTENSIONS overlaps or in[21] STANDARD_52 ) ) THEN ..... add( qualifying equal STANDARD_52 )
Rule 5 (art. 7 (1) b)) Determination of the qualifying period, for user with a previous benefit period:IF ....... standard_52 holds_on STANDARD_52 AND ...... prec_benefit_period holds_on PREC_BENEFIT_PERIOD AND ...... PREC_BENEFIT_PERIOD during or finish STANDARD_52 THEN ..... add( qualifying_period holds_on QUALIFYING, PREC_BENEFIT_PERIOD starts QUALIFYING, QUALIFYING finish STANDARD_52 )
Rule 6 (art. 7 (2) ) Calculation of a first extension of the qualifying period :IF ....... standard_52 holds_on STANDARD_52 AND (NOT . prec_benefit_period holds_on RECENTLY OR( . prec_benefit_period holds_on PREC_BENEFIT_PERIOD AND NOT PREC_BENEFIT_PERIOD during or finish STANDARD_52 ) ) AND ...... extensions holds_on POSS_EXTENSIONS AND ...... POSS_EXTENSIONS overlaps or in STANDARD_52, duration_calcul( of(POSS_EXTENSIONS), in(STANDARD_52), week(NBR)) [22] THEN ..... add( extension_1 holds_on EXTENSION_1, EXTENSION_1 meets STANDARD_52, EXTENSION_1 has_duration NBR weeks )
Rule 7 (art. 7 (2) ) Determination of the qualifying period, with one extension :IF ....... standard_52 holds_on STANDARD_52 AND ...... extensions holds_on POSS_EXTENSIONS AND ...... extension_1 holds_on EXTENSION_1 AND NOT .. POSS_EXTENSIONS overlaps or in EXTENSION_1 THEN ..... add( qualifying_period holds_on QUALIFYING, QUALIFYING starts EXTENSION_1, QUALIFYING finish STANDARD_52 )
Rule 8 (art. 7 (3) ) Calculation of a second extension of the qualifying period :IF ....... extension_1 holds_on EXTENSION_1 AND ...... EXTENSION_1 has_duration week(NBR1)) AND ...... extensions holds_on POSS_EXTENSIONS AND ...... POSS_EXTENSIONS overlaps or in EXTENSION_1, duration_calcul( of(POSS_EXTENSIONS), in(EXTENSION_1), week(NBR2)) THEN ..... add( extension_2 holds_on EXTENSION_2, EXTENSION_2 meets STANDARD_52, EXTENSION_2 has_duration (NBR1 + NBR2) weeks )
Rule 9 (art. 7 (3) ) Determination of the qualifying period, with two extensions :IF ....... standard_52 holds_on STANDARD_52 AND ...... extension_2 holds_on EXTENSION_2 AND ...... EXTENSION_2 has_duration week(NBR2)), NBR2 =< 104 THEN ..... add( qualifying_period holds_on QUALIFYING, QUALIFYING finish STANDARD_52, QUALIFYING has_duration NBR2 weeks )
Rule 10 (art. 7 (5) ) Determination of the qualifying period, limit of 104 week :IF ....... standard_52 holds_on STANDARD_52 AND ...... extension_2 holds_on EXTENSION_2 AND ...... EXTENSION_2 has_duration week(NBR2)), NBR2 > 104 THEN ..... add( qualifying_period holds_on QUALIFYING, QUALIFYING finish STANDARD_52, QUALIFYING has_duration 104 weeks )
is considered to mean ((not
a)
and
b) or (c
and
(d
and
e)).Retour.
[13]We can also use a slightly different but equivalent notation : i1
(
before,
start
or
during
)
i2.Retour.
[14]A similar notation was proposed by Ladkin, in Ladkin
87. Our notation differs from Ladkin's in that he associates an interval to that form
whereas we associate an instant to it. For example, [1989,6,12] is the 12th day of June
for Ladkin, the beginning of that day for us.Retour.
[15]Allen in his previous work took no account of the times at which
an interval began or ended. Essentially his intervals merely consist of a name.Retour.
[16]For the sake of simplicity, in this part of the text we use
integers for dates.Retour.
[17] Allen 83.Retour.
[18]More details in Poulin D. and Bratley P., see Poulin
89.Retour.
[19]Revised Statutes of Canada (1985), Ch. U-1.Retour.
[20]In what follows the capitalised terms refer to data supplied by
the user or inferred from user-supplied data. Retour.
[21] 'in' is equivalent to 'start,during of finish'.Retour.
[22] Prolog rule call. The rule is not shown here. Retour.