Deepend 3.2 Storage Pools

There’s a whole slew of updates and fixes in the latest release of Brad Moore’s Deepend storage pools package:

  • Ada 95 versions of the packages added.
  • Added Bounded forms for all the storage pool types.
  • Added exception handling, and allowed scoped subpools to not be allocated from the heap.
  • Storage_Size call fixed to match description in the Ada Standard. It is supposed to return the size of all storage allocated, including free storage and used storage. Previously, Deepend was reporting the amount of used storage. Instead, a new call, Storage_Used exists, which now reports the amount of used storage.
  • Scoped subpools are no longer created by the Create_Subpool call. Instead they are just declared with appropriate discriminants.
  • Fix bug with deallocation subpools, which needed to call the base class, but then ensure not calling back into the protected object, which caused hanging.
  • Added accessibility check suppressions for Ada 2012 test code.
  • Split source into three folders for Ada 95, Ada 2005, and Ada 2012.
  • Removed assertions that the size of the allocation had to be <= the size of the block size. This restriction was unnecessary, as the code will allocate a larger block if necessary to accommodate the request.
  • Added portability restrictions to Ada 2012 version of the code.
  • Removed non-portable use of System.Task_Info package.
  • Moved pragma Precondition and Postcondition for Ada 2005 version to body as portable assertions.
  • Removed compile time warnings that were incorrect or no longer needed.

Wheeev, Brad’s been very busy!

If you’re looking for a storage pool package with subpool capabilities, why not go and download Deepend and give it a whirl?

You can read the full release announcement here.

AdaControl 1.14 released

From Adalog we get news of the latest AdaControl 1.14 release:

Adalog is pleased to announce the release of AdaControl 1.14. As usual, this release features new controls (meter says 421!), new features, bug fixes.

More importantly, it compiles with Gnat GPL2012! A change in the ASIS interface prevented the previous version from compiling with the latest versions of GNAT. AdaControl is now provided in two flavors, one for the “old” GNAT, and one for the recent one. Features are the same, except that some controls related to Ada2005/2012 are not available with the “old” version.

Here’s a short blurb about the functionality of AdaControl:

AdaControl is a free (GMGPL) tool that detects the use of various kinds of constructs in Ada programs. Its first goal is to control proper usage of style or programming rules, but it can also be used as a powerful tool to search for use (or non-use) of various forms of programming styles or design patterns. Searched elements range from very simple, like the occurrence of certaine entities, declarations, or statements, to very sophisticated, like verifying that certain programming patterns are being obeyed..

Which elements or constructs are searched is defined by a set of rules; the following table gives a short summary of rules currently checked by AdaControl. The number in parentheses after the rule name gives the number of subrules, if any. Considering all possible rules and subrules, this makes 421 tests that can be performed currently by AdaControl!

Whenever I read about AdaControl, I think to myself “you really ought to learn how to use this tool”, but for some odd reason I never get around to it, and I’m absolutely sure my code suffers from it. Poor code.

XAdaLib 2012 for Snow Leopard

I’m sorry for the lack of updates to the Ada-DK website, but I’ve been on vacation for most of August, and updating the site while riding across Iceland on motorcycles with my wife does not really mix well with staying on top of things in the world of Ada programming.

But now I’m back, and my first post will be about the release of XAdaLib 2012 for Snow Leopard, a collection of the following Ada tools for the Mac:

  • GTK Ada 2.24.2 with GTK+ 2.24.5 complete
  • Glade 3.8.2
  • GnatColl 2012
  • Florist 2012
  • AICWL 1.3

There’s both documentation and examples in the download package, so if you’re on Snow Leopard this might be an easy way to get the mentioned Ada tools up and running. You can read the full release announcement here.

Matreshka 0.3.0 Released

Matreshka is humming along nicely, with new features being added steadily. The latest version includes such niceties as:

  • Firebird/Interbase driver for SQL module.
  • extensions for AMF module to process UML Testing Profile, OCL and MOF Extentions.
  • text codecs for ISO-8859-5 and ASCII character encodings.
  • API improvement, bug fixes and performance improvements.
  • GNAT GPL 2012 support.

Good eh’?

In case you don’t know what Matreshka is, here’s a short rundown of the projects claim to fame:

Matreshka is framework for development of information systems in Ada. It provides:
– localization, internationalization and globalization support;
– XML processor;
– FastCGI support;
– SQL database access;
– UML processing module.

Head for the Matreshka download page if one or more of those bulletpoints have piqued your interest.

Ada 2005 Math Extensions 20120712

Simon Wright just announced the release of Ada Math Extensions 20120712:

The Ada 2005 standard defines real and complex matrix and vector operations. Not every possible operation is supported, so for example only symmetric or hermitian matrices can be solved. This project provides extensions to the Standard for GNAT.

The software is issued under the GPL Version 3 with the GCC Runtime Library Exception.

New in this release is:

  • The GNAT Project file is now in the top directory of the distribution.
  • The tests expect AUnit 3 to be installed.
  • Different releases of LAPACK may alter the sign of eigenvectors returned by the generalized eigensystem code (remember that the generalized eigensystem is Av = lBv, where l is an eigenvalue and v is the corresponding eigenvector). This only affected the tests.
  • Testing on Debian 6 required an increase in the test limit for complex general eigenvalues tests for Float.
  • In GNAT GPL 2012 and GCC 4.7, LAPACK and BLAS are no longer used, and therefore aren’t provided as part of GNAT on platforms where they aren’t natively available. This package requires LAPACK and BLAS to be installed (it links with “-llapack -lblas”).

It’s comforting to know that there are people out who knows and understands mathematics. I’m not one of them, so the chances of me ever using Ada Math Extensions 2005 is slim to none.

A Standalone OpenID Client in Ada

Jacob Sparre Andersen has gone and made a standalone OpenID client in Ada, which of course is great news for us web-nuts and Ada Web Server fans.

An OpenID client to build into a web-server. We start with a branch of “Ada Server Faces” which means that the code in this repository for the time being is under the Apache 2 license. This is compatible with GPL-3 (but apparently not with GPL-2), so applications compiled with this will end up being either Apache-2 or GPL-3 licensed.

The “Ada Server Faces” project Jacob mentions is the brainchild of Stephane Carrez of Java2Ada fame. There’s a lot of good stuff on Stephane’s website, so be sure to check it out.

I plan on getting down and dirty with Jacob’s OpenID implementation real soon, as the project we’re currently working on at AdaHeads is at a point where a working OpenID login is required. The demo Jacob has supplied makes it look fairly simple to get going.

Deepend 3.0 Available for Ada 2012 and Ada 2005

Brad Moore just announced the release of Deepend 3.0, but before we get into what Deepend actually is, I’d like to start with this awesome explanation behind the name:

  1. Its the end of the pool you’d expect to go to, if the pool is to have subs floating in it.
  2. Hopefully it can be used to write deependable software.
  3. Hopefully it doesn’t mean this is something the author has gone off of.

Those three reasons are good enough for me, and with the name out the way, lets move on to tackle the big question of “what exactly is Deepend?”

Deepend is a dynamic storage pool with Subpool capabilities for Ada 2005 and Ada 2012 where all the objects in a subpool can be reclaimed all at once, instead of requiring each object to be individually reclaimed one at a time. A Dynamic Pool may have any number of subpools. If subpools are not reclaimed prior to finalization of the pool, then they are finalized when the pool is finalized.

Rather than deallocate items individually which is error prone and subceptable to memory leaks and other memory issues, a subpool can be freed all at once automatically when the pool object goes out of scope.

Have you ever wondered why Deallocating in Ada is called Unchecked_Deallocation, or why Ada has a new operator, but not a delete operator?

Part of the reason is that Ada was designed with safety in mind, and heap deallocations are viewed as error prone as it is in many languages.

With this Storage pool, Unchecked_Deallocation is implemented as a No-Op (null procedure), because it is not needed or intended to be used.

Subpool based storage management provides a safer means of memory management, which can outperform other mechanisms for storage reclamation including garbage collection.

So there you have it, straight from the horse’s mouth.

You can read the full release announcement here or you can just go straight to download and get busy with your subs immediately.

DePlo: dependency graphs for Ada

I discovered DePlo while perusing the Ada subreddit, and even though I’m personally quite satisfied with the dependency graphs provided by GPS, it’s always nice to know that there are other options out there to fulfill our dependency graph needs:

DePlo is a program that converts the dependency relationship between Ada packages (i.e., who “with”s whom) into a graph in DOT format. Package hierarchy is showed by drawing child packages inside their parents. The graph can be simplified by “collapsing” whole package hierarchies in a single node.

Currently it works only in a GNAT environment since it get the dependency graph by reading the ALI files generated by GNAT. I guess that it would be possible to make it portable by using ASIS… maybe in a future release.

If you want to see the DePlo in action then you might enjoy these screenshots, or you can just go straight to the Installation page and instantly get busy with plotting some dependency graphs. Enjoy!

ZanyBlue v1.1.0 Beta Available

Michael Rohan posted an update to the ZanyBlue library the other day, bringing it up to version 1.1.0:

This is an Ada library currently targeting localization support for Ada (along the lines of Java properties) with supporting message formatting and built-in localization for about 20 locales. The properties files are compiled into Ada sources built with your application and use to access application messages at run-time. The run-time locale is used to select localized messages, if they are available.

Changes in this release include:

  • Updates for building with GNAT 2012 (major driver for this release).
  • Added a patch to ZanyBlue-ize GNAT GPS 5.1.1 (released with GNAT 2012). The resultant executable is identical to the standard gps but with support for pseudo translation (no real attempt is made to supply localized properties files for gps!).

You can read the full release announcement here, or just jump straight to the download.

GNAT GPL 2012 is here!

I’ve been waiting anxiously for the 2012 edition of the GNAT GPL compiler and the accompanying GNAT Programming Studio update, and now the wait is finally over:

Get the GNAT GPL 2012 package

Coinciding with the GNAT GPL 2012 release, we also get a bunch of updates to all the other great libre.adacore.com tools, such as:

And a whole slew more. I’ve personally installed GNAT GPL 2012, the new GPS, AWS 2012, GNATColl 2012, Florist 2012 and XML/Ada 2012 on my Slackware64 boxes, and everything went without a hitch. It just worked. Next up: Getting familiar with some of new Ada 2012 features. Should be fun.