aboutsummaryrefslogtreecommitdiffstats
path: root/Iterator
Commit message (Collapse)AuthorAgeFiles
* Move to PSR-1-2 & drop PHP5.3 & `from`/`import`.Ivan Enderlin2015-05-285
|
* Happy new year!Ivan Enderlin2015-01-055
|
* Allow missing @requires.Ivan Enderlin2014-04-011
|
* Totally new structural coverage algorithm.Ivan Enderlin2014-04-011
| | | | | Much faster, much simpler to maintain and consider recents changes in Praspel (cf research papers).
* Override the isEmpty() method.Ivan Enderlin2014-03-311
|
* Happy new year \o/.Ivan Enderlin2014-01-075
|
* Define flex entities.Ivan Enderlin2013-10-151
|
* Add coverage of the @default clause.Ivan Enderlin2013-06-241
|
* Propagate combinatorics to all clauses.Ivan Enderlin2013-05-271
| | | | | For “domain” coverage criterion, the combinatorics is now applied to all clauses at the same time.
* The Sampler class is based on Coverage\Domain.Ivan Enderlin2013-05-141
| | | | No more maxData parameter.
* Use default value for pre/post in getChildren.Ivan Enderlin2013-05-131
|
* Avoid an infinite loop when there is no variable.Ivan Enderlin2013-05-132
|
* Format code. #maniaIvan Enderlin2013-05-131
|
* Fix the \Hoa\Iterator\Multiple behavior.Ivan Enderlin2013-05-131
|
* Remove a useless import.Ivan Enderlin2013-05-131
|
* Initialize variables with an empty array.Ivan Enderlin2013-05-131
|
* Add Hoa\Praspel\Iterator\Coverage global iteratorIvan Enderlin2013-05-132
| | | | | | | The Coverage iterator allows to make structural or structural+domain coverage. To do this, the Structural iterator now implements the Hoa\Iterator\Recursive interface. This is a first draft, it may be optimized or updated.
* Add coverage criteria (normal and exceptional).Ivan Enderlin2013-05-011
|
* Update API documentation.Ivan Enderlin2013-05-011
|
* Use Hoa\Iterator.Ivan Enderlin2013-04-302
|
* Add the domain coverage iterator.Ivan Enderlin2013-04-301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a set of variables, for example: @requires a: 'one' or 'two' and b: 'three' or 'four' or 'five' and c: 'six' or 'seven' or 'eight'; We are able to iterator over all domains combinations, like this: $iterator = new Hoa\Praspel\Iterator\Coverage\Domain( $model->getClause('requires')->getLocalVariabes() ); foreach($iterator as $variables) { foreach($variables as $name => $variable) printf('%s: %-8s', $name, $variable->getConstantValue()); echo "\n"; } It will output: a: one b: three c: six a: two b: three c: six a: one b: four c: six a: two b: four c: six a: one b: five c: six a: two b: five c: six a: one b: three c: seven a: two b: three c: seven a: one b: four c: seven a: two b: four c: seven a: one b: five c: seven a: two b: five c: seven a: one b: three c: eight a: two b: three c: eight a: one b: four c: eight a: two b: four c: eight a: one b: five c: eight a: two b: five c: eight
* Early draft of a data sampler iterator.Ivan Enderlin2013-04-241
| | | | An easy way to iterate over data described by Praspel.
* Fix a typo in the API documentation.Ivan Enderlin2013-04-241
|
* Take @throwable into account when iterating.Ivan Enderlin2013-04-231
|
* Add a weak stack.Ivan Enderlin2013-04-231
| | | | | | | | | | | | | | | | | | | | | A weak stack is a stack where null elements are not iterated. Example: $stack = new WeakStack(); $stack->push(2); $stack->push(null); $stack->push(4); $stack->push(null); $stack->push(null); $stack->pop(); foreach($stack as $element) var_dump($element); /** * Will output: * int(4) * int(2) */
* Add structural coverage.Ivan Enderlin2013-04-181
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.