| Search internet |
Debugging information is inserted into the body of a page by the unpacker. The body of a page is represented as a sequence of bytes inside the vector of the page, and it is the task of the unpacker to convert it to the format of a parse tree. Doing so includes generation of debugging information.
The unpacker is user definable. When a page is unpacked, Logiweb consults the bed of the page (the first reference of the page) to see if the bed page defines an unpacker. If the bed page defines an unpacker, that unpacker is used. If the bed page defines no unpacker, Logiweb performs default unpacking.
If one compresses or encrypts pages, then it is the task of the unpacker to decompress and/or decrypt the page.
The default unpacker inserts some, particular debugging information into all parse trees it unpacks. We shall refer to this debugging information as the default debugging information. It is suggested that all custom unpackers insert the same kind of debugging information as it will help generating error messages.
The default debugging information
has the following structure:

The value of
is the reference of the page on which the term occurs. The values of the naturals
indicate where the term occurs on the page.
As an example, the debugging information

indicates that the given construct is the first subtree of the second subtree of the fifth subtree of the page with reference
.
When using a list like
for addressing a subtree of a page, one usually has to reverse the list first. If you think the order of the list is silly, think again. The given order permits an immense amount of memory sharing.
The default debugging information is a pair whose first component indicates the location of the term and whose second component is
. Custom unpackers should also generate debugging information which is a pair, and they should ensure that the first component of the pair is exactly like what the default unpacker generates. Otherwise the error message generators of e.g. the check and Peano pages may be unable to locate errors. But the second component of the pair is for free use.
| Search logiweb.eu |