Creating a local (ie. to one machine) environment for agile SD: versioning (svk), continuous integration (lightweight continuum), tags files (ie. a la emacs), tickets (without new ticket creation ? modification of ticket ids after merging ?). This local environment would be synchronized (how) with remote environment, taking care of merging on central versionning, in an asynchronous way. Sort of project-wide arch/darcs scheme.
Local SMTP proxy for storing messages and more generally actions to be synchronized later on central system. Look at P2P protocols ? file reconciliation like Unison ?
A web-based tool for storing web sites address to visit later. Send a message with mail.
(follow-up on 2007.01.24 08:18:22 :http://www.infoq.com/news/2007/01/j2s, compilation from Java to Javascript)
It should be possible to compile Java language programs according to some deployment scheme and components assembly descriptors. IDL and similar languages work at the structural level, FIDL or other more advanced specification languages work by compiling specialized language to target platform,
Axis toolkit and similar tools provide java2wsdl tools that generate WSDL descriptors (or RMI stub, or IIOP skeletons/stubs, or...) from an Interface and associated data types. wsdl2java can translate a WSDL descriptor into a set of Java classes and interfaces, including factory classes that produces automatically a stub instance for an interface given an end-point address.
GWT allows one to write the GUI part of an AJAX-enabled web application compiling Java language to Javascript+XHTML. Similarly, other toolkits allow generation of client-side scripts from server-side or common code base.
Idea ::
For example, we have an interface such as:
public interface Basket { void addToBasket(Item item) throws BasketFullException; void removeFromBasket(Item item); List<Item> listBasket(); }
and an implementation that stores the basket's items in a List: previous
public class BasketImpl extends Basket { private List<Item> items ... }
Let's say we have a component descriptor such as (in IDL3): previous
interface Basket ... component UserAgent { requires Basket b; } component BasketImpl { provides Basket b; }; assembly MyApp { component UserAgent u; component BasketImpl b; connection u.b b.b; }
and a deployment descriptor that says : previous
UserAgent= java(UserAgentImpl) BasketImpl = java(BasketImpl) MyApp.u = gwt(UserAgent) MyApp.b = servlet(BasketImpl,"/basket")
Then we could produce assembly MyApp by transforming UserAgent class using GWT to produce a set of javascript and HTML pages representing the UI and a servlet class and descriptor implementing the Basket interface with its implemetation given by BasketImpl class which gets untouched.
While trying to use war plugin for overlaying two webapps, I was bitten by the somewhat obvious problem of how to merge web descriptors. There does not seem to exist a standard (read mainstream) way of doing this. All I found searching the ML on nabble was a reference to some custom development modifying the plugin's standard behavior and I did not however search the Jira issues.
While certainly not against modifying plugins to suite my needs, I tried to find a solution less "intrusive" and I came up with one simple solution that may (or may not) be worth sharing: Use inclusion in XML descriptor through internal subset mechanism. This solution is not really elegant and may become rapidly unwieldy if the number of webapps to merge is too important or rapidly changing, but it has the advantage of relying on standard XML mechanisms and not changing maven or its plugins.
<plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <webResource> <directory>${basedir}/src/main/webapp-filtered</directory> <filtering>true</filtering> <includes> <include>**/*.xml</include> </includes> </webResource> </webResources> </configuration> </plugin>
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" [ <!ENTITY external.servlet SYSTEM "${testui.include.servlet}" > <!ENTITY external.servlet-mapping SYSTEM "${testui.include.mapping}" > ]>
<!-- conditional inclusion of testui descriptor --> &external.servlet; <servlet> <servlet-name>Init</servlet-name> <servlet-class>toto.Init</servlet-class> <load-on-startup>1</load-on-startup> </servlet> ... <!-- conditional inclusion of testui descriptor --> &external.servlet-mapping; <servlet-mapping> <servlet-name>webapp</servlet-name> <url-pattern>/my-app</url-pattern> </servlet-mapping> ...
<profiles> <profile> <id>web-test</id> <properties> <testui.include.servlet>servlet.xml</testui.include.servlet> <testui.include.mapping>servlet-mapping.xml</testui.include.mapping> </properties> <dependencies> <dependency> <groupId>toto</groupId> <artifactId>test-webapp</artifactId> <version>${version}</version> <type>war</type> </dependency> </dependencies> </profile> <profile> <id>web-prod</id> <properties> <testui.include.servlet>dummy-servlet.xml</testui.include.servlet> <testui.include.mapping>dummy-mapping.xml</testui.include.mapping> </properties> </profile> </profiles>
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" [ <!ENTITY external.servlet SYSTEM "servlet.xml" > <!ENTITY external.servlet-mapping SYSTEM "servlet-mapping.xml" > ]>Note that war overlay mechanism took care of copying servlet.xml and servlet-mapping.xml from test-webapp. At load time, the XML parser for the container (tested with Jetty6) should resolve entities content and include the named files into the web.xml.
As already said, I tried all this on one container only and with two simple web applications. But as this is standard XML mechanism, and not particularly bleeding edge XML, I do have reasons to believe it will work in any reasonably standard-compliant container.
Posted on maven-users ML
News from InfoQ about future release by Borland of Gauntlet. Was a hosted service (ie. ASP) providing continuous integration server and reporting abilities. Something like maven + continuum + some abilities from Fisheye.
An interesting feature is sandboxing that provides all the platform's services to some or all of the developer/team and triggers change propagation to metrics gates: test suites passed, coverage measures...
A new article from DDJ that illustrates the link between testability and Dependeny injection :http://www.ddj.com/185300375
Some research on Google yielded the following for graph edit distance. Most of it related to visual pattern recognition :
REST stands for Representational State Transfer and defines the structure of WWW and more generally web applications. In short, it states that:
In other words, a set of hypertext documents together with the hyperlinks they contain form a directed labelled graph describing the behavior of some application/document set/web service/whatever. There is nothing like a method or RPC, all interaction is done through the standard GET/POST methods offered by the web. Actually, POST is enough as it allows obtaining some resource while transfering data from the client.
Modeling and creating a RESTful web application can then be done using standard graph-based techniques:
The graph model can be constructed by naming states with regular expressions```` over the URI space and then ensuring consistency: non overlapping names set, or hierarchical nesting, or completeness of namespace... A RESTful applications is a directed graph `A=(V,E)` where E \in V\times V the accessibility relation, together with a labelling function \lambda:V\mapsto 2^{X^*} that assigns some language to each state in such a way that:
What about transition labels ? They can be used to constraints the set of allowed parameters' values and names giving first level validation. Note that request if part of the URI so parameters names are not elements of the transition.
Still wondering what an aspect is and why I should want to use it. After writing some code and text about replacement for the Visitor pattern, I came to the partial conclusion that aspects are a second-hand concept, or at least a concept less powerful than language: what you can do with aspects you can do with suitable meta-programming within the host language (provided this language and platform provides enough reflective power).
Objects offer a great variety of composition schemes: inheritance, delegation, decoration, composites... What about composing aspects ? I am also doubtful about Java5 annotations A.K.A. JSR175, also I applied for being an expert for JSR305 ! This is supposed to be metadata about program elements but is actually used by tools and frameworks to alleviate configuration and reduce or suppress external descriptors. I'd rather include in the Java language constructs that would allow true compile-time meta-programming, something like hygienic scheme macros that allow redefinition and transformation of standard syntactic constructs or Template Haskell.
Recalled an interesting article from November 2005 issue of IEEE Computer that deals with constructing a research assistant on the web. This tool, available at http://www.hoskinson.net, uses Google's or Yahoo's Web search API to query documents and synthesize a report about relevant terms using text mining technique. Basically:
In Computer's August 2006 issue, an exposition of a novel spam filtering scheme that uses percolation search for disseminating and querying spam digests in a social network. This works in an unobstrusive way using standard email clients. The most interesting part is about how data is stored and retrieved in nodes. The fact that the network has a power law property allows one to expect data implantation using percolation threshold to propagate to several highly linked nodes.
Should already exists, but who knows ? One can imagine using these two features to browse the web collaboratively and annotate pages in more significant ways than with tags:
One could add tools such as del.icio.us to further add information to retrived page.
Modal logic (see http://en.wikipedia.org/wiki/Modal_logic) : basic propositional or first-order logic with modal operators that assert the truth value of some logical assertion in a certain mode of being. Semantic is defined as a Kripke structure with variables or proposition values defining the states and a transition relation between states. Logic differs in their modalities and the axioms used for logical deduction.
Alethic logic: the logic of necessity and possibility. Base of modality reasoning ? Modal operators:
Deontic logic: the logic of obligations, permissions and interdictions. May be used to model regulations, laws and all that kind of thing.
Epistemic logic: the logic of knowledge. May be used to model information state between agents and information dissemination. Main modalities:
Temporal logic: accessibilit relation models evolution of thruth values in time.
Kripke structures are graph and there is a deep relation between formal languages theory and modal logic (at least temporal logic). PLTL formulas are modelled by Büchi automata (rational languages over infinite words). CTL formulas are modelled by tree automata.
It should be possible to use such formalisms as foundation for verifying and enforcing regulations on information systems such as Sarbanes-Oxley 404.
Added Google AdSense in OQube site's.
Found another great paper from Rapf Lammel: http://homepages.cwi.nl/~ralf/ccc/. Deals with generation of from grammars with a notion of combinatorial coverage
Taking this idea one step further, we can imagine compiling object graph traversals from class diagrams. A class diagram identifies participants in the traversal and their structure. From this structure, we generate iterators instances for each type involved that will traverse an object instance's attributes following some strategy (depth-first, breadth-first, filtered). Given a description of a visitor interface or class, we can further generate method calls to the visitor's according to the chosen strategy.
At runtime, the strategy and the visitor's instances are parameters of the traversal which is executed from compiled code and so is supposed to be more efficient than through reflection or introspection.
Objects form directed (labelled) graphs at runtime, so it may seem natural to implement a generic traversal startegy modelled after depth-first and breadh-first classic traversal strategy. This would be a kind of generic visitor pattern or generic map in functional programming terms.
Voir http://jakarta.apache.org/commons/jxpath/index.html. It seems simple to implement NodeIterator and extends NodePointer such that actions can be invoked on all traversed nodes. It may also be simpler to first collect objects then apply map function, but this may be really inefficient fro large object graphs.
The patchwork project is well under-way towards a first release. I have finished reengineering the core project, integrating BET in the process. I have applied tried applying the tool to three different projects:
Patchwork does not (yet) work on its own code. Testing and Coverage reporting works after much trickery to escape infinite recursion in call to cover() method, but formatting does not yet work: There seems to be incorrect computations in blocks, maybe caused by discrepancies in the code structure.
Lot of work to do, I am trying to setup a trac project server for issues tracking.
I have found AsciiMathML to be a very nice script for displaying math formulas in XHTML. Here are some samples from the author's webpage: `sum_(i
1)^ni^3((n(n+1))/2)^2`
`I = ((1,0,0),(0,1,0),(0,0,1))`
Two interesting articles in latest online IEEE issue:
Design by contract to Improve Software Vigilance, Y.Le traon, B.Baudry and JM. Jézéquel.
Seems to deal with assessment of BDC effectiveness through defect injecton. The other article uses the same technique to study the fault detection capability of common coverage metrics:
Using Mutation Analysis for Assessing and Comparing Testing Coverage Criteria, James H. Andrews, Lionel C. Briand, Yvan Labiche, Akbar Siami Namin
Following an interesting thread on agile testing list, I have undertaken to bring Patchwork, my code coverage tool, to a somewhat usable and at least publishable state. It seems that instrumentation works well, after much troubles with adjusting jump offsets and notifcations for method start and end. First steps in reporting are fine and I got the correct paths reported from the patchwork file. I need to connect this info to the actual control flow graphs then check coverage metrics.
TODO:
Furthermore, it occured to me that it could be interesting to express those various criteria in a graph-theoretic context: all-nodes amount to a spanning tree, all-edges to a coverage of the full graph, cyclomatic base and non iterating path are themselves graph concepts. Would need some experiments, such as mutation injection to detect faults in some sample program. A more interesting experiment would be to track defect detection with the full history of versions of some piece of software. MAJ-PE is a likely candidate, although somewhat big for such an experiment.
Finally managed to finish this f** algorithm for constructing solution sets for inequality (in base r integer). The solution was obvious: You need to make final only** those states that are less than the target value. If not, you are in trouble when working backward from negative values as division produces a number that is greater than the dividend !
By the way, I added some methods for converting data to/from strings and primitive integers in the set's base and finished standard boolean algebra operations: Union, Intersection and Complement. All of this being tested in various bases.
After lot of work, managed to have the IntegerValue class handles inequations thus representing all integer solutions to a linear inequation. There was a subtlety in the definition of Wolper and Boigelot's algorithm that set me off: The definition of floor means that for negative values, <code>floor(x/a) = x/a - 1</code>, whereas it is equivalent for positive values. In the construction of the automata, this yielded unwanted loops.
Tests are OK in base 2 but there is still a failed test in base 16, maybe due to incorrect coding.
Moving to inequalities was not as starightforward as initially thought !