Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Abstract Domains, III] Resolve Constant Aliases #1106

Closed
EagleoutIce opened this issue Oct 25, 2024 · 0 comments · Fixed by #1201
Closed

[Abstract Domains, III] Resolve Constant Aliases #1106

EagleoutIce opened this issue Oct 25, 2024 · 0 comments · Fixed by #1201
Assignees
Labels
abstract interpretation Related to abstract interpretation enhancement New feature or request test Relates to tests specifically

Comments

@EagleoutIce
Copy link
Member

We can handle if(TRUE) and if(FALSE) (see #1102) and in theory we can handle everything that in any way resolves to a built-in alias. But now we want to improve the verification for this process by improving the support for aliases in a few small incremental steps:

  1. Verify that we can handle cases like x <- TRUE; if(x) ... which should work by transitivity.
    For this we probably want a small set of systematic tests (as first introduced by [Abstract Domains, II] Improve Dead-Code Identification #1102, although
    slicing tests or subgraph dataflow tests may be sufficient for this)!
  2. Doing this for built in constants alone is boring (albeit effective), we want to add support for
    the resolving of constant values as in: v <- 1; print(v) - we want a function like
    resolveValue which computes v = 1 when queries at print(v).
  3. Of course, the alias tracking should be tested! For this you may even check out a new label capability (see [Doc] Explain flowR test labels #1104) for the tracking of values (and maybe even cover loops, function calls, ... as extra capabilities)!
@EagleoutIce EagleoutIce added enhancement New feature or request test Relates to tests specifically abstract interpretation Related to abstract interpretation labels Oct 25, 2024
@EagleoutIce EagleoutIce added this to the Abstract Domains milestone Oct 25, 2024
gigalasr added a commit that referenced this issue Dec 5, 2024
gigalasr added a commit that referenced this issue Dec 5, 2024
@gigalasr gigalasr linked a pull request Dec 5, 2024 that will close this issue
gigalasr added a commit that referenced this issue Dec 17, 2024
EagleoutIce added a commit that referenced this issue Dec 23, 2024
* test(cf): add simple test for alias tracking (#1106)

* feat(df): first draft of aliasTracking (#1106)

* feat(at): field for possible values  (#1106)

* lint(at): fix linting errors  (#1106)

* lint(at): fix linting errors  (#1106)

* feat-fix(alias): make simple case work (#1106)

* feat(alias): use alias tracking in if-then-else (#1106)

* test-fix(alias): correct tests (#1106)

* feat-fix(alias): return undefined if no defs found (#1106)

* lint(alias): fix linting errors (#1106)

* feat-fix(alias): make value optional (#1106)

* refactor(alias): start with set instead of array (#1106)

* refactor(alias): map form vertextype to handler (#1106)

* lint(alias): run linter (#1106)

* feat-fix(alias): dont use .values (#1106)

* feat(alias): add config switch for alias tracking (#1106)

* refactor(alias): use each sytnax in test (#1106)

* lint(alias): lint local

* test(alias): add 2 new test cases (#1106)

* dep-fix: determinism in nanoid

* refactor: some minor fixes to partial unknown constant resolve and docs

* refactor: replace `.forEach` with loop

* refactor: replace tsdoc

---------

Co-authored-by: Florian Sihler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abstract interpretation Related to abstract interpretation enhancement New feature or request test Relates to tests specifically
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants