20060830: Maven as DSL (2)

Dependency management is also conceptually out of the base language's scope. It should be handled by a "compilation" step that ensures linking of the compiled source program with proper dependencies.

20060830: Back to automata (2)

Managed to make IntegerValue works for single variable and arbitrary radix. BTW, the description in Representing Arithmetic Constraints with Finite Automata: An overviewB.Boigelot and P.Wolper, 1999.  is not that helpful. I had to download On the construction of Automata from Linear Arithmetic ConstraintsP.Wolper and B.Boigelot, 2000 to fully understand how it worked.  

I had problems with the way negative numbers are encoded, which requires special handling for digits at both end of the chossen radix range. Moving to inequalities and vectors of variables should be straightforward, then I could tackle:

20060829: Back to automata

For the purpose of writing an article for LMO'07, I have started implementing Boigelot and Wolper's Real Vector Automata used for representing sets of solutions to linear system of (in)equations. I hope to use these automata in FIDL automata for computing transformations of languages by Aspects modelled as rational transducers.

These automata could also be used as conservative approximations to constraints in a system and then as test cases generators and oracles for messages contents.

Right now: works for single positive values.

20060828: Custom maven skin

For publishing this site, I am trying to wriet a custom skin so that, together with my muse module, I can generate completely the site withe maven. The current documentation is sketchy at best so I may write a tutorial for it.

20060827: Maven as a DSL

While thinking about Maven report management implementation, It occurs to me (and maybe to maven's creators) that maven is actually a DSL in disguise for application construction. The pom.xml file can be viewed as defining in a declarative way the way some piece of software can be constructed.  

The various POM's ingredients describes either:

  1. data values, to be later processed by functions: File path settings, configuration options, project's id card all fall into this case. These values are organized in a tree such that one can refer to variable's values using dotted notation (eg. foo.bar.baz
  2. functions that process the project's data, that is essentially plugins (essentiallye mojos), which may themselves be parameterized by some more data or values.

The POM (and maven defaults settings ) itself can be viewed as a function providing scheduling or  orchestration of the various phases of the build process. The lifecycle feature of maven gives a declarative way to hook functions invocations (ie. plugins and their contained mojos) or in maven parlance binding a mojo to a phase of the lifecycle.  

Sub-modules structure is just plain old function recursion.

It is then "easy" to formalize maven in the functional programming paradigm, in the spirit of what is done in  "Google's MapReduce Programming Model - Revisited", by  Ralf Lämmel.  

20060825: New project

I have been very busy finishing a small but very useful for me project called Muse-parser. This is an implementation in Java of a parser for Muse format together with a patch for Doxia (version 1.0-alpha-8) that allows writing documentation of maven projects with muse format and thus benefiting from the Emacs Muse mode to edit those documents.

It seems to work quite smoothly as the documentation of the software is itself written in muse and it is generated correctly with the standard mvn site command. Did not have yet much feedback from potentially interested users.

Feature for sometimes in the future:

I plan to keep this software as simple as possible, following muse syntax evolution but not adding too much features.

20060818: Site descriptor enhanced

Some tricks about maven2 site descriptor I discovered in this post to add <poweredBy> logos and change the site's skin:

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="jGABL">
  ...


    <skin>
        <groupId>org.apache.maven.skins</groupId>
        <artifactId>maven-stylus-skin</artifactId>
        <version>1.0</version>
    </skin>


    <publishDate position="bottom" format="yyyy-MM-dd HH:mm"/>


    <poweredBy>
        <logo
          name="Code Coverage by Clover"
          href="http://www.cenqua.com/clover/"
          img="http://www.cenqua.com/images/clovered1.gif"/>
        <logo
           name="Hosted on SourceForge.net"
           href="http://sourceforge.net"
           img="http://sflogo.sourceforge.net/sflogo.php?group_id=102411&type=2"/>
        <logo
           name="Build with Maven 2"
           href="http://maven.apache.org"
           img="images/logos/maven-feather.png"/>
    </poweredBy>




    <body>
...
    </body>


</project>

20060817: Mnesia

Erlang as a nice distributed database system called Mnesia which is built on top of a distributed erlang term system (or dets) that allows easy persistence of arbitrary erlang terms on stable storage (eg. disk) as opposed to RAM storage (provided by ets in table structures implementing set, ordered set, bag and ordered bag semantics for terms).

Querying is done using list comprehension notation and arbitrary functions can be run in transactional contexts.  

Here is the roadmap for implementing billing system:

  1. describe schema as records and links between them
  2. write some basic functional tests. We must check consistency of CRUD operations on the various manipulated entities
  3. write CRUD basic functions as YAWS files: this is plain XHTML with embedded <erl> tags that are interpreted by yaws
  4. test it (using some automata model ?)
  5. refactor everything in a code generation scheme that generates boiler plate code from basic record descriptions.

20060817: Ajax and web programming

Just to kep my employability at a high enough level, I am starting to teach myself Ajax-style programming. Chances are that I could merge erlang discovery with client-side programming in one single thread...

Found this: http://neilmix.com/narrativejs/doc/. The idea of adding language features that get transformed on the fly to provide syntactic sugar is very appealing. I really don't understand this was not the approach taken in Java5 with annotations.  

This idea coupled with Google's Web Toolkit make it possible to use one language (eg. Java) for developing an application then according to some configuration and deployment descriptor, compile the various components to various targets:

20060816: Maven report management

Currently, report generation in maven is largely ad hoc: each plugin (reporting or build plugin) has its own private way of generating data and generating views on this data to be integrated into the project's site. For example, surefire plugin generates XML reports into the target/surefire-reports/ directory and these reports are later processed by surefire-report reporting plugin to generate HTML pages into the target/site/surefire-reports/ directory. These HTML pages are decorated as other pages in the site thus providing a consistent look and feel across reports (and by the way allowing easy customization of this L&F through CSS files and custom templates).  

This is the case for most reports I have used like pmd, cobertura or checkstyle. Other reports like javadoc and xref reports generates HTML pages with their own private format.  

As it may be apparent from the questions in the maven users' mailing list, the aggregation of reports for modules of a project is a recurring issue. This aggregation must currently be implemented by each plugin in an ad hoc way and it seems this is not a trivial task. Moreover, the aggregation process may not be easily controlled in a consistent way: excluding certain projects or part thereof from aggregation is difficult (or impossible ?).  

Furthermore, there is a need for a global and synthetic view of complex multi modules projects' status and QA information. This information was provided in maven 1.X through the dashboard plugin that could aggregate reports' output in one tabular view. I think that both issues could benefit from changing the current approach of report and (meta-)information handling in maven from a plugin dependent view to a project dependent view.  

A project's structure has (at least) two dimensions: A physical structure that is made of files, directories, archives, maybe URLs ; and a logical structure made of modules, packages, classes, methods, instructions. These two dimensions are obviously related: a class is defined in a file, a package is implemented by one or several directories, a method is defined in a class, etc.

Each reporting plugin provides some pieces of information about part of the stuctural elements of a project:

This latter example further illustrates that information can be added to information.

The basic idea I have in mind is thus to provide as a core maven service a central information API that would be used by all reporting plugins to attach information to structural elements of the project. This information could be store as a RDF (see also http://www.ilrt.bris.ac.uk/discovery/rdf/resources/) graph backed by a suitable ontology and extensible at will. The RDF structure would simplify most of the issues raised earlier in this text as it gives standard tools to query, aggregate and transform informations stored in the graph.

Aggregating information, for example, is trivial and can be done generically at any suitable level: If I need coverage percent for each method, I can query nodes relating to methods for a test-coverage predicate attached to this node and use the given object's value. Or I can use the same information by aggregating values at, for example, module scope, following links from module nodes to test-coverage predicates they lead to.

Another interesting aspect of this scheme is that RDF, having an external XML representation, is amenable to XSLT transformation and thus  can be used uniformly to generate human-readable reports without resorting to specialized handling per plugin.

Furthermore, storing this information in a versionned database would allow one to retrieve the evolution of the information attached to a project over time and various builds. This functionality is today provided by qalab plugin, once again in an ad hoc way.

20060814: JAutomata

Started working towards publication of JAutomata. In the process, I touched upon OpenJGraph, removing the Vertex interface and VertexImpl class which added an unnecessary (and costly) layer of indirection in graphs. Basic graph operation seems to work but graph layout may have been broken in the process.

For ease of documentation, I also tried to merge the muse plugin for maven into doxia.

20060809: Yaws

Discovered the existence of Yaws with installation of erlang system on ubuntu. Seems to offer all what is needed and more for developing web applications with erlang. Followed references to haXe, an OO language compilable to javascript, flash actionscript and server side bytecode (neko ?). Yaws provide support for interacting with Ajax and haXe clients, thus providing perfect framework for web 2.0 applications...

I will start developing billing sample as soon as possible using this framework, as a firts real-life erlang program. Dont know if some clean templating support is provided.

Not the only one interested in using erlang +yaws: https://yarivsblog.com/articles/2006/07/11/erlang-yaws-vs-ruby-on-rails

20060809: Erlang (cont)

Done with exercises on sequential programs. Started working on concurrent samples. Communication is by message passing: processes sit in a loop with messages as pattern matching expressions and react with other actions. Messages exchange is synchronous which means both sending and receiving are blocking. Got myself caught with bad pattern matching !

20060808: WOPR7

Submitted application to Workshop on Performance and Reliability (WOPR7). Not much hope, but who knows ?

20060807: Erlang

Finally found some time and motivation to start learning Erlang. I use it to develop a version of billing. I have been thinking about switching focus from Java to another language for some time now, and erlang may be the one I am looking for:  

There is even a french site dedicated to Erlang.

Right now, I managed to:  

  1. get everything up and running on Ubuntu linux, with emacs support (trivial with package update)
  2. start reading erlang course and do some exercises
  3. muse around documentation, finding something interesting called webtool to handle easily communication over HTTP.

I am thinking about structuring the application as one process per session spawned as needed, with continuation stored as functions. Looking for some templating modules or equivalent in Erlang, support of XML ?

20060712: Maven Day Paris

Participé au Maven Day Paris, demi-jourée de présentations organisée par Improve Mana sur le présent et le futur de maven.  

Continuum par E.Venisse

Présentation générale de Continuum (version 1.0.3).  Idées :

Qualité du code et maven par V.Massol

Présentation des outils et méthodes pour la qualité du code par Vincent Massol. Distintion entre qualité active (en cours de développement) et qualité passive. Maven propose des outils pour les deux approches, la première étant a priori plus efficace en terme d'amélioration de la fiabilité des applications.

Créer un module build-tools contenant la configuration des outils de contrôle qualité (eg. fichier de configuration checkstyle.xml ou PMD).

Plugins intéressants ::

Possibilité d'aggréger les résultats de couverture clover entre modules dépendants. Calcul couverture de code des tests d'intégration (intérêt ?). Stratégie d'accroissement du taux minimal de couverture par incrément: à chaque incrément, monter le taux minimal provoquant un échec  du build au niveau atteint précédemment.  

Projet d'outil global sur la qualité pour maven. Permettrait d'intégrer dans une base de donnée différents rapports et métriques, avec leur évolution dans le temps et de produire des rapports/requêtes à partir de ces données.  

Produire une base de donnée RDF reliant les différents rapports, requêtage XPath/XQuery ou spécifique RDF (??)

Projet de rapports d'activités sur le projet (genre statcvs-xml ??)

Future de maven2 par Jason Van Zyl

Maven repository manager

Projets livrés fin du mois de juillet pour OSCon, déjà utilisé en interne par l'équide de développement de maven. Outil général d'administration et de maintenance de référentiels maven2 .  

Feynmann

Plate-forme  de développement OS. Version plus moderne de Sourceforge ou collabnet. Fournit services principaux pour développement:

Objectif: installation en 30min sur une plateforme linux.

Évolutions maven 2.1

Retour d'expérience "mavenisation"

Présentation projet pilote de mise en oeuvre de maven dans un grand compte.  

Problèmes ::

Retours ::

20060712: The man who shot Java EE

Second time I read an analyst's report about the death of Java EE as the primary platform for enterprise software development. Read infoQ summary for the main points. May be further summarized as: "Too complex"

Glad to read an authorized source that agrees with what I have been thinking and saying for several years, albeit not publicly on a blog ! Anyone that has tried to develop and test seriously any non trivial JavaEE piece of software should agree.

20060704: XML-as-script

XML is often used as script language in configuration files, where the tags structure mimics a graph of objects and method calls. The numerous configuration tools available out there each have their own idioms to produce the same result and one could ask whether using a specialized expression language (eg. BeanShell or something more exotic like sisc, a scheme to bytecode interpreter/compiler) would not be more useful.  

XML is quite clumsy as  a language for human beings, very verbose and definitely needs very good editor support.  

Some XML idioms I am aware of:

20060626: Web 2.0: Much ado about nothing ?

Back in 1999, when I started working for a small web agency in Lille, I was once shown a Tetris implementation in Javascript. Flash was everywhere and was expected to change the face of the web forever as GUIs were becoming more and more complex and beautiful. This vanished in 2001-2002 when the first Internet bubble exploded.

Four years later, enters Ajax and the famous Web 2.0.  Ajax or Asynchronous Javscript XML is a way to creates richer interfaces with "standard" browsers technology while saving bandwidth through asynchronous RPC over XML. I wonder if Ajax is not reinvention of thick client or client-server model with todays' technologies. The interesting thing about Ajax is that its biggest promotor is  Google which was until recently known as one of the best search engines on the web and is rapidly diversifying its activities. Ajax may then be seen as a way to take hold of the client platform. Other big boys like IBM are also involved in this game and when you add this to the resurrection of Netscape through Firefox, you cannot think all this is pure technological innovation.  

20060625: Méta-programmation

De Generative ProgrammingCzarnecki et Heisenecker, Addison-Wesley, 2000.  

Réflexion ::  An entity's ability to represent, operate on and otherwise deal with its self in the same way that it represents, operates and deals with its primary subject matter.

Distinction entre introspection, la capacité à connaître et observer son propre état et intercession, la capacité a modifier cet état. Les deux ne sont possibles qu'en disposant d'un méta-niveau soit directement dans le langage (smalltalk), soit au travers d'une API (Java).  

Métaprogrammation  statique : exécution de fragments de programmes manipulant d'autres fragments au moment de la compilation/interprétation/programmation. Exemple des templates C++ : la sémantique de l'instantiation des templates rend le langage de ceux-ci Turing complets. L'écriture de templates s'apparente à l'écriture de programmes dans un langage fonctionnel, la beta-réduction étant réalisé par le compilateur qui instancie récursivement les templates. Pourquoi ne pas avoir alors une vrai syntaxe de langage fonctionnel plutôt que la syntaxe abstruse et illisible des templates C++ (amibguïté des templates qui oblige à ajouter des règles syntaxiques pour parser <class A, template <class B>>).

Technologies Java ::  

20060622: Test de syntaxe

Dans Black-box testing, B. Beizer, J.Wiley, 1995, le chapitre Syntax testing ne traite que des grammaires régulières (ie. des automates). Le cas plus intéressant des grammaires algébriques est traité par exemple dans , un article de Ralf Lämmel.

Le test de grammaire algébrique pose bien sûr le problème de la récursivité non bornée des non-terminaux. Lämmel propose de réduire ce cas à celui des expressions régulières en "dégradant" la forme de la grammaire. Une fois le graphe (l'automate) obtenu, on peut appliquer des techniques classiques de test d'automate.

20060621: Java precisely

Received today Java precisely, 2nd edition, by Peter Sestoft. Good and precise reference about most aspects of the language, second edition includes Java 5 elements: generics, annotations, autoboxing...

see http://www.dina.dk/~sestoft/javaprecisely/

20060621: Speculoos updates

Updated speculoos projects with following features:  

  1. added handling of joins in the XML file. A join is a mapper that extracts a list of values from a single attribute of a first search and injects some environment property as a joined attribute for the second search. This is not really a join as it does not allow creation of joined objects from one or more query. This implied changes in the JNDIMapper API to allow passing directories and handling of root.  
  2. added some integration tests using DSML as a backend. This illustrates basic usage of the library and some features of the XML descriptor.  
  3. allows simplification of search mappers declarations. Such a mapper can  now be declared using only attributes input and output and passing the environemnt variable _ROOT. This variable is systematically looked for if no tag root is set, which allows simple mapping of objects from basic DN query.  
  4. added automatic conversion from strings to collections. Use comma as items separator and colon as key-value pair separator. This routine only handles strings as we are stuck with jdk 1.4. It is not recursive.