Fixed_Length_Bit_String
Advisor(s): Wayne Heym
Participants: A. Karl Kornel
Start Date: Spring Quarter 2002
Project Status: Complete (Additions possible)
Index:
Abstract:
One of the components in RESOLVE is the Integer. Unlike the int in
C, the Integer does not have any bitwise
operations. In fact, access to simple bits is
not available through RESOLVE. This component
allows users to create and manipulate a string
of bits (including conversion to/from Integer).
Calendar:
30 April 2002: A presentation to Europa proposed adding bitwise
operations to the Integer component. Due to
the strong opposition of several members, this
project was begun as a replacement for integer
bitwise operations.
- Spring Quarter 2002:
- Development on all of the abstract components of
Fixed_Length_Bit_String. Abstract
components for individual-bit get/set;
conversion to/from Integer; string-wide
and, or, not, and exclusive or
operations; and bit shifting left/right
are completed.
- Concrete kernel and enhanced operations mostly completed.
Kernel component implements only the
get/set operations. Enhanced
component implements all operations.
- Documentation completed. Fixed_Length_Bit_String component
documentation was designed in the
style used in "Software Component
Engineering" Appendix B.
- Addition of the Length operation, allowing users to know the
length of a
Fixed_Length_Bit_String after
instantiation. Operation will be
available in both the Kernel and
Enhanced implementations.
Operation has already been documented.
- Winter Quarter 2003
- With most of the work apparently done, a presentation on the current status and contents of Fixed_Length_Bit_String was given.
- Due to various points that were raised during the presentation, changes have been made to several abstract components. The changes have been propagated to the documentation.
- The updated documentation is being finalized, with various layout issues being resolved.
- Spring Quarter 2003:
- A. Karl Kornel
is using this component as part of his work in
CIS 560. Any bugs found during this use will
be immediately integrated into the
current version.
- Two extensions have been developed to allow two-way conversion
between an Integer and a substring of an
already-existing Fixed_Length_Bit_String object.
- As of Winter Quarter 2005, this project is marked as completed. Revisions, corrections, and
new components may be added at any time.
Project Development:
- One of the questions that came up in the project was how to
internally store a string of bits. One
option was to use an
Array/Static_Array/Sequence of Integers.
That would allow the use of an accessor
instead of get/set operations. However,
several problems came up. Using an entire
integer to store a single bit would be a
large waste of space. In addition, since
the accessor returns a reference to an
Integer, it would be possible to use the
accessor to set values other than one and
zero. Because of these problems, separate
get and set operations are used to replace
the accessor.
- Original plans specified an implementation of
Fixed_Length_Bit_String that would have
a required String_Length of 32 bits.
That would allow the implementation to
use a C int to store the bits, and would
allow bitwise operations to be used,
making the operations as fast as
possible.
- Currently, the implementations of Fixed_Length_Bit_String use an
Array/Static_Array of C unsigned
ints. The array bounds are based on
the requested string length. This
eliminated the need for a special
implementation, allowing for minimum
operating time while allowing for any
string length.
- Documentation for the component is in the same format as the
component documentation in Appendix B of
"Software Component Engineering". This
required learning some of the finer points
of Microsoft Office X to duplicate the
style of the documentation, determined by
analyzing some source files used to
produce Appendix B. The CCD graphics were
produced using sample files made in
Canvas. Sample file for Office and Canvas
were provided by Bruce Weide.
Findings and Contributions:
Current findings are now available in several forms. Additional
information can be found in the Links and References section below.
- Code for the Fixed_Length_Bit_String component
- PDF Documentation, in the format used by Software Component
Engineering, Appendix B.
- If you view PDF files in your web browser, click here to view the PDF in a new window.
Links and References:
- The current version of the documentation is available on the Sun systems at ~kornel/europa/fixed_length_bit_string. Documentation is provided in PDF and PostScript format.
- Test programs are also available on the Sun systems at ~kornel/europa/resolve_plus/Test/Fixed_Length_Bit_String. The test programs allow for testing of both implementations of Fixed_Length_Bit_String. A test program is also available to test the available extensions.
- The presentation that I gave on 23 January 2003 is available for viewing online, or in PDF form showing notes and slides or slides only.
Return to Europa
A. Karl Kornel <kornel@cis.ohio-state.edu>
Last modified: Mon Apr 7 23:29:56 EDT 2003