10 Typemaps

Disclaimer: This chapter is under construction!

10.1 Introduction

Chances are, you are reading this chapter for one of two reasons; you either want to customize SWIG's behavior or you overheard someone mumbling some incomprehensible drivel about "typemaps" and you asked yourself "typemaps, what are those?" That said, let's start with a short disclaimer that "typemaps" are an advanced customization feature that provide direct access to SWIG's low-level code generator. Not only that, they are an integral part of the SWIG C++ type system (a non-trivial topic of its own). Typemaps are generally not a required part of using SWIG. Therefore, you might want to re-read the earlier chapters if you have found your way to this chapter with only a vaque idea of what SWIG already does by default.

10.1.1 Type conversion

One of the most important problems in wrapper code generation is the conversion of datatypes between programming languages. Specifically, for every C/C++ declaration, SWIG must somehow generate wrapper code that allows values to be passed back and forth between languages. Since every programming language represents data differently, this is not a simple of matter of simply linking code together with the C linker. Instead, SWIG has to know something about how data is represented in each language and how it can be manipulated.

To illustrate, suppose you had a simple C function like this:

int factorial(int n);
To access this function from Python, a pair of Python API functions are used to convert integer values. For example:
long PyInt_AsLong(PyObject *obj);      /* Python --> C */
PyObject *PyInt_FromLong(long x);      /* C --> Python */
The first function is used to convert the input argument from a Python integer object to C long. The second function is used to convert a value from C back into a Python integer object.

Inside the wrapper function, you might see these functions used like this:

PyObject *wrap_factorial(PyObject *self, PyObject *args) {
    int       arg1;
    int       result;
    PyObject *obj1;
    PyObject *resultobj;

    if (!PyArg_ParseTuple("O:factorial", &obj1)) return NULL;
    arg1 = PyInt_AsLong(obj1);
    result = factorial(arg1);
    resultobj = PyInt_FromLong(result);
    return resultobj;
}

Every target language supported by SWIG has functions that work in a similar manner. For example, in Perl, the following functions are used:

IV SvIV(SV *sv);                     /* Perl --> C */
void sv_setiv(SV *sv, IV val);       /* C --> Perl */
In Tcl:
int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *obj, long *value);
Tcl_Obj *Tcl_NewIntObj(long value);
The precise details are not so important. What is important is that all of the underlying type conversion is handled by collections of utility functions and short bits of C code like this---you simply have to read the extension documentation for your favorite language to know how it works (an exercise left to the reader).

10.1.2 Typemaps

Since type handling is so central to wrapper code generation, SWIG allows it to be completely defined (or redefined) by the user. To do this, a special %typemap directive is used. For example:
/* Convert from Python --> C */
%typemap(in) int {
    $1 = PyInt_AsLong($input);
}

/* Convert from C --> Python */
%typemap(out) int {
    $result = PyInt_FromLong($1);
}
At first glance, this code will look a little confusing. However, there is really not much to it. The first typemap (the "in" typemap) is used to convert a value from the target language to C. The second typemap (the "out" typemap) is used to convert in the other direction. The content of each typemap is a small fragment of C code that is inserted directly into the SWIG generated wrapper functions. Within this code, a number of special variables prefixed with a $ are expanded. These are really just placeholders for C variables that are generated in the course of creating the wrapper function. In this case, $input refers to an input object that needs to be converted to C and $result refers to an object that is going to be returned by a wrapper function. $1 refers to a C variable that has the same type as specified in the typemap declaration (an int in this example).

A short example might make this a little more clear. If you were wrapping a function like this:

int gcd(int x, int y);
A wrapper function would look approximately like this:
PyObject *wrap_gcd(PyObject *self, PyObject *args) {
   int arg1;
   int arg2;
   int result;
   PyObject *obj1;
   PyObject *obj2;
   PyObject *resultobj;

   if (!PyArg_ParseTuple("OO:gcd", &obj1, &obj2)) return NULL;

   /* "in" typemap, argument 1 */   
   {
      arg1 = PyInt_AsLong(obj1);
   }

   /* "in" typemap, argument 2 */   
   {
      arg2 = PyInt_AsLong(obj2);
   }

   result = gcd(arg1,arg2);

   /* "out" typemap, return value */
   {
      resultobj = PyInt_FromLong(result);
   }

   return resultobj;
}
In this code, you can see how the typemap code has been inserted into the function. You can also see how the special $ variables have been expanded to match certain variable names inside the wrapper function. This is really the whole idea behind typemaps--they simply let you insert arbitrary code into different parts of the generated wrapper functions. Because arbitrary code can be inserted, it possible to completely change the way in which values are converted.

10.1.3 Pattern matching

As the name implies, the purpose of a typemap is to "map" C datatypes to types in the target language. Once a typemap is defined for a C datatype, it is applied to all future occurrences of that type in the input file. For example:
/* Convert from Perl --> C */
%typemap(in) int {
   $1 = SvIV($input);
}

...
int factorial(int n);
int gcd(int x, int y);
int count(char *s, char *t, int max);
The matching of typemaps to C datatypes is more than a simple textual match. In fact, typemaps are fully built into the underlying type system. Therefore, typemaps are unaffected by typedef, namespaces, and other declarations that might hide the underlying type. For example, you could have code like this:
/* Convert from Ruby--> C */
%typemap(in) int {
   $1 = NUM2INT($input);
}
...
typedef int Integer;
namespace foo {
    typedef Integer Number;
};

int foo(int x);
int bar(Integer y);
int spam(foo::Number a, foo::Number b);
In this case, the typemap is still applied to the proper arguments even though typenames don't always match the text "int". This ability to track types is a critical part of SWIG--in fact, all of the target language modules work merely define a set of typemaps for the basic types. Yet, it is never necessary to write new typemaps for typenames introduced by typedef.

In addition to tracking typenames, typemaps may also be specialized to match against a specific argument name. For example, you could write a typemap like this:

%typemap(in) double nonnegative {
   $1 = PyFloat_AsDouble($input);
   if ($1 < 0) {
        PyErr_SetString(PyExc_ValueError,"argument must be nonnegative.");
        return NULL;
   }
}

...
double sin(double x);
double cos(double x);
double sqrt(double nonnegative);

typedef double Real;
double log(Real nonnegative);
...
For certain tasks such as input argument conversion, typemaps can be defined for sequences of consecutive arguments. For example:
%typemap(in) (char *str, int len) {
    $1 = PyString_AsString($input);   /* char *str */
    $2 = PyString_Size($input);       /* int len   */
}
...
int count(char *str, int len, char c);
In this case, a single input object is expanded into a pair of C arguments. This example also provides a hint to the unusual variable naming scheme involving $1, $2, and so forth.

10.1.4 Reusing typemaps

Typemaps are normally defined for specific type and argument name patterns. However, typemaps can also be copied and reused. One way to do this is to use assignment like this:
%typemap(in) Integer = int;   
%typemap(in) (char *buffer, int size) = (char *str, int len);
A more general form of copying is found in the %apply directive like this:
%typemap(in) int {
   /* Convert an integer argument */
   ...
}
%typemap(out) int {
   /* Return an integer value */
   ...
}

/* Apply all of the integer typemaps to size_t */
%apply int { size_t };    
%apply merely takes all of the typemaps that are defined for one type and applies them to other types. Note: you can include a comma separated set of types in the { ... } part of %apply.

It should be noted that it is not necessary to copy typemaps for types that are related by typedef. For example, if you have this,

typedef int size_t;
then SWIG already knows that the int typemaps apply. You don't have to do anything.

10.1.5 What can be done with typemaps?

The primary use of typemaps is for defining wrapper generation behavior at the level of individual C/C++ datatypes. There are currently six general categories of problems that typemaps address:

Argument handling

int foo(int x, double y, char *s);

Return value handling

int foo(int x, double y, char *s);

Exception handling

int foo(int x, double y, char *s) throw(MemoryError, IndexError);

Global variables

int foo;

Member variables

struct Foo {
    int x[20];
};

Constant creation

#define FOO 3
%constant int BAR = 42;
enum { ALE, LAGER, STOUT };
Details of each of these typemaps will be covered shortly. Also, certain language modules may define additional typemaps that expand upon this list. For example, the Java module defines a variety of typemaps for controlling additional aspects of the Java bindings. Consult language specific documentation for further details.

10.1.6 What can't be done with typemaps?

Typemaps can't be used to define properties that apply to C/C++ declarations as a whole. For example, suppose you had a declaration like this,
Foo *make_Foo();
and you wanted to tell SWIG that make_Foo() returned a newly allocated object (for the purposes of providing better memory management). Clearly, this property of make_Foo() is not a property that would be associated with the datatype Foo * by itself. Therefore, a completely different SWIG customization mechanism (%feature) is used for this purpose. Consult the Customization Features chapter for more information about that.

Typemaps also can't be used to rearrange or transform the order of arguments. For example, if you had a function like this:

void foo(int, char *);
you can't use typemaps to interchange the arguments, allowing you to call the function like this:
foo("hello",3)          # Reversed arguments
If you want to change the calling conventions of a function, write a helper function instead. For example:
%rename(foo) wrap_foo;
%inline %{
void wrap_foo(char *s, int x) {
   foo(x,s);
}
%}

10.1.7 The rest of this chapter

The rest of this chapter provides detailed information for people who want to write new typemaps. This information is of particular importance to anyone who intends to write a new SWIG target language module. Power users can also use this information to write application specific type conversion rules.

Since typemaps are strongly tied to the underlying C++ type system, subsequent sections assume that you are reasonably familiar with the basic details of values, pointers, references, arrays, type qualifiers (e.g., const), structures, namespaces, templates, and memory management in C/C++. If not, you would be well-advised to consult a copy of "The C Programming Language" by Kernighan and Ritchie or "The C++ Programming Language" by Stroustrup before going any further.

10.2 Typemap specifications

This section describes the behavior of the %typemap directive itself.

10.2.1 Defining a typemap

New typemaps are defined using the %typemap declaration. The general form of this declaration is as follows (parts enclosed in [ ... ] are optional):
%typemap(method [, modifiers]) typelist code ;
method is a simply a name that specifies what kind of typemap is being defined. It is usually a name like "in", "out", or "argout". The purpose of these methods is described later.

modifiers is an optional comma separated list of name="value" values. These are sometimes to attach extra information to a typemap and is often target-language dependent.

typelist is a list of the C++ type patterns that the typemap will match. The general form of this list is as follows:

typelist    :  typepattern [, typepattern, typepattern, ... ] ;

typepattern :  type [ (parms) ]
            |  type name [ (parms) ]
            |  ( typelist ) [ (parms) ]

Each type pattern is either a simple type, a simple type and argument name, or a list of types in the case of multi-argument typemaps. In addition, each type pattern can be parameterized with a list of temporary variables (parms). The purpose of these variables will be explained shortly.

code specifies the C code used in the typemap. It can take any one of the following forms:

code       : { ... }
           | " ... "
           | %{ ... %}
Here are some examples of valid typemap specifications:
/* Simple typemap declarations */
%typemap(in) int {
   $1 = PyInt_AsLong($input);
}
%typemap(in) int "$1 = PyInt_AsLong($input);";
%typemap(in) int %{ 
   $1 = PyInt_AsLong($input);
%}

/* Typemap with extra argument name */
%typemap(in) int nonnegative {
   ...
}

/* Multiple types in one typemap */
%typemap(in) int, short, long { 
   $1 = SvIV($input);
}

/* Typemap with modifiers */
%typemap(in,doc="integer") int "$1 = gh_scm2int($input);";

/* Typemap applied to patterns of multiple arguments */
%typemap(in) (char *str, int len),
             (char *buffer, int size)
{
   $1 = PyString_AsString($input);
   $2 = PyString_Size($input);
}

/* Typemap with extra pattern parameters */
%typemap(in, numinputs=0) int *output (int temp),
                          long *output (long temp)
{
   $1 = &temp;
}
Admittedly, it's not the most readable syntax at first glance. However, the purpose of the individual pieces will become clear.

10.2.2 Typemap scope

Once defined, a typemap remains in effect for all of the declarations that follow. A typemap may be redefined for different sections of an input file. For example:
// typemap1
%typemap(in) int {
...
}

int fact(int);                    // typemap1
int gcd(int x, int y);            // typemap1

// typemap2
%typemap(in) int {
...
}

int isprime(int);                 // typemap2
One exception to the typemap scoping rules pertains to the %extend declaration. %extend is used to attach new declarations to a class or structure definition. Because of this, all of the declarations in an %extend block are subject to the typemap rules that are in effect at the point where the class itself is defined. For example:
class Foo {
   ...
};

%typemap(in) int {
 ...
}

%extend Foo {
   int blah(int x);    // typemap has no effect.  Declaration is attached to Foo which 
                       // appears before the %typemap declaration.
};

10.2.3 Copying a typemap

A typemap is copied by using assignment. For example:
%typemap(in) Integer = int;
or this:
%typemap(in) Integer, Number, int32_t = int;
Types are often managed by a collection of different typemaps. For example:
%typemap(in)     int { ... }
%typemap(out)    int { ... }
%typemap(varin)  int { ... }
%typemap(varout) int { ... }
To copy all of these typemaps to a new type, use %apply. For example:
%apply int { Integer };            // Copy all int typemaps to Integer
%apply int { Integer, Number };    // Copy all int typemaps to both Integer and Number
The patterns for %apply follow the same rules as for %typemap. For example:
%apply int *output { Integer *output };                    // Typemap with name
%apply (char *buf, int len) { (char *buffer, int size) };  // Multiple arguments

10.2.4 Deleting a typemap

A typemap can be deleted by simply defining no code. For example:
%typemap(in) int;               // Clears typemap for int
%typemap(in) int, long, short;  // Clears typemap for int, long, short
%typemap(in) int *output;       
The %clear directive clears all typemaps for a given type. For example:
%clear int;                     // Removes all types for int
%clear int *output, long *output;
Note: Since SWIG's default behavior is defined by typemaps, clearing a fundamental type like int will make that type unusable unless you also define a new set of typemaps immediately after the clear operation.

10.2.5 Placement of typemaps

Typemap declarations can be declared in the global scope, within a C++ namespace, and within a C++ class. For example:
%typemap(in) int {
   ...
}

namespace std {
    class string;
    %typemap(in) string {
        ...
    }
}

class Bar {
public:
    typedef const int & const_reference;
    %typemap(out) const_reference {
         ...
    }
};
When a typemap appears inside a namespace or class, it stays in effect until the end of the SWIG input (just like before). However, the typemap takes the local scope into account. Therefore, this code
namespace std {
    class string;
    %typemap(in) string {
       ...
    }
}
is really defining a typemap for the type std::string. You could have code like this:
namespace std {
    class string;
    %typemap(in) string {          /* std::string */
       ...
    }
}

namespace Foo {
    class string;
    %typemap(in) string {          /* Foo::string */
       ...
    }
}
In this case, there are two completely distinct typemaps that apply to two completely different types (std::string and Foo::string).

It should be noted that for scoping to work, SWIG has to know that string is a typename defined within a particular namespace. In this example, this is done using the class declaration class string.

10.3 Pattern matching rules

The section describes the pattern matching rules by which C datatypes are associated with typemaps.

10.3.1 Basic matching rules

Typemaps are matched using both a type and a name (typically the name of a argument). For a given TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME pair, the following rules are TYPE NAME p