summaryrefslogtreecommitdiff
path: root/docs/TODO
blob: 558aa872050d49c42b9603945f9e499f6ed8a14a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//###########################################################-*-outline-*-####
// TODO list
//############################################################################

* Histories

  Requires: -

  Create a class "History<X>" that can be used to store a phase
  dependent value of type "X". We can then have TypeHistories,
  FlagHistories, ClosureHistories, ...

  Currently only symbols may contain phase dependent values. For that
  reason we sometimes create symbols just because we need a phase
  dependent type (for example the thisTypeSym). And sometimes we don't
  have phase dependent values where we should (for example lobound in
  AbsTypeSymbol or flags in Symbol)

  Once we have histories, it is possible to add one or several
  phase-dependent values to every symbol (and also to other data
  types).

  The two base operations of class "History" are "getValueAt(Phase)"
  and "setValueAt(Phase)". There are two kinds of histories: those
  that may only return values already set and those that trigger the
  evaluation of values not yet set (=> lazy types).


* Remove the notion of primary constructor.

  Requires: Histories

  In case of abstract types and type aliases, the sole purpose of the
  primary constructor is to store the type parameters. These type
  parameters can be stored in a type parameters history.

  In case of class types, the primary constructor stores the type and
  value parameters of the class and it defines a valid instance
  constructor. As for abstract types and type aliases, the type and
  value parameters can be stored in parameters histories and the
  instance constructor defined be the primary constructor can be
  replaced by a normal constructor.


* Remove symbols from MethodTypes and PolyTypes

  Requires: Histories, Primary constructor removal

  The symbols of the value parameters of methods are currently stored
  in their type in "MethodType" types. These symbols can be stored in
  a new parameters history of class "TermSymbol". The array of symbols
  in the "MethodType" type can then be replaced by an array of types.

  The process is about the same for symbols in PolyTypes. The main
  difference is that type parameters may be referenced and thus we
  need something like De Bruijn indices to represent these
  references.


* Scopes with history

  Requires: -

  Implement scopes that maintain a validity phase interval for each of
  its member. Members may then only be added to scopes. Removing is
  replaced by terminating the validity interval.


* Implement a type IntervalType(Type,Type)

  Requires: -

  A type IntervalType(Type,Type) specifies an upper and a lower
  bound. This type can be used to replace the loBound field in class
  AbsTypeSymbol. It makes it possible to merge classes TypeAliasSymbol
  and AbsTypeSymbol into one single class whose info is either a
  TypeRef for type aliases or an IntervalType for abstract types.


* Solve refinement problem.

  Requires: Histories, Scopes with history, IntervalTypes

  Replace the current type CompoundType(Type[],Scope) by the new types
  CompoundType(Type[]) and RefinementType(Type,Map<Symbol,Type>) and
  add a Scope field in class ClassSymbol.

  Replace the symbol in compound types by a closure history.

//############################################################################