Skip to content

Commit

Permalink
Fix typos (#89)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Bronnikov <estetus@gmail.com>
  • Loading branch information
ligurio authored Oct 2, 2023
1 parent f070b68 commit 5a39d5c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<!-- Test if trace expressions involving the ShiViz module work correctly. -->
<!-- This test expects TLC to report a liveness violation, which is why -->
<!-- failonerror is off. Instead, ant records TLC's return value in -->
<!-- shiviz.return.value, which is cheked in the conditional below. -->
<!-- shiviz.return.value, which is checked in the conditional below. -->
<java classname="tlc2.TLC" fork="true" failonerror="false" resultproperty="shiviz.return.value">
<!-- Tell Java to use a garbage collector which makes TLC happy. -->
<jvmarg value="-XX:+UseParallelGC"/>
Expand Down
2 changes: 1 addition & 1 deletion modules/ShiViz.tla
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ INSTANCE Toolbox
\* Host below is different to the action predicate
\* CHOOSE p \in DOMAIN pc : pc[p] # pc'[p]
\* since Host evaluates for states n and n - 1
\* whereas the CHOOSE evalutes for states n and n + 1.
\* whereas the CHOOSE evaluates for states n and n + 1.
\* This difference is most easily observed by looking
\* at off-by-one difference of the initial state.
LOCAL FnHost ==
Expand Down
14 changes: 7 additions & 7 deletions modules/tlc2/overrides/IOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public synchronized static Value textSerialize(final Tool tool, final ExprOrOpAr
final TLCState s0, final TLCState s1, final int control, final CostModel cm) {

final String msgInvalidParam = "Serialize error invalid parameters: ";
final String successmsg = "Finish writting to the file with success!";
final String successmsg = "Finish writing to the file with success!";

final RecordValue opts;

Expand Down Expand Up @@ -142,7 +142,7 @@ public synchronized static Value textSerialize(final Tool tool, final ExprOrOpAr
return new RecordValue(EXEC_NAMES, new Value[] { IntValue.ValZero, new StringValue(successmsg), new StringValue("") }, false);

} catch(Exception e) {
final StringValue errormsg = new StringValue("Serialize error writting to the file: "+e.toString());
final StringValue errormsg = new StringValue("Serialize error writing to the file: "+e.toString());
return new RecordValue(EXEC_NAMES, new Value[] { IntValue.ValOne, new StringValue(""), errormsg }, false);
}
}
Expand Down Expand Up @@ -249,7 +249,7 @@ public static Value ioEnv() throws IOException, InterruptedException {

@TLAPlusOperator(identifier = "IOExec", module = "IOUtils", minLevel = 1, warn = false)
public static Value ioExec(final Value parameter) throws IOException, InterruptedException {
// 1. Check parameters and covert.
// 1. Check parameters and convert.
if (!(parameter instanceof TupleValue)) {
throw new EvalException(EC.TLC_MODULE_ONE_ARGUMENT_ERROR,
new String[] { "IOExec", "sequence", Values.ppr(parameter.toString()) });
Expand All @@ -267,7 +267,7 @@ public static Value ioExec(final Value parameter) throws IOException, Interrupte

@TLAPlusOperator(identifier = "IOEnvExec", module = "IOUtils", minLevel = 1, warn = false)
public static Value ioEnvExec(final Value env, final Value parameter) throws IOException, InterruptedException {
// Check env and parameters and covert.
// Check env and parameters and convert.
final RecordValue environment = (RecordValue) env.toRcd();
if (environment == null) {
throw new EvalException(EC.TLC_MODULE_ONE_ARGUMENT_ERROR,
Expand All @@ -290,7 +290,7 @@ public static Value ioEnvExec(final Value env, final Value parameter) throws IOE

@TLAPlusOperator(identifier = "IOExecTemplate", module = "IOUtils", minLevel = 1, warn = false)
public static Value ioExecTemplate(final Value commandTemplate, final Value parameter) throws IOException, InterruptedException {
// 1. Check parameters and covert.
// 1. Check parameters and convert.
if (!(commandTemplate instanceof TupleValue)) {
throw new EvalException(EC.TLC_MODULE_ONE_ARGUMENT_ERROR,
new String[] { "IOExecTemplate", "sequence", Values.ppr(commandTemplate.toString()) });
Expand All @@ -316,13 +316,13 @@ public static Value ioExecTemplate(final Value commandTemplate, final Value para

@TLAPlusOperator(identifier = "IOEnvExecTemplate", module = "IOUtils", minLevel = 1, warn = false)
public static Value ioEnvExecTemplate(final Value env, final Value commandTemplate, final Value parameter) throws IOException, InterruptedException {
// Check env and parameters and covert.
// Check env and parameters and convert.
final RecordValue environment = (RecordValue) env.toRcd();
if (environment == null) {
throw new EvalException(EC.TLC_MODULE_ONE_ARGUMENT_ERROR,
new String[] { "IOEnvExecTemplate", "record", Values.ppr(env.toString()) });
}
// 1. Check parameters and covert.
// 1. Check parameters and convert.
if (!(commandTemplate instanceof TupleValue)) {
throw new EvalException(EC.TLC_MODULE_ONE_ARGUMENT_ERROR,
new String[] { "IOEnvExecTemplate", "sequence", Values.ppr(commandTemplate.toString()) });
Expand Down
2 changes: 1 addition & 1 deletion tests/SequencesExtTests.tla
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ ASSUME(ReplaceAllSubSeqs("\t", "%%", "Properly escape the %% char") = "Properly
ASSUME(ReplaceAllSubSeqs("\f", "%%", "Properly escape the %% char") = "Properly escape the \f char")
ASSUME(ReplaceAllSubSeqs("\r", "%%", "Properly escape the %% char") = "Properly escape the \r char")

ASSUME AssertEq(ReplaceAllSubSeqs("replaces", "%pattern%", "This %pattern% the pattern %pattern% multipe times"), "This replaces the pattern replaces multipe times")
ASSUME AssertEq(ReplaceAllSubSeqs("replaces", "%pattern%", "This %pattern% the pattern %pattern% multiple times"), "This replaces the pattern replaces multiple times")
ASSUME AssertEq(ReplaceAllSubSeqs("\\\\", "\\", "Properly escape the \\quotes"), "Properly escape the \\\\quotes")


Expand Down

0 comments on commit 5a39d5c

Please sign in to comment.