NAME

adalib_html - Automatically creates html links among a library's set of Ada specification files.

SYNOPSIS

adalib_html [-nolink] [-state] [-debug num] [-outdir path] file_list

DESCRIPTION

Adalib_html is a system that takes as input a set of Ada 95 specification files and generates a set of HTML files. It creates an alphabetized package list with each package name linked to its defining specification file. Each specification file is writ ten as a Web page, with links to other related specification files. The following hypertext links are created: derived type to base type; child package to parent package; with'ed or use'ed package to its specification file; and subprogram arguments and return types to their declarations. The generated files are not re-formatted and do not do any boldfacing or highlighting. The tool was designed to link Ada libraries as a single unit.

Adalib_html expects one compilation unit per file, as does gnat. Before linking a library that contains more than one compilation unit per file, it is suggested to run gnatchop to break up the compilation units. Gnatchop is a utility that comes with the gnat compiler and is used to create a file for every compilation unit. Each file uses the same name as the compilation unit that it defines.

This system was developed by Danko Nebesh at The George Washington University, Washington D.C. as part of a doctoral project supervised by Prof. Michael B. Feldman. Adalib_html is distributed as source code. To build it, all that is required is an Ada 95 compiler. To extend the capabilities of adalib_html, a copy of ayacc is needed. adalib_html uses a full Ada 95 parser to create the HTML links, and ayacc is used to automatically build the parser. One advantage of building the tool as a full parser i s that any library that has been linked by adalib_html is guaranteed to be syntactically correct, i.e., adalib_html will not link a library that cannot be successfully compiled.

In order to test adalib_html, we linked several large Ada 95 libraries including: Ada/Java bindings, MAC bindings, Gnat specification files, and The University of Scranton Polymorphic Data Structure Component Suite. We also ran a controlled experiment to determine which of the HTML links are useful for learning how to use a component from a library.

OPTIONS

-debug num
Set the level of debugging information that is printed. Enter a natural number for num in order to specify debugging level. By default the debugging value is set to zero.
0
No debugging information is printed.
> 5
Print out names of major subprograms as they are entered.
> 10
Print out anchors and links, header and footer information, renamed packages
> 15
Print out tokens, detailed anchor/link info,
> 20
Print out name of remaining subprograms as they are entered. These are usually called very often and will result in alot of information being displayed.
> 25
Print out the current character.
-nolink
Create an alphabetized package list with each package name linked to its defining specification file. Each specification file is written as a Web page, but no other links are created. By default each specification file is written as a fully linked Web page.
-outdir path
This option is used to specify the path to the directory in which the linked specification files will be placed. The path MUST be terminated with a slash or backslash depending on the system's path separator. By default, all specification files are wr itten to the current directory.
-state
This option was included to allow the linked Web pages to be used in a controlled experiment. It makes every created link call a CGI script to display the next page. It also passes the following information to the CGI scripts: the previous and next pag e names, selected link number, and link type. It also passes state information to the CGI script, for example, the data file name, and the experiment start time. To use this option, it is neccessary to look at the source code files in_token.adb and scan .adb, and the example CGI scripts. By default, this option is turned off.

EXAMPLES

The following is an example of linking all the files in the current directory and putting the output into directory /tmp/myLibrary.
adalib_html -outdir /tmp/myLibrary/ *.ads
This next example shows files from several directory being linked and placed in the output directory /tmp/myOtherLibrary.
adalib_html -outdir /tmp/myOtherLibrary/ src1/*.ads src2/*.ads ../mylib/*.ads

AVAILABILITY

Version 1.0 of adalib_html is now available. We make no promises about the availability of future releases.

Licensing

Copyright (c) 1996 Bohdan Nebesh, George Washington University

This program is free software; you can redistribute it and/or modify it under terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License distributed with GNAT; see file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

SEE ALSO

Several similiar conversion programs which work with Ada and other programming languages have been developed.

NOTES