THE B++ TOOLS
 
 
INTRODUCTION
 

The B++ Tools are programs written using the B++ Library. You can download them here. They are only provided for the MS-Windows 32 bits operating systems in console mode. They have been built with the Cygwin 1.7.31 Release. To obtain the tools under another operating system, you have to download the B++ Library and compile it. If the documentation presented here is not enough for you, you can see .

These programs are complete freeware, use the +license option upon them for further information. Their source code is also free under certain conditions (as the B++ Library), see .

 
INSTALLATION & CONFIGURATION
 

For each program, you will find a TAR.GZ (TGZ) archive. Use software like WinZip to extract it in c:/. A folder named bpp_tools will be created. If you want to place the folder somewhere else, do it and edit the bpp_tools/bpp_library.ini file and replace c:/bpp_tools by the path you want. Finally, you have to add the following lines in your autoexec.bat file.

set BPP_TOOLS=c:/bpp_tools
set PATH=%PATH%;%BPP_TOOLS%

To use the B++ Tools, you will need to install some DLLs in the folder bpp_tools:


  • These DLLs are required by all the programs. They are the basic part of the B++ Library. There is also a glpk.dll file that contains the GNU Linear Programming Kit 4.54.


  • These DLLs are required by the programs concerning graph problems. They are also part of the B++ Library.


  • These DLLs are required by the programs that need graphical components. They are part of the B++ Library. For the moment, none of the programs proposed here need these DLLs. The link is here for those who do not want to compile by themselves.

 
THE "BUILD GRAPH" PROGRAM
 

This program can be useful for operations research. It generates randomly different kinds of graph: connex graph, non connex graph, tree, serial-parallel graph... The program also generates various kinds of problem in graphs: minimum spanning tree, shortest path, maximum flow, minimum cost flow, minimum cost tension... It is also possible to create a layout for the graphs (i.e. coordinates for the nodes). The syntax of the generated files is clear and easy to understand. Use the +help option for syntax information. Here is an use example.

  • build_graph.exe +connex 100 200 graph.dat
    generates randomly a connex graph with 100 nodes and 200 arcs, and stores it in the file named graph.dat.

Click here to download the program. A is also available to generate graphs or graph problems online.

 
THE "BUILD MAKEFILE" PROGRAM
 

This program generates the main part of a makefile to build a library. The program scans a whole path where the source files are stored. For each *.cpp file met, a rule is written to build the corresponding object (*.o). Moreover, for each folder met (except the root of the hierarchy), a rule is written to build a library (static or dynamic) that regroups all the objects contained in the folder. For more information, see . Use the +help option for syntax information. Here is an use example.

  • build_makefile.exe +add INCLUDE_PATH ../sources
    +add LIBRARY_PATH . +create makefile.txt

    scans the ../sources and . folders and generates the makefile in makefile.txt. The ../sources is replaced by the INCLUDE_PATH alias in the makefile and . by LIBRARY_PATH. That means you have then to define these aliases in order to complete the makefile. This step is described with details in .

Click here to download the program.

 
THE "CUT FILE" PROGRAM
 

This program cuts a file into several files of a given size. It also restores a complete file from files resulting of a cutting. Use the +help option for syntax information. Here are some use examples.

  • cut_file +cut archive.tgz 100
    cuts the archive.tgz file into files named archive.tgz.1, archive.tgz.2... that have a size of 100 kilobytes.

  • cut_file +restore archive.tgz
    merges the files named archive.tgz.1, archive.tgz.2... to rebuild the archive.tgz file.

Click here to download the program.

 
THE "DOS UNIX" PROGRAM
 

This program converts ASCII files from the MS-DOS format into the Unix format and vice versa. Use the +help option for syntax information. Here are some use examples.

  • dos_unix -recursive +add [ '*.hpp' '*.cpp' ] +convert bpp_library
    converts all the files in the bpp_library folder that match the *.hpp or *.cpp formats into the MS-DOS format. The scanning of the folder is recursive.

  • dos_unix -unix +add [ '*.txt' ] +convert .
    converts all the files in the current folder that match the *.txt format into the Unix format. The scanning of the folder is not recursive.

Click here to download the program.

 
THE "GRAPH LAYOUT" PROGRAM
 

This program deals with the layout of a graph (i.e. the coordinates of the nodes). It can convert a graph into the EPS (Encapsulated PostScript) format, which provides a graphical representation of the graph. The program also has a heuristic that attempts to improve the layout of a graph. For the syntax of the input files (the graphs), use the Build Graph program that generates randomly different kinds of graph and look at the generated files. Use the +help option for syntax information. Here are some use examples.

  • graph_layout.exe +eps graph.dat graph.eps
    reads the graph in the file named graph.dat, converts it into the EPS format and stores the result in the file named graph.eps.

  • graph_layout.exe +improve old_graph.dat new_graph.dat
    attempts to improve the layout of the graph in the file named old_graph.dat, and stores the result in the file named new_graph.dat.

Click here to download the program.

 
THE "MAKE DOC" PROGRAM
 

This program generates automatically the documentation of a C++ or Java source file. The section is its result. The program was initially written for the B++ Library, hence to use this program, you have to develop your library the same way the B++ Library has been. Check the section for information. Then, you just have to add keywords and commentaries in your source files and the documentation will be automatically generated. Here are the recognized keywords.

/*ALIAS*/ For the aliases.
/*AMETHOD <class_name> */ For the abstract methods of a class.
/*ATTRIBUTE <class_name> */ For the attributes of a class.
/*CLASS <class_name> */ For the classes of a module.
/*CONSTANT*/ For the constants of a module.
/*DESCRIPTION*/ For the description of a module.
/*DO_NOT_SHOW*/ For not showing the information of a module.
/*ERROR*/ For the errors a module can generate.
/*FUNCTION*/ For the functions of a module.
/*INCLUDE*/ For the files a module interface includes.
/*INTERFACE*/ For the inclusion of the interface file in the implementation file.
/*MACROCOMMAND*/ For the macrocommands of a module.
/*METHOD <class_name> */ For the methods of a class.
/*NAMESPACE*/ For the namespaces of a module.
/*NEED*/ For the files a module implementation includes.
/*TYPE*/ For the types of a module.
/*TYPE <class_name> */ For the inner types of a class.
/*VARIABLE*/ For the variables of a module.

This description of the program is superficial. For more details, see where you will find documentation and source code. There, you will understand how exactly the commentaries and the keywords must be placed in the source code in order to generate a comprehensive documentation. To know how to use the program, just execute it with the +help option, it will give you details on the syntax.

To work correctly, the Make Doc program needs a file named default_template.dat located in the bpp_tools/data/text_format/html folder. It contains the template used to generate the HTML documentation. You can modify it, it is mainly HTML code.

Click here to download the program.

 
THE "REMOVE FILES" PROGRAM
 

This program removes the files corresponding to given formats from a folder. Use the +help option for syntax information. Here are some use examples.

  • remove_files -recursive +add [ '*.bak' '*.tmp' ] +remove bpp_library
    removes all the files in the bpp_library folder that match the *.bak or *.tmp formats. The scanning of the folder is recursive.

  • remove_files +add [ '*.*' ] +remove .
    removes all the files in the current folder that match the *.* format. The scanning of the folder is not recursive.

Click here to download the program.

 
THE "RENUM FILES" PROGRAM
 

This program renames files by numbering them. The files that match a given file format are renamed according to a new file format described by a string and a number of digits for the numbering. Use the +help option for syntax information. Here are some use examples.

  • renum_files +change '*.htm' 'htm_*.txt'
    renames the files in the current folder that match the *.htm format by numbering them and using the htm_*.txt format. If the current folder contains exactly 10 of those files, the result will be the new names htm_000001.txt, htm_000002.txt ... htm_000010.txt.

  • renum_files -start 7 -digits 3 -path c:\ +change '*' '*.dat'
    renames all the files in the c:\ folder with the extension .dat and numbers them starting from 7. The number of digits is set to 3, so the result will be the names 007.dat, 008.dat...

Click here to download the program.

 
THE "SHOW DIR" PROGRAM
 

This program shows the content of a folder. The result can be displayed on the screen as well as stored into a file. Use the +help option for syntax information. Here are some use examples.

  • show_dir.exe -output list.txt *.cpp
    shows the files that match the *.cpp format in the current folder and stores the result in list.txt. The scanning is not recursive.

  • show_dir.exe -recursive -path bpp_library *.*
    shows the files that match the *.* format in the folder bpp_library. The scanning is recursive.

Click here to download the program.

 
THE "SOLVE GRAPH" PROGRAM
 

This program can solve various problems in graphs, such as connectivity problems, the minimum spanning tree problem, shortest path problems, the maximum flow problem, the minimum cost flow problem... For the syntax of the input files (the graphs), use the Build Graph program that generates randomly different kinds of graph and look at the generated files. Use the +help option for syntax information. Here is an use example.

  • solve_graph.exe +mintree1 graph.dat result.dat
    solves the minimum spanning tree problem (using Kruskal's method) for the graph in the file named graph.dat and stores the resulting tree in the file named result.dat.

Click here to download the program.

 
THE "SOLVE TENSION" PROGRAM
 

This program can solve various tension problems in graphs, such as the compatible tension problem and the minimum cost tension problem for convex derivable costs or convex piecewise linear costs. For the syntax of the input files (the graphs), use the Build Graph program that generates randomly different kinds of graph and look at the generated files. Use the +help option for syntax information. Here is an use example.

  • solve_tension.exe +dualcostscale graph.dat result.dat
    solves the minimum cost tension problem (using the dual cost-scaling method) for the graph in the file named graph.dat and stores the solution in the file named result.dat.

Click here to download the program.

 
THE "B++ TENSION SOLVER" PACKAGE
 

The Solve Tension program is also provided as a standalone package, called B++ Tension Solver, that can be used for hypermedia synchronization. It is actually interfaced with the HyperProp Formatter, which is a player for controlling the presentation of hypermedia documents.

Click here to download the package.