|
| 1 | +/* |
| 2 | + * Kodkod -- Copyright (c) 2005-present, Emina Torlak |
| 3 | + * Pardinus -- Copyright (c) 2013-present, Nuno Macedo, INESC TEC |
| 4 | + * |
| 5 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | + * of this software and associated documentation files (the "Software"), to deal |
| 7 | + * in the Software without restriction, including without limitation the rights |
| 8 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | + * copies of the Software, and to permit persons to whom the Software is |
| 10 | + * furnished to do so, subject to the following conditions: |
| 11 | + * |
| 12 | + * The above copyright notice and this permission notice shall be included in |
| 13 | + * all copies or substantial portions of the Software. |
| 14 | + * |
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 21 | + * THE SOFTWARE. |
| 22 | + */ |
1 | 23 | package kodkod.engine; |
2 | 24 |
|
3 | 25 | import java.util.Iterator; |
|
17 | 39 | public interface Explorer<T> extends Iterator<T> { |
18 | 40 |
|
19 | 41 | /** |
20 | | - * Produces an alternative solution by iterating over the selected {@code state} |
21 | | - * of the trace, fixing all previous states. A set {@code ignore} of relations |
22 | | - * can be specified so that their valuations are ignored during iteration. |
23 | | - * Iteration may or not {@code exclude} the state at the selected position from |
24 | | - * future iterations, and that of higher positions is reset. |
| 42 | + * Produces an alternative solution by iterating over the static relations, |
| 43 | + * i.e., the configuration, while leaving the mutable ones free to adapt. |
25 | 44 | * |
26 | | - * @param state the state which will be iterated. |
27 | | - * @param steps TODO |
28 | | - * @param ignore relations whose valuation will be ignored in iteration of |
29 | | - * {@code state}. |
30 | | - * @param force fixed valuations for a set of relations that will be changed |
31 | | - * at {@code state}. |
32 | | - * @param exclude whether the current value of the {@code state} is to be |
33 | | - * excluded from future iterations. |
34 | 45 | * @return the next branching solution |
35 | 46 | */ |
36 | 47 | public T nextC(); |
37 | 48 |
|
| 49 | + /** |
| 50 | + * Produces an alternative solution by iterating over the mutable relations |
| 51 | + * while fixing the static ones, i.e., the configuration. |
| 52 | + * |
| 53 | + * @return the next branching solution |
| 54 | + */ |
38 | 55 | public T nextP(); |
39 | 56 |
|
| 57 | + /** |
| 58 | + * Produces an alternative solution by iterating over the selected {@code state} |
| 59 | + * of the trace, fixing all previous states. A set {@code change} of relations |
| 60 | + * can be specified on which a change must occur. |
| 61 | + * |
| 62 | + * @param state the state which will be iterated. |
| 63 | + * @param delta the number of states from <state>, inclusive, in which the |
| 64 | + * change must occur |
| 65 | + * @param change a set of relations in which the change must occur |
| 66 | + * @return the next branching solution |
| 67 | + */ |
40 | 68 | public T nextS(int state, int delta, Set<Relation> change); |
41 | | - |
42 | | - public boolean hasNextP(); |
43 | | - |
| 69 | + |
| 70 | + /** |
| 71 | + * Whether there is a next configuration. |
| 72 | + * |
| 73 | + * @return true if another configuration |
| 74 | + */ |
44 | 75 | public boolean hasNextC(); |
45 | 76 |
|
| 77 | + /** |
| 78 | + * Whether there is a next path for the current configuration. Is reseted by a |
| 79 | + * new configuration. |
| 80 | + * |
| 81 | + * @return true if another path for this configuration |
| 82 | + */ |
| 83 | + public boolean hasNextP(); |
| 84 | + |
46 | 85 | } |
0 commit comments