Repository navigation
Add pure tests for more operators with Java module overrides - #133
Merged
Merged
Conversation
Check the overrides exhaustively against pure TLA+ definitions over small inputs. Folds with an unspecified order are only compared on operators for which the order does not matter. Operators defined via CHOOSE are checked for membership in the set they choose from. [Tests] Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check the Java module overrides of 22 more operators exhaustively against pure TLA+ definitions over small inputs, as was done for
SelectInSubSeq/SelectLastInSubSeqin #132:SelectInSeq,SelectLastInSeq,Contains,IsPrefix,Suffixes,RemoveFirst,RemoveFirstMatch,FoldSeq,FoldLeft,FoldRight,FoldLeftDomain,FoldRightDomain,SetToSeqFoldSet, FunctionsFoldFunction/FoldFunctionOnSet, BagsExtFoldBag, BitwiseshiftR, DyadicRationalsReduce(viaAddandHalf, sinceReduceisLOCAL), IOUtilsatoi, SVGPointOnLine, VectorClocksCausalOrderFolds with an unspecified order are only compared on operators for which the order does not matter.
SetToSeqandCausalOrderare defined viaCHOOSE, so their results are checked for membership in the set they choose from.Not covered: operators whose TLA+ definitions are placeholders (
TRUEor an arbitraryCHOOSE), i.e. most of IOUtils, CSV, GraphViz, Statistics, and SVG, and the Json operators, which TLC's owntla2tools.jaroverrides.The tests sidestep two disagreements between overrides and their definitions:
PointOnLine: the override truncates towards zero whereas\divrounds down, so the results differ for negative coordinates, e.g.,x = 0tox = -1withsegment = 2gives0vs.-1. The test is restricted to non-negative coordinates.CausalOrder: the override fails withCannot cast FcnRcdValue to TupleValueon a sequence represented as a function, e.g.,[i \in 1..4 |-> ...]. The test passes tuple literals.