statutes.h

/* This is the header file for the Statutes module.  It is also included by
   the Shyster module. */

/* structure type */

typedef struct {
   void *dummy;
} statute_law_specification;

/* external functions */

extern statute_law_specification
Initialize_Statutes();

extern void
Statute_Law(
      file log_stream,
      statute_law_specification statute_law,
      case_law_specification case_law,
      boolean adjust,
      boolean echo,
      boolean inputable_latex,
      boolean verbose,
      cardinal hypothetical_reports,
      cardinal hypothetical_changes,
      string distances_filename,
      string weights_filename,
      string report_filename);

statutes.c

/* This is the implementation file for the Statutes module. */

#include <stdio.h>
#include "shyster.h"
#include "cases.h"
#include "statutes.h"

extern statute_law_specification
Initialize_Statutes()

/* Returns a pointer to a dummy structure.  (If implemented, it would
   initialize the rule-based system, by reading a statute law specification,
   and return a pointer to SHYSTER's internal representation of that
   specification.) */

{
   statute_law_specification statute_law;

   statute_law.dummy = NULL;
   return statute_law;
}

extern void
Statute_Law(
      file log_stream,
      statute_law_specification statute_law,
      case_law_specification case_law,
      boolean adjust,
      boolean echo,
      boolean inputable_latex,
      boolean verbose,
      cardinal hypothetical_reports,
      cardinal hypothetical_changes,
      string distances_filename,
      string weights_filename,
      string report_filename)

/* Prompts the user for an identifier, then invokes the case-based system
   seeking advice in the area corresponding to that identifier.  The result
   that the case-based system returns is written to log_stream. */

{
   char area_identifier[Max_Identifier_Length];
   string result_identifier;

   /* prompt the user for a case law area identifier */

   fprintf(stdout, "Case law area identifier: ");
   gets(area_identifier);

   fprintf(log_stream, "Case-based system called with area identifier \"%s\".\n\n",
         area_identifier);

   /* invoke the case-based system */

   result_identifier = Case_Law(log_stream, case_law, area_identifier, adjust, echo,
         inputable_latex, verbose, hypothetical_reports, hypothetical_changes, Top_Level,
         distances_filename, weights_filename, report_filename);

   /* write the result identifier to the log file */

   if (result_identifier != NULL)
      fprintf(log_stream,
            "Case-based system returned result identifier \"%s\".\n\n",
            result_identifier);
}

Other SHYSTER modules: Shyster, Cases, Tokenizer, Parser, Dumper, Checker, Scales, Adjuster, Consultant, Odometer and Reporter.
Copyright noticeValid HTML 4.0
Home page:  <http://www.popple.net/james/>
E-mail:  <james@popple.net>
Last modified:  30 April 1995