You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sverweij/dependency-cruiser#336 is the closest I could find to what I need, more complex than eslint but not designed for unit tests.
Example: KeyHasher must store non-primitive keys weakly. Truly verifying that would require analysis of an abstract syntax tree (AST), trying to trace an entry point (an argument in one function) to points that assign or store a value. I could see that requiring a few things, of which I only know I need the first three:
An Acorn-generated AST.
Maybe a tree-walking tool to invoke traps for certain AST node types.
An entry tuple to pass in and start the analysis, looking for any assignment or storage which returned false for a rejected state (meaning a strong reference).
A composite set for assignment and storage nodes, with test functions returning true ("accept"), false ("reject") or undefined (for "unknown, dig deeper").
A composite set of tree nodes representing arguments and return / throw values from one function to another.
A "non-deterministic finite automation" (also known as a state machine) combining the previous two sets and a starting point.
Because of the changing nature of this and/or stack traces, the automaton might need to become a "push-down automaton", which is just lovely for the added complexity.
Crafting this would be ugly, but the composite collections I'm building could make it easier, ironically enough.
Honestly, the complexity of this type of analysis could result in a complementary project, where each one uses the other as a development dependency...
The text was updated successfully, but these errors were encountered:
... which is a hairy problem in and of itself.
sverweij/dependency-cruiser#336 is the closest I could find to what I need, more complex than eslint but not designed for unit tests.
Example: KeyHasher must store non-primitive keys weakly. Truly verifying that would require analysis of an abstract syntax tree (AST), trying to trace an entry point (an argument in one function) to points that assign or store a value. I could see that requiring a few things, of which I only know I need the first three:
this
and/or stack traces, the automaton might need to become a "push-down automaton", which is just lovely for the added complexity.Crafting this would be ugly, but the composite collections I'm building could make it easier, ironically enough.
Honestly, the complexity of this type of analysis could result in a complementary project, where each one uses the other as a development dependency...
The text was updated successfully, but these errors were encountered: