tla 0.0.10-dev.80b1ac396 → 0.0.10-dev.85b8486e0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tla",
3
- "version": "0.0.10-dev.80b1ac396",
3
+ "version": "0.0.10-dev.85b8486e0",
4
4
  "description": "A TLA+ interpreter and model checker in TypeScript, 2× faster than TLC",
5
5
  "keywords": [
6
6
  "formal verification",
package/src/values.ts CHANGED
@@ -530,7 +530,7 @@ export const createWrittenRecord = (
530
530
  return setWrittenOrder(createSortedRecord(names, range), writtenNames);
531
531
  };
532
532
 
533
- // TLC's SetOfRcdsValue#member, SetOfFcnsValue#member and FcnRcdValue#toRcd normalize the record or function they check in place.
533
+ // TLC's SetOfRcdsValue#member, SetOfFcnsValue#member and FcnRcdValue#toRcd normalize the record or function they check in place, and compareTo and equals normalize both sides once they convert the other.
534
534
  const forgetOwnWrittenOrder = (value: Value) => {
535
535
  if (typeof value === "object" && value.kind === "Function") {
536
536
  value.writtenKeys = undefined;
@@ -1557,6 +1557,8 @@ const compareTlcFunctions = (
1557
1557
  if (isModelValue(right)) return compareModelValueWith(right, left, isEquality);
1558
1558
  throw createAttemptError(describeFunctionComparison, isEquality, left, right);
1559
1559
  }
1560
+ forgetOwnWrittenOrder(left);
1561
+ forgetOwnWrittenOrder(right);
1560
1562
  if (functionValue.range.length !== other.range.length)
1561
1563
  return functionValue.range.length - other.range.length;
1562
1564
  const compareRanges = () => compareElementsLikeTlc(functionValue.range, other.range, isEquality);
@@ -1621,6 +1623,7 @@ const compareFunctionLikeTlc = (
1621
1623
  if (isModelValue(right)) return compareModelValueWith(right, left, isEquality);
1622
1624
  throw createAttemptError(describeRecordComparison, isEquality, left, right);
1623
1625
  }
1626
+ forgetOwnWrittenOrder(left);
1624
1627
  return (
1625
1628
  functionValue.domain.length - record.domain.length ||
1626
1629
  compareElementsLikeTlc(functionValue.domain, record.domain, isEquality) ||