@need 3200

@node Data Sheet for the Hackerlab Unicode Database
@appendix Data Sheet for the Hackerlab Unicode Database
@example
@group

@end group
@group
Package:
        Hackerlab Unicode Database (the Unicode Character Database in C)
@end group
@group

@end group
@group
Supplier:
        regexps.com
@end group
@group

@end group
@group
Function:        
@end group
@group

@end group
@group
        The Hackerlab Unicode Database provides a C interface
        to data taken from the Unicode Character Database
        published by the Unicode Consortium.
@end group
@group
        

@end group
@group
Key Features:
@end group
@group
                
@end group
@group
        Space and time efficient.
@end group
@group

@end group
@group
        Accurate (based on comparisons to the Unicode 3.0 databases).
@end group
@group

@end group
@group
        Clean and simple "classic C" interface.
@end group
@group

@end group
@group
        Provides:
                assigned test -- is a code point assigned?
                general category
                decimal digit value
                bidirectional category
@end group
@group
                bidirectional mirroring property
@end group
@group
                canonical combining class
                default case mappings
                character decomposition mappings
                Unicode blocks
                general category bitsets
@end group
@group

@end group
@group
        Easy to upgrade: most data is automatically extracted from
        the standard file ``unidata.txt'' published by the 
        Unicode Consortium.
@end group
@group

@end group
@group
        Ready for Unicode 3.1: Database data structures are designed
        for a character set with 2^21 code points.
@end group
@group

@end group
@group
        Validation tests are included.
@end group
@group

@end group
@group
        Postscript and HTML documentation is included.
@end group
@group

@end group
@group
        Variable depth trie structures for the database, selectable
        at compile time.  (A space/time trade-off.)
@end group
@group


@end group
@group
Licensing:
@end group
@group

@end group
@group
        The Hackerlab Unicode Database is part of the Hackerlab C
        Library, which is distributed under the terms of the GNU
        General Public License, Version 2, as published by the Free
        Software Foundation.
@end group
@group
        
@end group
@group
        Alternative licenses (such as licenses permitting binary-only
        re-distribution) can be purchased from regexps.com.
@end group
@group


@end group
@group
Prerequisites:
@end group
@group

@end group
@group
        standard C compiler
        Posix libc.a (standard C library)
        GNU Make
@end group
@group


@end group
@group
Recommended and Disrecommended Applications:
@end group
@group

@end group
@group
        Recommended for all applications needing access to Unicode
        Character Database properties.
@end group
@group
        

@end group
@group
Limitations:
@end group
@group
        
@end group
@group
        This is the first public release.  The database has been 
        carefully tested but is not in widespread use.  
@end group
@group

@end group
@group
        Some important features, which are likely to be added in
        future releases, are not present in this release.  These
        include:
@end group
@group

@end group
@group
                locale-sensitive case mappings
                pre-computed normalization forms
@end group
@group


@end group
@group
Contribution to Executable Size:
@end group
@group

@end group
@group
        On a Pentium based machine, running gcc (egcs version
        2.91.66) we compiled this simple (nonsense) program and 
        linked it against the Hackerlab C Library:
@end group
@group
        

@end group
@group
            #include <hackerlab/unicode/unicode.h>
@end group
@group


@end group
@group
            int
            main (int argc, char * argv[])
            @{
              t_unicode c;
              int value;
@end group
@group
            
@end group
@group
              c = argv[0][0];
@end group
@group
            
@end group
@group
              value = unidata_is_assigned_code_point (c);
              value += (int)unidata_general_category (c);
              value += (int)unidata_decimal_digit_value (c);
              value += (int)unidata_bidi_category (c);
              value += (int)unidata_is_mirrored (c);
@end group
@group
              value += (int)unidata_canonical_combining_class (c);
              value += (int)unidata_to_upper (c);
              value += (int)unidata_to_lower (c);
              value += (int)unidata_to_title (c);
              value += 
@end group
@group
                (int)unidata_character_decomposition_mapping (c)->type;
@end group
@group
              value += (int)uni_blocks[0].start;
              value += 
                bits_population 
                  (uni_general_category_bitset 
                    (uni_general_category_Sm));
@end group
@group
            
@end group
@group
              return value;
            @}
@end group
@group

@end group
@group
        Both the library and the program were compiled with the "-g"
        option.
@end group
@group
        
@end group
@group
        The program forces linkage with all of the Hackerlab Unicode 
        Database.
@end group
@group
        
@end group
@group
        Total executable size:
@end group
@group

@end group
@group
           text    data
          43120  221064
@end group
@group

@end group
@group
        The following list of object files from the Hackerlab
        C library were linked into the executable:
@end group
@group
        
@end group
@group
            alloc-limits.o bits.o bitset-lookup.o bitset-tree.o
            bitset.o bitsets.o blocks.o case-db-inlines.o case-db.o
            char-class.o combine-db.o cvt.o db-inlines.o db.o
            decomp-db.o mem.o must-malloc.o panic-exit.o panic.o str.o
@end group
@group

@end group
@group
        The contribution of those files to the executable size is:
@end group
@group

@end group
@group
           text    data
          41541  218056
@end group
@group
            
@end group
@group
        Those sizes represent maximums: they are for a program
        that access all of the information in the database,
        and that uses both the general category mapping and
        precomputed bitsets for each general category.
@end group
@group

@end group
@group
        A realistic scenario is a program which does not
        use the bidi properties, the decomposition mapping,
        or the category bitsets.  To measure size in that
        scenario, we compiled this test program:
@end group
@group


@end group
@group
            #include <hackerlab/unicode/unicode.h>
@end group
@group


@end group
@group
            int
            main (int argc, char * argv[])
            @{
              t_unicode c;
              int value;
@end group
@group
            
@end group
@group
              c = argv[0][0];
@end group
@group
            
@end group
@group
              value = unidata_is_assigned_code_point (c);
              value += (int)unidata_general_category (c);
              value += (int)unidata_decimal_digit_value (c);
              value += (int)unidata_canonical_combining_class (c);
              value += (int)unidata_to_upper (c);
              value += (int)unidata_to_lower (c);
              value += (int)unidata_to_title (c);
              value += (int)uni_blocks[0].start;
@end group
@group
            
@end group
@group
              return value;
            @}
@end group
@group
            
@end group
@group
        and obtained the total executable size:
@end group
@group

@end group
@group
           text    data
          13864  104980
@end group
@group


@end group
@group
        Sizes may differ slightly from the latest release
        of Rx.  Sizes will obviously vary with platform
        compiler, and compiler options.
@end group
@group


@end group
@group
External Linkage Dependencies:
@end group
@group

@end group
@group
        When compiled under FreeBSD 3.0, the simple program used to
        test executable sizes depends on the following symbols
        defined in "libc":
@end group
@group


@end group
@group
                write
                malloc
                realloc
                free
                _exit
@end group
@group


@end group
@group
Accuracy:
@end group
@group

@end group
@group
        We test the accuracy of the Hackerlab Unicode database by
        using it to print a text file containing a subset of the
        fields present in "unidata.txt".  We then extract those fields
        from "unidata.txt" itself using a sed script and compare the
        resulting files.
@end group
@group

@end group
@group
        There are no known bugs in the Hackerlab Unicode database.
@end group
@group


@end group
@group
Execution Speed:
@end group
@group
        
@end group
@group
        All of the functions that access the Hackerlab Unicode
        Database are very fast.
@end group
@group

@end group
@group
        To give a quantitative sense of what "very fast" means, we have
        measured the size of some functions in instructions, as
        compiled by gcc (egcs version 2.91.66) for a Pentium
        architecture machine with the compiler option `-g'.  None of
        the functions contain loops.
@end group
@group

@end group
@group
                function                     instruction
                                               count
            -----------------------------------------------
            unidata_is_assigned_code_point      28
            unidata_general_category            29
@end group
@group
            unidata_decimal_digit_value         41
@end group
@group
            unidata_bidi_category               31
            unidata_is_mirrored                 31
            unidata_to_upper                    56
            unidata_to_lower                    56
            unidata_to_title                    56
@end group
@group

@end group
@group
        Most of those functions performs two array look-ups and a
        number of bit-manipulation operations.  The three
        case-conversion functions perform five array look-ups
        and a number of bit-manipulation operations.
@end group
@group
        
@end group
@group
        `unidata_decimal_digit_value' performs a conditional test.
@end group
@group
        
@end group
@group
        Instruction counts include function prologues and epilogues.
        For programs compiled with GCC, those functions are also 
        available as inlinable functions.
@end group
@group
        
@end group
@group
        `unidata_character_decomposition_mapping' is a macro which
        performs five array look-ups and a number of bit-manipulation
        operations.
@end group
@group

@end group
@group
        These instruction counts may, obviously, vary with choice of
        compiler, compiler options, and platform.  Cited
        implementation details may change in future releases.
@end group
@group


@end group
@group
Run-time Allocation Requirements:
@end group
@group

@end group
@group
        The Hackerlab Unicode database does not perform a significant
        amount of memory allocation at run-time.
@end group
@group


@end group
@group
Support:
@end group
@group


@end group
@group
        To purchase an alternative license, request additional
        features, or for any kind of support assistance, you can
        contact us at "hackerlab@@regexps.com" or via our web site
        "www.regexps.com".  We can also be reached at (412) 401-5204.
        We are currently in the midst of relocating from Pennsylvania
        to California, so at this time, we have no reliable postal
        address.
@end group
@group

@end group
@group
        Available support includes (but is not limited to):
@end group
@group

@end group
@group
                - porting assistance
                - customized extensions
                - consultation concerning regexp-intensive applications
                - bug fixing
@end group
@group

@end group
@group
        In most cases, support is offered as a commercial
        service.
@end group
@group

@end group
@end example



