[Previous] [No next] [Title]

3. Document generation and case-based inferencing


3.1. Document generation

This exercise takes you through constructing simple automated legal document generators using wysh, and integrating them with rule-bases and hypertext. You will need to refer to Chapter 6 Document Assembly Using Wysh of the Wysh Developers Manual. For the more technically literate, see Andrew Mowbray's YSH Reference Manual . All aspects of ysh's automated document generation work with wysh, subject to the comments below.

3.1.1. DOCUMENT rules

Read Chapter 6 of the Manual carefully in order to understand the special rules relating to document generation, particularly 6.2 -6.8

Pay particular attention to:

3.1.2. Using RULES with DOCUMENTS

See a simple example concerning capacity to make a will in the simple will generator example below.

3.1.3. Hypertext links from documents

Hypertext links may be created from documents and DOCUMENT rules.

3.1.4. Example - a simple will generator

See http://www2.austlii.edu.au/~graham/wysh/wysh_will.html for the simple will generator reproduced below.
DATE the date of execution of the Will
DATE the date of the old Will
INTEGER the maximum number of months within which the wedding must take place
PERSON the person making the Will
PERSONTHING the sole beneficiary
PERSON the sole executor
PERSON the testator/testatrix's fiancee
PERSON the joint beneficiaries

GOAL DOCUMENT Last Will & Testament PROVIDES
IF the person making the Will is legally capable of making a Will THEN BEGIN
        CALL Disclaimer
        CALL Preamble
        CALL Revocation
        CALL Contemplation of Marriage
        CALL Sole Beneficiary
        CALL Attestation END
ELSE the person making the Will should not make a Will

RULE Capability PROVIDES 
the person making the Will is not legally capable of making a Will ONLY IF the person making the Will is not of sound mind 
OR s6 of the Wills, Probate and Administration Act 1898 applies OR the person making the Will is subject to some other form of incapacity 

DOCUMENT Disclaimer PROVIDES
PARAGRAPH Disclaimer: This is not a real Will and must not be used as such. 
This will does not purport to accurately represent the law of any jurisdictions.

DOCUMENT Preamble PROVIDES
PARAGRAPH This will dated <the date of execution of the Will> is
made by me <the person making the Will>, of
<the testator/testatrix's address>, <the testator/testatrix's occupation>.

DOCUMENT Revocation PROVIDES
IF all former testatmentary disposition are to be revoked THEN
        NUMBERED PARAGRAPH I revoke all former testatmentary dispositions.
ELSE
        NUMBERED PARAGRAPH I revoke all former testamentary dispositions
        except clause(s) <list of clauses from the old will which are to be
        saved> of my testamentary disposition dated <the date of the old Will>
        which clause(s) I hereby confirm.

DOCUMENT Contemplation of Marriage PROVIDES
IF this Will is to be made in contemplation of marriage THEN
        IF the Will is to be conditional on the marriage actually
        taking place THEN
                IF the person making the Will is domiciled in Western Australia AND
                the person making the Will does not own immovables in other States
                THEN
                        NUMBERED PARAGRAPH This will is made in
                        contemplation of my marriage with
                        <the testator/testatrix's fiancee>.
                ELSE
                        NUMBERED PARAGRAPH This will is made in
                        contemplation of my marriage with
                        <the testator/testatrix's fiancee>
                        and is conditional on the marriage taking place
                        within <the maximum number of months within which the wedding must take place> months.
        ELSE IF the testator/testatrix is domiciled in Western Australia THEN
                NUMBERED PARAGRAPH This will is made in contemplation of my
                marriage with <the testator/testatrix's fiancee>
                but shall not be void if the marriage does not take place.
        ELSE
                NUMBERED PARAGRAPH This will is made in contemplation of my
                marriage with <the testator/testatrix's fiancee>
                but is not conditional on the marriage taking place.

DOCUMENT Sole Beneficiary PROVIDES
IF everything disposed of under the Will is to be left one person THEN BEGIN
              IF the sole beneficiary is over 18 THEN
              NUMBERED PARAGRAPH I give the whole of my estate to <the sole beneficiary>  
whom  I appoint my sole executor. ELSE BEGIN
              NUMBERED PARAGRAPH I give the whole of my estate to <the sole beneficiary> 
              NUMBERED PARAGRAPH I appoint the <the sole executor> as my sole executor. END
END ELSE BEGIN NUMBERED PARAGRAPH I give the whole of my estate in equal shares to <the joint beneficiaries> 
     NUMBERED PARAGRAPH I appoint the <the sole executor> as my sole executor. END

DOCUMENT Attestation PROVIDES
PARAGRAPH Signed by the testator in our presence and attested by us in the presence 
him and each other.

3.2. Case-based inferencing using PANNDA

This exercise takes you through creating case-based inferencing applications using Alan Tyree's PANNDA approach, and , and integrating them with rule-bases and hypertext. It is only included here to illustrate methods of integrating rule-based and case-based representations representations. Links may be made from EXAMPLE rules to hypertext resources, as with other types of rules.

You will need to refer to Chapter 7 7. Example or case-based inferencing usingWysh of the Wysh Developers Manual. For the more technically literate, see Andrew Mowbray's YSH Reference Manual . All aspects of ysh's example-based reasoning work with wysh.

3.2.1. Example

The example in the materials on the Finder's Cases (with an extra rule concering trespassers) is accessible from the [wysh] index, and is at http://sandpit.austlii.edu.au/~aial/wysh_finder.html

The first two EXAMPLE rules in FINDER (The Finder's Cases) knowledgebaseare:

PERSON the finder
PERSON the non-finder

GOAL RULE the finder wins PROVIDES
DETERMINE the finder wins

RULE trespasser rule PROVIDES
IF the finder is a trespasser THEN the finder does not win

EXAMPLE Armory PROVIDES
    the finder wins ONLY IF
        the finder was not the occupier of the premises AND
        the chattel was not attached AND
        the non-finder was not the owner of the real estate AND
        the non-finder was not the owner of the chattel AND
        there was a bailment of the chattel AND
        there was not a term in a lease which mentioned  found items AND
        there was not a master-servant relationship between the parties AND
        the chattel was not hidden AND
        there was not an attempt to find the true owner of the chattel AND
        there was prior knowledge of the existence of the chattel

EXAMPLE Bridges PROVIDES
    the finder wins ONLY IF
        the finder was not the occupier of the premises AND
        the chattel was not attached AND
        the non-finder was the owner of the real estate AND
        the non-finder was not the owner of the chattel AND
        there was a bailment of the chattel AND
        there was not a term in a lease which mentioned  found items AND
        there was not a master-servant relationship between the parties AND
        the chattel was not hidden AND
        there was an attempt to find the true owner of the chattel AND
        there was not prior knowledge of the existence of the chattel



[Previous] [No next] [Title]