LinqLover / SimulationStudio

A growing suite of applications and tools using code simulation in Squeak/Smalltalk
9 stars 1 forks source link

Add SimulationMethodFinder #61

Closed LinqLover closed 2 years ago

LinqLover commented 2 years ago

SimulationMethodFinder:

I am a variation of Squeak's traditional MethodFinder that finds all methods for a given set of inputs to match a given output. However, instead of a hardcoded allow-list of selectors, I consider arbitrary messages in the image by evaluating them safely in a SimulationStudio Sandbox. Additionally, I provide a number of advanced configuration options such as reordering arguments (permutationMode), limiting the class hierarchy for search (outerSuperclass), using a predicate or block instead of a constant value for matching message send results (searchMode), and searching in multiple steps (isCompositeSearch) for constructing complex expressions. I also provide some progress variables to support concurrent progress indication.

SimulationMethodFinderTool:

I provide the user interface for a SimulationMethodFinder. I'm a very rough complement of Squeak's traditional SelectorBrowser, but offer more configuration options, run searches asynchronously, and display results incrementally together with some progress indication.

Simulation Method Finder (#toCamelCase) Simulation Method Finder (#pairsDo) Simulation Method Finder (recursive)