Skip to content

Commit 0993cc8

Browse files
Fix typos.
1 parent 11785c7 commit 0993cc8

File tree

11 files changed

+38
-38
lines changed

11 files changed

+38
-38
lines changed

src/kodkod/ast/Decl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public final class Decl extends Decls {
8080

8181
/**
8282
* Returns the expression in this declaration.
83-
* @return this.exresssion
83+
* @return this.expresssion
8484
*/
8585
public Expression expression() { return expression; }
8686

src/kodkod/ast/LeafExpression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* An expression with no children.
2626
* {@link kodkod.ast.Relation Relation} and {@link kodkod.ast.Variable Variable}
27-
* are examples of leaf exressions. Two leaf expressions are equal
27+
* are examples of leaf expressions. Two leaf expressions are equal
2828
* if and only if they refer to the same object. That is,
2929
* leaf1.eauls(leaf2) <=> leaf1 == leaf2. A leaf has a name, which is
3030
* basically a comment for the purpose of printing, viewing, etc. The name

src/kodkod/engine/Evaluator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* that an Instance i is a solution to a formula f found using options o.
4444
* If you create an evaluator e such that e.instance = i, but e.options
4545
* is an Options object with different integer settings than o,
46-
* e.evalate(f) may return false. </p>
46+
* e.evaluate(f) may return false. </p>
4747
*
4848
* @specfield options: Options
4949
* @specfield instance: Instance
@@ -103,7 +103,7 @@ public boolean evaluate(Formula formula){
103103
}
104104

105105
/**
106-
* Evaluates the specified expession with respect to the relation-tuple mappings
106+
* Evaluates the specified expression with respect to the relation-tuple mappings
107107
* given by this.instance and using this.options.
108108
* @return {@link kodkod.instance.TupleSet set} of tuples to which the expression evaluates given the
109109
* mappings in this.instance and the options in this.options.
@@ -118,7 +118,7 @@ public TupleSet evaluate(Expression expression){
118118
}
119119

120120
/**
121-
* Evaluates the specified int expession with respect to the relation-tuple mappings
121+
* Evaluates the specified int expression with respect to the relation-tuple mappings
122122
* given by this.instance and using this.options.
123123
* @return the integer to which the expression evaluates given the
124124
* mappings in this.instance and the options in this.options.

src/kodkod/engine/fol2sat/FOL2BoolTranslator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ BooleanValue cache(Formula formula, BooleanValue translation) {
136136
/**
137137
* Translates the given annotated expression into a boolean
138138
* matrix that is a least sound upper bound on the expression's
139-
* value, given the leaf and variable bindings in the
140-
* the provided interpreter and environment.
139+
* value, given the leaf and variable bindings in the
140+
* provided interpreter and environment.
141141
* @requires interpreter.relations = AnnotatedNode.relations(annotated)
142142
* @return a boolean matrix that is a least sound upper bound on the expression's value
143143
* @throws HigherOrderDeclException annotated.node contains a higher order declaration
@@ -419,7 +419,7 @@ public final BooleanMatrix visit(UnaryExpression unaryExpr) {
419419
* @param decls the declarations comprehension
420420
* @param param formula the body of the comprehension
421421
* @param currentDecl currently processed declaration; should be 0 initially
422-
* @param declConstraints the constraints implied by the declarations; should be Boolean.TRUE intially
422+
* @param declConstraints the constraints implied by the declarations; should be Boolean.TRUE initially
423423
* @param partialIndex partial index into the provided matrix; should be 0 initially
424424
* @param matrix boolean matrix that will retain the final results; should be an empty matrix of dimensions universe.size^decls.length initially
425425
* @ensures the given matrix contains the translation of the comprehension "{ decls | formula }"
@@ -520,7 +520,7 @@ public final BooleanValue visit(ConstantFormula constant) {
520520
* @param decls formula declarations
521521
* @param formula the formula body
522522
* @param currentDecl currently processed declaration; should be 0 initially
523-
* @param declConstraints the constraints implied by the declarations; should be Boolean.FALSE intially
523+
* @param declConstraints the constraints implied by the declarations; should be Boolean.FALSE initially
524524
* @param acc the accumulator that contains the top level conjunction; should be an empty AND accumulator initially
525525
* @ensures the given accumulator contains the translation of the formula "all decls | formula"
526526
*/
@@ -556,7 +556,7 @@ private void all(Decls decls, Formula formula, int currentDecl, BooleanValue dec
556556
* @param decls formula declarations
557557
* @param formula the formula body
558558
* @param currentDecl currently processed declaration; should be 0 initially
559-
* @param declConstraints the constraints implied by the declarations; should be Boolean.TRUE intially
559+
* @param declConstraints the constraints implied by the declarations; should be Boolean.TRUE initially
560560
* @param acc the accumulator that contains the top level conjunction; should be an empty OR accumulator initially
561561
* @ensures the given accumulator contains the translation of the formula "some decls | formula"
562562
*/
@@ -953,7 +953,7 @@ public final Int visit(UnaryIntExpression intExpr) {
953953
* @param decls intexpr declarations
954954
* @param formula the formula body
955955
* @param currentDecl currently processed declaration; should be 0 initially
956-
* @param declConstraints the constraints implied by the declarations; should be Boolean.TRUE intially
956+
* @param declConstraints the constraints implied by the declarations; should be Boolean.TRUE initially
957957
* @param values integer values computed so far
958958
*/
959959
private final void sum(Decls decls, IntExpression expr, int currentDecl, BooleanValue declConstraints,

src/kodkod/engine/fol2sat/Skolemizer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ abstract class Skolemizer extends AbstractReplacer {
7878
* Skolemizes the given annotated formula using the given bounds and options. If
7979
* Options.trackFormulas is set and the formula is skolemizable, the resulting annotated
8080
* formula will contain transitive source information for each of its subformulas.
81-
* Specifically, let f be the returned annotated formula, t be a descendeant of f.node, and
81+
* Specifically, let f be the returned annotated formula, t be a descendant of f.node, and
8282
* s a descendant of annotated.node from which t was derived. Then,
8383
* f.source[t] = annotated.source[s]. If options.trackFormulas is false, no source
8484
* information will be recorded (i.e. f.source[t] = t for all descendants t of f).
@@ -157,7 +157,7 @@ private Skolemizer(AnnotatedNode<Formula> annotated, Bounds bounds, Options opti
157157
super(annotated.sharedNodes());
158158

159159
// only cache intermediate computations for expressions with no free variables
160-
// and formulas with no free variables and no quantified descendents
160+
// and formulas with no free variables and no quantified descendants
161161

162162
for(Node n: annotated.sharedNodes()) {
163163
final AbstractDetector fvdetect = annotated.freeVariableDetector();
@@ -274,7 +274,7 @@ public final Decls visit(Decls decls) {
274274
/**
275275
* Returns the binding for the given variable in the current replacement environment.
276276
* @return the binding for the given variable in the current replacement environment.
277-
* @throws UnboundLeafException variable not bound in teh replacement environment.
277+
* @throws UnboundLeafException variable not bound in the replacement environment.
278278
*/
279279
@Override
280280
public final Expression visit(Variable variable) {

src/kodkod/engine/fol2sat/SymmetryBreaker.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private static final BooleanValue leq(BooleanFactory f, List<BooleanValue> l0, L
259259
/**
260260
* Let t be the tuple represent by the given arity and tupleIndex.
261261
* This method returns the tuple index of the tuple t' such t'
262-
* is equal to t with each occurence of atomIndex0
262+
* is equal to t with each occurrence of atomIndex0
263263
* replaced by atomIndex1 and vice versa.
264264
* @return the index of the tuple to which the given symmetry
265265
* maps the tuple specified by arith and tupleIndex
@@ -318,7 +318,7 @@ public int compare(RelationPredicate o1, RelationPredicate o2) {
318318
* this.bounds.upperBound[acyclic.relation] is the cross product of some partition in this.symmetries with
319319
* itself. Assuming that this is the case, we then break symmetry on acyclic.relation using one of the methods
320320
* described in {@linkplain #breakMatrixSymmetries(Map, boolean)}; the method used depends
321-
* on the value of the "agressive" flag.
321+
* on the value of the "aggressive" flag.
322322
* The partition that formed the upper bound of acylic.relation is removed from this.symmetries.</p>
323323
*
324324
* @return null if symmetry cannot be broken on acyclic; otherwise returns a formula
@@ -370,13 +370,13 @@ private final Formula breakAcyclic(RelationPredicate.Acyclic acyclic, boolean ag
370370
* cross-multiplied with itself gives the upper bound of total.relation. Assuming that this is the case,
371371
* we then break symmetry on total.relation, total.first, total.last, and total.ordered using one of the methods
372372
* described in {@linkplain #breakMatrixSymmetries(Map, boolean)}; the method used depends
373-
* on the value of the "agressive" flag.
373+
* on the value of the "aggressive" flag.
374374
* The partition that formed the upper bound of total.ordered is removed from this.symmetries.</p>
375375
*
376376
* @return null if symmetry cannot be broken on total; otherwise returns a formula
377377
* f such that the meaning of total with respect to this.bounds is equivalent to the
378378
* meaning of f with respect to this.bounds'
379-
* @ensures this.symmetries and this.bounds are modified as desribed in {@linkplain #breakMatrixSymmetries(Map, boolean)}
379+
* @ensures this.symmetries and this.bounds are modified as described in {@linkplain #breakMatrixSymmetries(Map, boolean)}
380380
* iff total.first, total.last, and total.ordered have the same upper bound, which, when
381381
* cross-multiplied with itself gives the upper bound of total.relation
382382
*

src/kodkod/engine/fol2sat/SymmetryDetector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private void refinePartitions(IntSet set) {
247247
* Returns an IntSet that can store elements
248248
* in the range [0..size), and that holds
249249
* the given number.
250-
* @requries 0 <= num < size
250+
* @requires 0 <= num < size
251251
* @return {s: IntSet | s.ints = num }
252252
*/
253253
private static final IntSet oneOf(int size, int num) {

src/kodkod/engine/fol2sat/Translator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static BooleanMatrix evaluate(Expression expression,Instance instance, Op
104104
}
105105

106106
/**
107-
* Evalutes the given intexpression to an {@link kodkod.engine.bool.Int} using the provided instance and options.
107+
* Evaluates the given intexpression to an {@link kodkod.engine.bool.Int} using the provided instance and options.
108108
* @return an {@link kodkod.engine.bool.Int} representing the value of the intExpr with respect
109109
* to the specified instance and options.
110110
* @throws NullPointerException formula = null || instance = null || options = null
@@ -215,7 +215,7 @@ private static Translation.Incremental translateIncrementalTrivial(Formula formu
215215

216216
// add new relation bindings to the translation bounds. since the given bounds induce
217217
// a coarser set of symmetries on the universe than transl.symmetries, adding their (disjoint) bindings to tBounds
218-
// will not change the symmetries of tBounds. note that the ymmetries of tBounds refine transl.symmetries, and they
218+
// will not change the symmetries of tBounds. note that the symmetries of tBounds refine transl.symmetries, and they
219219
// may be strictly finer if some of the symmetries in transl.symmetries were broken via SymmetryBreaker.breakMatrixSymmetries(...)
220220
// during the generation of transl. in particular, any symmetries absent from tBounds are precisely those that were broken based
221221
// on the total ordering and acyclic predicates in transl.originalFormula.
@@ -481,7 +481,7 @@ public Formula visit(RelationPredicate pred) {
481481
* information for each of the subformulas of f.node. Specifically, let t be a subformula of f.node, and
482482
* s be a descdendent of annotated.node from which t was derived. Then, f.source[t] = annotated.source[s]. </p>
483483
* @requires simplified.keySet() in annotated.predicates()[RelationPredicate.NAME]
484-
* @requires no disj p, p': simplified.keySet() | simplified.get(p) = simplifed.get(p') // this must hold in order
484+
* @requires no disj p, p': simplified.keySet() | simplified.get(p) = simplified.get(p') // this must hold in order
485485
* to maintain the invariant that each subformula of the returned formula has exactly one source
486486
* @requires for each p in simplified.keySet(), the formulas "p and [[this.bounds]]" and
487487
* "simplified.get(p) and [[this.bounds]]" are equisatisfiable

src/kodkod/util/collections/Containers.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static final <T, E extends T> Iterator<T> iterate(final E... items) {
5656
* The iterator is backed by the given array. The contents
5757
* of the array are not modified by the iterator.
5858
* The returned iterator enumerates the items located between
59-
* indeces start, inclusive, and end, exclusive. If start < end,
59+
* indices start, inclusive, and end, exclusive. If start < end,
6060
* the elements are returned in the ascending order; otherwise,
6161
* they are returned in the descending order.
6262
* @throws NullPointerException items = null
@@ -189,7 +189,7 @@ public static final <T> T[] hashSort(T[] array) {
189189
* and reference equality.
190190
* The array must be sorted into ascending order according to the identity hashcodes of its elements
191191
* (as by {@link #identitySort(Object[])}) prior to making this call. If it is not sorted,
192-
* the results are undefined. If the array contains multiple occurences of the specified object,
192+
* the results are undefined. If the array contains multiple occurrences of the specified object,
193193
* there is no guarantee which one will be found.
194194
* @requires all i, j: [0..array.length) | i < j => array[i].hashCode() <= array[j].hashCode())
195195
* @return index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1).
@@ -231,7 +231,7 @@ else if (midIndex > index)
231231
* and object equality.
232232
* The array must be sorted into ascending order according to the hashcodes of its elements
233233
* (as by {@link #hashSort(Object[])}) prior to making this call. If it is not sorted,
234-
* the results are undefined. If the array contains multiple occurences of the specified object,
234+
* the results are undefined. If the array contains multiple occurrences of the specified object,
235235
* there is no guarantee which one will be found.
236236
* @requires all i, j: [0..array.length) | i < j => System.identityHashCode(array[i]) <= System.identityHashCode(array[j])
237237
* @return index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1).
@@ -334,7 +334,7 @@ private static abstract class ArrayIterator<T> implements Iterator<T> {
334334
* The iterator is backed by the given array. The contents
335335
* of the array are not modified by the iterator. The
336336
* constructed iterator returns the items located between the
337-
* indeces start, inclusive, and end, exclusive.
337+
* indices start, inclusive, and end, exclusive.
338338
* @requires items != null &&
339339
* start < end => end in [0..items.length] && start in [0..end],
340340
* start in [0..items.length) && end in [-1..start]

src/kodkod/util/nodes/AnnotatedNode.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public final N node() {
141141
}
142142

143143
/**
144-
* Returns the source of the the given descendant of this.node.
144+
* Returns the source of the given descendant of this.node.
145145
* @requires n in this.node.*components
146146
* @return this.source[n]
147147
*/
@@ -215,10 +215,10 @@ public final Map<RelationPredicate.Name, Set<RelationPredicate>> predicates() {
215215
}
216216

217217
/**
218-
* Returns a Detector that will return TRUE when applied to a descendent
219-
* of this.node iff the descendent contains a quantified formula.
220-
* @return a Detector that will return TRUE when applied to a descendent
221-
* of this.node iff the descendent contains a quantified formula.
218+
* Returns a Detector that will return TRUE when applied to a descendant
219+
* of this.node iff the descendant contains a quantified formula.
220+
* @return a Detector that will return TRUE when applied to a descendant
221+
* of this.node iff the descendant contains a quantified formula.
222222
*/
223223
public final AbstractDetector quantifiedFormulaDetector() {
224224
return new AbstractDetector(sharedNodes) {
@@ -229,10 +229,10 @@ public Boolean visit(QuantifiedFormula quantFormula) {
229229
}
230230

231231
/**
232-
* Returns a Detector that will return TRUE when applied to a descendent
233-
* of this.node iff the descendent contains a free variable.
234-
* @return a Detector that will return TRUE when applied to a descendent
235-
* of this.node iff the descendent contains a free variable.
232+
* Returns a Detector that will return TRUE when applied to a descendant
233+
* of this.node iff the descendant contains a free variable.
234+
* @return a Detector that will return TRUE when applied to a descendant
235+
* of this.node iff the descendant contains a free variable.
236236
*/
237237
public final AbstractDetector freeVariableDetector() {
238238
return new FreeVariableDetector(sharedNodes);
@@ -254,7 +254,7 @@ public String toString() {
254254
}
255255

256256
/**
257-
* Detects shared non-leaf descendents of a given node.
257+
* Detects shared non-leaf descendants of a given node.
258258
*
259259
* @specfield node: Node // node to which the analyzer is applied
260260
*/
@@ -383,7 +383,7 @@ private static final class PredicateCollector extends AbstractVoidVisitor {
383383
* if it is mapped to TRUE, it has been visited with negated=TRUE,
384384
* if it is mapped to null, it has been visited with both values of negated. */
385385
private final Map<Node,Boolean> visited;
386-
/* holds the top level predicates at the the end of the visit*/
386+
/* holds the top level predicates at the end of the visit*/
387387
final EnumMap<RelationPredicate.Name, Set<RelationPredicate>> preds;
388388
/**
389389
* Constructs a new collector.

0 commit comments

Comments
 (0)