Validity prototype#2470
Open
MaxAtoms wants to merge 30 commits into
Open
Conversation
MaxAtoms
commented
May 5, 2026
| type Lift = typeof Scaled | typeof Unscaled | typeof Top | typeof Bottom; | ||
|
|
||
| // TODO Builder pattern in the DSL for the definition of finite taint lattices | ||
| export class ScaleDomain<Value extends Lift = Lift> extends AbstractDomain<Lift, Lift, typeof Top, typeof Bottom, Value> { |
Collaborator
Author
There was a problem hiding this comment.
Using the AbstractInterpretationVisitor has been fine so far. My biggest gripe is the need to define the type of concrete values and abstraction/concretization functions
…ramework-for-abstract-interpretation' into validity-prototype
MaxAtoms
commented
May 22, 2026
|
|
||
| export const predefinedTaintAnalyses = { | ||
| 'scale': scaleAnalysis, | ||
| } as const satisfies AnalysisMap<['scale']>; |
Collaborator
Author
There was a problem hiding this comment.
How can I actually make this type safe so that the key name has to be the same literal string as the Name of the respective TaintAnalysisDefinition<Name>?
Collaborator
Author
|
Plz roast when you find the time, @EagleoutIce 😇 |
EagleoutIce
reviewed
May 22, 2026
| } as const satisfies AnalysisMap<['scale']>; | ||
|
|
||
| type AnalysisMap<Defs extends readonly string[]> = { | ||
| [key in TaintAnalysisName<TaintAnalysisDefinition<Defs[number]>>]: TaintAnalysisDefinition<Defs[number]>; |
Member
There was a problem hiding this comment.
i think you can make it type safe here, if you reuse key on the rhs?
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.
I allowed myself to just experiment for a bit. It's a very crude untested prototype right now.
Demo available vianpm run taint-test.