1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:05:02 -07:00
go/pointer/TODO
Alan Donovan 65f2ef9ae3 go.tools/pointer: add runnable example.
Also: update TODO list.

R=crawshaw
CC=golang-dev
https://golang.org/cl/13622043
2013-09-09 12:25:25 -04:00

49 lines
1.9 KiB
Plaintext

-*- text -*-
Pointer analysis to-do list
===========================
CONSTRAINT GENERATION:
- support reflection
- implement native intrinsics. These vary by platform.
- unsafe.Pointer conversions. Three options:
1) unsoundly (but type-safely) treat p=unsafe.Pointer(x) conversions as
allocations, losing aliases. This is what's currently implemented.
2) unsoundly (but type-safely) treat p=unsafe.Pointer(x) and T(p)
conversions as interface boxing and unboxing operations.
This may preserve some aliasing relations at little cost.
3) soundly track physical field offsets. (Summarise dannyb's email here.)
A downside is that we can't keep the identity field of struct
allocations that identifies the object.
PRESOLVER OPTIMISATIONS
- use HVN, HRU, LE, PE, HCD, LCD.
SOLVER:
- use BDDs and/or sparse bitvectors for ptsets
- use sparse bitvectors for graph edges
- use BDD-based relational composition for e.g. offset computations.
- experiment with different worklist algorithms:
priority queue (solver visit-time order)
red-black tree (node id order)
double-ended queue (insertion order)
fast doubly-linked list (See Zhanh et al PLDI'13)
(insertion order with fast membership test)
dannyb recommends sparse bitmap.
API:
- Rely less on callbacks and more on a 'result' type
returned by Analyze().
- Abstract the callgraph into a pure interface so that
we can provide other implementations in future (e.g. RTA-based).
Also provide the option to eliminate context-sensitivity
in a callgraph to yield a smaller (less precise) callgraph.
- Some optimisations (e.g. LE, PE) may change the API.
Think about them sooner rather than later.
- Eliminate Print probe now that we can query specific ssa.Values.
Misc:
- os.Args should point to something; currently they don't.
- Test on all platforms.
Currently we assume these go/build tags: linux, amd64, !cgo.