Skip to content

Commit c12d272

Browse files
committed
apply a spell check for documentation and comments in source code.
1 parent fcde308 commit c12d272

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+97
-98
lines changed

src/org/sosy_lab/java_smt/SolverContextFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public SolverContextFactory(
121121

122122
/**
123123
* This constructor instantiates a factory for building solver contexts for a configured SMT
124-
* solver (via the parameter <code>pConfig</code>). Each created context is independent from other
124+
* solver (via the parameter <code>pConfig</code>). Each created context is independent of other
125125
* contexts and uses its own environment for building formulas and querying the solver.
126126
*
127127
* @param pConfig The configuration to be used when instantiating JavaSMT and the solvers. By

src/org/sosy_lab/java_smt/api/BasicProverEnvironment.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ boolean isUnsatWithAssumptions(Collection<BooleanFormula> assumptions)
6262
/**
6363
* Get a satisfying assignment. This should be called only immediately after an {@link #isUnsat()}
6464
* call that returned <code>false</code>. A model might contain additional symbols with their
65-
* evaluation, if a solver uses its own temporary symbols. There should be at least an
65+
* evaluation, if a solver uses its own temporary symbols. There should be at least a
6666
* value-assignment for each free symbol.
6767
*/
6868
Model getModel() throws SolverException;
@@ -106,8 +106,8 @@ Optional<List<BooleanFormula>> unsatCoreOverAssumptions(Collection<BooleanFormul
106106
void close();
107107

108108
/**
109-
* Get all satisfying assignments of the current environment with regards to a subset of terms,
110-
* and create a region representing all those models.
109+
* Get all satisfying assignments of the current environment with regard to a subset of terms, and
110+
* create a region representing all those models.
111111
*
112112
* @param important A set of (positive) variables appearing in the asserted queries. Only these
113113
* variables will appear in the region.
@@ -129,12 +129,12 @@ interface AllSatCallback<R> {
129129
* otherwise it is negated.
130130
*
131131
* <p>There is no guarantee that the list of model values corresponds to the list in {@link
132-
* BasicProverEnvironment#allSat}. We can reorder the variables or leave out values with an
132+
* BasicProverEnvironment#allSat}. We can reorder the variables or leave out values with a
133133
* freely chosen value.
134134
*/
135135
void apply(List<BooleanFormula> model);
136136

137-
/** Returning the result generated after all the {@link #apply} calls have went through. */
137+
/** Returning the result generated after all the {@link #apply} calls went through. */
138138
R getResult() throws InterruptedException;
139139
}
140140
}

src/org/sosy_lab/java_smt/api/BitvectorFormulaManager.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ BooleanFormula greaterOrEquals(
125125

126126
/**
127127
* @param number The bitvector to extract.
128-
* @param msb Upper index. Must be greater then or equal to 0 and less then the bit-width of
128+
* @param msb Upper index. Must be greater than or equal to 0 and less than the bit-width of
129129
* number.
130-
* @param lsb Lower index. Must be less then or equal to msb and greater or equal to 0.
130+
* @param lsb Lower index. Must be less than or equal to msb and greater or equal to 0.
131131
* @param signed Whether the extension should depend on the sign bit. Note: Some SMT-Solvers
132132
* ignore this. (i.e. Boolector)
133133
*/

src/org/sosy_lab/java_smt/api/BooleanFormulaManager.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ default BooleanFormula makeBoolean(boolean value) {
142142
* and thus is not prone to StackOverflowErrors.
143143
*
144144
* <p>Furthermore, this method also guarantees that every equal part of the formula is visited
145-
* only once. Thus it can be used to traverse DAG-like formulas efficiently.
145+
* only once. Thus, it can be used to traverse DAG-like formulas efficiently.
146146
*/
147147
void visitRecursively(BooleanFormula f, BooleanFormulaVisitor<TraversalProcess> rFormulaVisitor);
148148

@@ -154,7 +154,7 @@ default BooleanFormula makeBoolean(boolean value) {
154154
* and thus is not prone to StackOverflowErrors.
155155
*
156156
* <p>Furthermore, this method also guarantees that every equal part of the formula is visited
157-
* only once. Thus it can be used to traverse DAG-like formulas efficiently.
157+
* only once. Thus, it can be used to traverse DAG-like formulas efficiently.
158158
*/
159159
BooleanFormula transformRecursively(
160160
BooleanFormula f, BooleanFormulaTransformationVisitor pVisitor);

src/org/sosy_lab/java_smt/api/FloatingPointFormulaManager.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <T extends Formula> T castTo(
7676
*
7777
* @param source the source formula of compatible type
7878
* @param signed if a {@link BitvectorFormula} is given as source, we additionally use this flag.
79-
* Otherwise we ignore it.
79+
* Otherwise, we ignore it.
8080
* @param targetType the type of the resulting formula
8181
* @throws IllegalArgumentException if an incompatible type is used, e.g. a {@link BooleanFormula}
8282
* cannot be cast to {@link FloatingPointFormula}.
@@ -93,7 +93,7 @@ <T extends Formula> T castTo(
9393
*
9494
* @param source the source formula of compatible type
9595
* @param signed if a {@link BitvectorFormula} is given as source, we additionally use this flag.
96-
* Otherwise we ignore it.
96+
* Otherwise, we ignore it.
9797
* @param targetType the type of the resulting formula
9898
* @param pFloatingPointRoundingMode if rounding is needed, we apply the rounding mode.
9999
* @throws IllegalArgumentException if an incompatible type is used, e.g. a {@link BooleanFormula}

src/org/sosy_lab/java_smt/api/Formula.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface Formula {
2020
*
2121
* <p>We do not guarantee that the returned String is in any way related to the formula. The
2222
* solver might apply escaping or even un-escaping. A user should not use the returned String for
23-
* further processing. For analyzing formulas, we recommend to use a {@link FormulaVisitor}.
23+
* further processing. For analyzing formulas, we recommend using a {@link FormulaVisitor}.
2424
*/
2525
@Override
2626
String toString();

src/org/sosy_lab/java_smt/api/FormulaManager.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ <T extends Formula> T makeApplication(
167167
*
168168
* <p>Please be aware that calling this method might cause extensive stack usage depending on the
169169
* nesting of the given formula and the given {@link FormulaVisitor}. Additionally, sub-formulas
170-
* that are used several times in the formula might be visited several times. For a efficient
170+
* that are used several times in the formula might be visited several times. For an efficient
171171
* formula traversing, we also provide {@link #visitRecursively(Formula, FormulaVisitor)}.
172172
*
173173
* @param f formula to be visited
@@ -185,7 +185,7 @@ <T extends Formula> T makeApplication(
185185
* and thus is not prone to StackOverflowErrors.
186186
*
187187
* <p>Furthermore, this method also guarantees that every equal part of the formula is visited
188-
* only once. Thus it can be used to traverse DAG-like formulas efficiently.
188+
* only once. Thus, it can be used to traverse DAG-like formulas efficiently.
189189
*/
190190
void visitRecursively(Formula f, FormulaVisitor<TraversalProcess> rFormulaVisitor);
191191

@@ -196,7 +196,7 @@ <T extends Formula> T makeApplication(
196196
* and thus is not prone to StackOverflowErrors.
197197
*
198198
* <p>Furthermore, this method also guarantees that every equal part of the formula is visited
199-
* only once. Thus it can be used to traverse DAG-like formulas efficiently.
199+
* only once. Thus, it can be used to traverse DAG-like formulas efficiently.
200200
*
201201
* @param pFormulaVisitor Transformation described by the user.
202202
*/
@@ -253,10 +253,10 @@ <T extends Formula> T makeApplication(
253253
* possible not use logical or mathematical operators, or keywords strongly depending on SMTlib.
254254
*
255255
* <p>If a variable name is rejected, a possibility is escaping, e.g. either substituting the
256-
* whole variable name or just every invalid character with an escaped form. We recommend to use
257-
* an escape sequence based on the token "JAVASMT", because it might be unusual enough to appear
258-
* when encoding a user's problem in SMT. Please not that you might also have to handle escaping
259-
* the escape sequence. Examples:
256+
* whole variable name or just every invalid character with an escaped form. We recommend using an
257+
* escape sequence based on the token "JAVASMT", because it might be unusual enough to appear when
258+
* encoding a user's problem in SMT. Please note that you might also have to handle escaping the
259+
* escape sequence. Examples:
260260
*
261261
* <ul>
262262
* <li>the invalid variable name <code>"="</code> (logical operator for equality) can be

src/org/sosy_lab/java_smt/api/Model.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public interface Model extends Iterable<ValueAssignment>, AutoCloseable {
5353
*
5454
* @param f Input formula
5555
* @return Either of: - Number (Rational/Double/BigInteger/Long/Integer) - Boolean
56-
* @throws IllegalArgumentException if a formula has unexpected type, e.g Array.
56+
* @throws IllegalArgumentException if a formula has unexpected type, e.g. Array.
5757
*/
5858
@Nullable
5959
Object evaluate(Formula f);
@@ -123,7 +123,7 @@ final class ValueAssignment {
123123
*
124124
* <p>For arrays we use the selection-statement with an index. We do not support Array theory as
125125
* {@link #value} during a model evaluation, but we provide assignments like <code>
126-
* select(arr, 12) := 34</code> (where <code>arr</code> itself is a plain symbol (without an
126+
* select(arr, 12) := 34</code> where <code>arr</code> itself is a plain symbol (without an
127127
* explicit const- or zero-based initialization, as done by some SMT solvers).
128128
*/
129129
private final Formula keyFormula;

src/org/sosy_lab/java_smt/api/OptimizationProverEnvironment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public interface OptimizationProverEnvironment extends BasicProverEnvironment<Vo
6464
* (epsilon can even be set to zero). The model can return the assignment x=9. To get an optimal
6565
* assignment, query the solver with an additional constraint 'x == 10-epsilon'.
6666
*
67-
* <p>Example 2: For the constraint 'x&lt;10' with a integer x, the upper bound of x is '9'
67+
* <p>Example 2: For the constraint 'x&lt;10' with an integer x, the upper bound of x is '9'
6868
* (epsilon is irrelevant here and can be zero). The model returns the optimal assignment x=9.
6969
*/
7070
@Override

src/org/sosy_lab/java_smt/api/ProverEnvironment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
* <p>All solving methods are expected to throw {@link SolverException} if the solver fails to solve
2020
* the given query, and {@link InterruptedException} if a thread interrupt was requested or a
2121
* shutdown request via the {@link ShutdownNotifier}. It is not guaranteed, though, that solvers
22-
* respond in a timely manner (or at all) to shutdown or interrupt requests.
22+
* respond in a timely manner (or at all) to shut down or interrupt requests.
2323
*/
2424
public interface ProverEnvironment extends BasicProverEnvironment<Void> {}

src/org/sosy_lab/java_smt/api/SolverContext.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,27 @@ enum ProverOptions {
5959
* Create a fresh new {@link ProverEnvironment} which encapsulates an assertion stack and can be
6060
* used to check formulas for unsatisfiability.
6161
*
62-
* @param options Options specified for the prover environment. All of the options specified in
62+
* @param options Options specified for the prover environment. All the options specified in
6363
* {@link ProverOptions} are turned off by default.
6464
*/
6565
ProverEnvironment newProverEnvironment(ProverOptions... options);
6666

6767
/**
6868
* Create a fresh new {@link InterpolatingProverEnvironment} which encapsulates an assertion stack
69-
* and allows to generate and retrieve interpolants for unsatisfiable formulas. If the SMT solver
69+
* and allows generating and retrieve interpolants for unsatisfiable formulas. If the SMT solver
7070
* is able to handle satisfiability tests with assumptions please consider implementing the {@link
7171
* InterpolatingProverEnvironment} interface, and return an Object of this type here.
7272
*
73-
* @param options Options specified for the prover environment. All of the options specified in
73+
* @param options Options specified for the prover environment. All the options specified in
7474
* {@link ProverOptions} are turned off by default.
7575
*/
7676
InterpolatingProverEnvironment<?> newProverEnvironmentWithInterpolation(ProverOptions... options);
7777

7878
/**
7979
* Create a fresh new {@link OptimizationProverEnvironment} which encapsulates an assertion stack
80-
* and allows to solve optimization queries.
80+
* and allows solving optimization queries.
8181
*
82-
* @param options Options specified for the prover environment. All of the options specified in
82+
* @param options Options specified for the prover environment. All the options specified in
8383
* {@link ProverOptions} are turned off by default.
8484
*/
8585
OptimizationProverEnvironment newOptimizationProverEnvironment(ProverOptions... options);
@@ -103,9 +103,9 @@ enum ProverOptions {
103103
* Close the solver context.
104104
*
105105
* <p>After calling this method, further access to any object that had been returned from this
106-
* context is not wanted, i.e., it is depending on the solver. Java-based solvers might wait for
107-
* the next garbage collection with any cleanup operation. Native solvers might even reference
108-
* invalid memory and cause segmentation faults.
106+
* context is not wanted, i.e., it depends on the solver. Java-based solvers might wait for the
107+
* next garbage collection with any cleanup operation. Native solvers might even reference invalid
108+
* memory and cause segmentation faults.
109109
*
110110
* <p>Necessary for the solvers implemented in native code, frees the associated memory.
111111
*/

src/org/sosy_lab/java_smt/api/visitors/FormulaVisitor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public interface FormulaVisitor<R> {
5050
* @param f Formula representing the constant.
5151
* @param value The value of the constant. It is either of type {@link Boolean} or of a subtype of
5252
* {@link Number}, mostly a {@link BigInteger}, a {@link BigDecimal}, or a {@link Rational}.
53-
* @return An arbitrary return value that is be passed to the caller.
53+
* @return An arbitrary return value that is passed to the caller.
5454
*/
5555
R visitConstant(Formula f, Object value);
5656

src/org/sosy_lab/java_smt/basicimpl/AbstractFormulaManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public abstract class AbstractFormulaManager<TFormulaInfo, TType, TEnv, TFuncDec
8888

8989
/** Mapping of disallowed char to their escaped counterparts. */
9090
/* Keep this map in sync with {@link #DISALLOWED_CHARACTERS}.
91-
* Counterparts can be any unique string. For optimization we could even use plain chars. */
91+
* Counterparts can be any unique string. For optimization, we could even use plain chars. */
9292
@VisibleForTesting
9393
public static final ImmutableBiMap<Character, String> DISALLOWED_CHARACTER_REPLACEMENT =
9494
ImmutableBiMap.<Character, String>builder().put('|', "pipe").put('\\', "backslash").build();

src/org/sosy_lab/java_smt/basicimpl/AbstractProverWithAllSat.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.sosy_lab.java_smt.api.SolverException;
2323

2424
/**
25-
* This class is an utility-class to avoid repeated implementation of a the AllSAT computation.
25+
* This class is a utility-class to avoid repeated implementation of the AllSAT computation.
2626
*
2727
* <p>If a solver does not support direct AllSAT computation, please inherit from this class.
2828
*/
@@ -100,7 +100,7 @@ private <R> void iterateOverAllModels(
100100

101101
/**
102102
* This method computes all satisfiable assignments for the given predicates by (recursively)
103-
* traversing the decision tree over the given variables. The ordering of variables is fixed and
103+
* traversing the decision tree over the given variables. The ordering of variables is fixed, and
104104
* we can only ignore unsatisfiable subtrees.
105105
*
106106
* <p>In contrast to {@link #iterateOverAllModels} we do not use model generation here, which is a

src/org/sosy_lab/java_smt/basicimpl/AbstractSolverContext.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected abstract OptimizationProverEnvironment newOptimizationProverEnvironmen
8787
* methods. This class will wrap the prover environments and provide an implementation of the
8888
* feature.
8989
*
90-
* <p>This method is expected to always return the same value. Otherwise the behavior of this
90+
* <p>This method is expected to always return the same value. Otherwise, the behavior of this
9191
* class is undefined.
9292
*/
9393
protected abstract boolean supportsAssumptionSolving();
@@ -105,15 +105,15 @@ private static Set<ProverOptions> toSet(ProverOptions... options) {
105105
* two lists of libraries can be used to differ between libraries specific to Unix/Linux and
106106
* Windows.
107107
*
108-
* <p>If the first try a aborts after a few steps, we do not cleanup partially loaded libraries,
108+
* <p>If the first try aborts after a few steps, we do not clean up partially loaded libraries,
109109
* but directly start the second try.
110110
*
111111
* <p>Each list is applied in the given ordering.
112112
*
113113
* @param loader the loading mechanism that will be used for loading each single library.
114114
* @param librariesForFirstTry list of library names that will be loaded, if possible.
115115
* @param librariesForSecondTry list of library names that will be loaded, after the first attempt
116-
* (using librariesForFirstTry} has failed.
116+
* (using librariesForFirstTry) has failed.
117117
* @throws UnsatisfiedLinkError if neither the first nor second try returned a successful loading
118118
* process.
119119
*/

src/org/sosy_lab/java_smt/basicimpl/FormulaCreator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public TFuncDecl getBooleanVarDeclaration(BooleanFormula var) {
403403
* Convert the formula into a Java object as far as possible, i.e., try to match a primitive or
404404
* simple type like Boolean, BigInteger, or Rational.
405405
*
406-
* <p>If the formula is not a simple constant expression, we simple return <code>null</code>.
406+
* <p>If the formula is not a simple constant expression, we simply return <code>null</code>.
407407
*
408408
* @param pF the formula to be converted.
409409
*/

src/org/sosy_lab/java_smt/basicimpl/FormulaTransformationVisitorImpl.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ public Void visitFunction(
8282
// of the function were already processed.
8383
if (allArgumentsTransformed) {
8484

85-
// Create an processed version of the
86-
// function application.
85+
// Create a processed version of the function application.
8786
if (!toProcess.isEmpty()) {
8887
toProcess.pop();
8988
}

src/org/sosy_lab/java_smt/basicimpl/ShutdownHook.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void shutdownRequested(@Nullable String reasonUnused) {
4141
while (isActiveHook.get()) { // flag is reset in #cancelHook
4242
interruptCall.run();
4343
try {
44-
Thread.sleep(10); // lets wait a few steps
44+
Thread.sleep(10); // let's wait a few steps
4545
} catch (InterruptedException e) {
4646
// ignore
4747
}

src/org/sosy_lab/java_smt/basicimpl/withAssumptionsWrapper/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Wrapper-classes to guarantee identical behavior for all solvers. If a solver does not support
1111
* {@link org.sosy_lab.java_smt.api.BasicProverEnvironment#isUnsatWithAssumptions}, we wrap it in a
1212
* (subclass of) BasicProverWithAssumptionsWrapper, whose task it is to keep the assumptions as long
13-
* on the solver's stack as no other operation accesses it. It allows to compute interpolants and
13+
* on the solver's stack as no other operation accesses it. It allows computing interpolants and
1414
* unsat cores. without direct support from the solver.
1515
*/
1616
package org.sosy_lab.java_smt.basicimpl.withAssumptionsWrapper;

src/org/sosy_lab/java_smt/example/OptimizationIntReal.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private static void printUpperAndLowerBound(
140140
prover.pop();
141141

142142
prover.push();
143-
{ // maximize x and get a upper bound of x: x < 10
143+
{ // maximize x and get an upper bound of x: x < 10
144144
// --> bound is (10 - EPSILON) for rational symbols and 9 for integer symbols.
145145
int handleX = prover.maximize(x);
146146
OptStatus status = prover.check();

src/org/sosy_lab/java_smt/example/SolverOverviewTable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public static class SolverInfo {
204204
private final String solverFeatures;
205205

206206
/**
207-
* Saves the information of an solver.
207+
* Saves the information of a solver.
208208
*
209209
* @param solver Solvers enum object for a solver.
210210
* @param solverVersion Solver version String.

src/org/sosy_lab/java_smt/solvers/boolector/BoolectorFormulaCreator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
public class BoolectorFormulaCreator extends FormulaCreator<Long, Long, Long, Long> {
3636

37-
// Boolector can give back 'x' for a arbitrary value that we change to this
37+
// Boolector can give back 'x' for an arbitrary value that we change to this
3838
private static final char ARBITRARY_VALUE = '1';
3939

4040
/** Maps a name and a variable or function type to a concrete formula node. */
@@ -164,8 +164,8 @@ public Long makeVariable(Long type, String varName) {
164164
return newVar;
165165
}
166166

167-
// This method is a massive problem... you CANT get the value formulas(nodes) because they are
168-
// only build and used internally in boolector. (See visit1 for help)
167+
// This method is a massive problem... you CAN'T get the value formulas(nodes) because they are
168+
// only build and used internally in Boolector. (See visit1 for help)
169169
@Override
170170
public <R> R visit(FormulaVisitor<R> visitor, Formula formula, Long f) {
171171
throw new UnsupportedOperationException(

0 commit comments

Comments
 (0)