Ada library and tools for the analysis of Complex Networks and more
Radalib is a library we have continuously been updating for our research within the Alephsys research group, led by Alex Arenas, at Universitat Rovira i Virgili (URV), Tarragona, since 2004. Previous experience showed that the continuous reuse of code was a painful task, thus we decided to be more structured and separate general purpose code (e.g. manipulation of networks and partitions) from the specific details of particular applications (e.g. Monte Carlo simulation of epidemic spreading). The result was the development of a general purpose library, mostly devoted to complex networks, and developed around abstract data types. This means the types are defined as "private", with public subprograms operating on them and encapsulating their implementations, thus allowing for future enhancements without having to modify the programs already using them. We could have used object oriented programming, but we believe polymorphism and inheritance are basically useless for this kind of applications.
The selected language was Ada, for several reasons: performance (it is a compiled language, not interpreted), readable code, support for abstract data types, strict data type system (allows catching many errors at compile time), advanced support of generics, high level support for concurrent programming (just in case it is needed), availability of high quality compilers for the main platforms (Windows, Linux, MacOS), and the confidence in your code when using it. The main drawback was the absence of code from other people we could reuse, but that was not a problem since we wanted full control and detailed understanding of every line of code used for our research.
Radalib is structured in three parts: source (the library itself), test and tools. Tools are programs which solve a certain problem, e.g. community detection, partitions comparison, network properties, connected components, file format conversion, etc., and which are basically mere interfaces to functionalities given by the library. The requests to make public implementations of some of the algorithms presented in our scientific papers led to the publication of Radatools, which are just executables for Windows, Linux and MacOS of some of the Radalib tools.
Radalib contains the following folders or directories:
Root of Radalib, containing README.txt, LICENSE.txt, version and howto files
All the packages which form the library, and scripts for their compilation
Test programs for most of the packages in the source folder, each one with a script for its compilation and execution, and some test data files
Programs which take advantage of the source packages, mainly for the analysis of complex networks. There are also scripts for their compilation and execution, and test data files
Object files obtained from the compilation of the source packages. By default, they are for Windows; they need to be rebuilt when working in other platforms
Scripts to simplify the upgrade and installation of Radalib in the different platforms
The size of Radalib at version radalib-20160302-130549 is:
- Code: 249 Ada files
- Files: 654 files
- Source: 60407 lines of Ada code
Radalib has been programmed using the Ada language, and with the aid of the GNAT Ada GPL Edition compilers from Adacore. Follow the indications in your corresponding "howto" file to install GNAT and compile radalib:
You may download and contribute to the development of Radalib at GitHub:
- GitHub repository: sergio-gomez / Radalib
Local copy: radalib-20161013-213022
- Compiled tools: see Radatools