Add the Countable interface to Collection.
Add structural coverage.

Example of a contract:

    @requires r: 'r';
    @behavior a {
        @requires ar: 'ar';
        @behavior ap {
            @ensures ape: 'ape';
        }
        @behavior app {
            @requires appr: 'appr';
        }
        @ensures  ae: 'ae';
    }
    @behavior b {
        @requires br: 'br';
        @ensures  be: 'be';
    }
    @ensures e: 'e';

With this coverage criteria:

    $coverage = new Hoa\Praspel\Iterator\Coverage\Structural($model);

    foreach($coverage as $path) {

        foreach($path['requires'] as $requires)
            foreach($requires as $name => $variable)
                echo 'requires: ', $name, "\n";

        foreach($path['ensures'] as $ensures)
            foreach($ensures as $name => $variable)
                echo 'ensures:  ', $name, "\n";

        echo "\n";
    }

    /**
     * Will output:
     *     requires: r
     *     ensures:  e
     *
     *     requires: ar
     *     requires: r
     *     ensures:  ae
     *     ensures:  e
     *
     *     requires: ar
     *     requires: r
     *     ensures:  ape
     *     ensures:  ae
     *     ensures:  e
     *
     *     requires: appr
     *     requires: ar
     *     requires: r
     *     ensures:  ae
     *     ensures:  e
     *
     *     requires: br
     *     requires: r
     *     ensures:  be
     *     ensures:  e
     */

Here we are. We efficiently iterate over all structural paths of a
model.
[auto] Merge from Praspel

    • #359c009 — Add the Countable interface to Collection. (Ivan Enderlin, 2013-04-17)
    • #7fc8be2 — Add structural coverage. (Ivan Enderlin, 2013-04-18)

---

Merge remote branch 'library-praspel/master'