File: todo.org

package info (click to toggle)
storm-lang 0.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,100 kB
  • sloc: ansic: 261,471; cpp: 140,438; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (403 lines) | stat: -rw-r--r-- 34,146 bytes parent folder | download
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
* SMM bugs/improvements [10/14]
  - [ ] Investigate why compiling SMM with O2 (at least on the build server) breaks it.
  - [ ] Investigate how often the history should be advanced. It seems to be wasteful to always increase it
    whenever we do some GC work since that happens quite often for the nursery generation. It would be more
    useful to tick the history whenever we have a gen-1 or larger collection, or whenever we have collected
    the nursery a certain number of time, or moved a certain number of objects.
  - [ ] Perhaps we should have some exponential back-off in the history, so that the resolution in time
    is fine-grained in recent history, but rougher towards the end.
  - [ ] Perhaps we should move the pointer summaries from individual Blocks to Chunks, since we generally
    don't have better resolution than that from the VMAlloc class.
  - [ ] We probably want a fenwick tree to provide quick range queries regarding write barriers (perhaps
    other operations as well) in the VMAlloc system (Note: This is not critical at the moment, as generations
    prefer to allocate 32K blocks, which is exactly the resolution of the VMAlloc system).
  - [X] Examine why the SMM Gc has much worse performance when running the main Storm binary compared
    to the test suite.
  - [X] Attempt to collect higher generations that are almost full before attempting to collect lower
    generations. Otherwise, recently allocated objects may propagate all the way to the highest generation
    instantly.
  - [X] Properly scan the type descriptions of weak objects in the ScanState weak queue.
  - [X] Currently, we treat the header pointer of weak objects as a weak pointer. This is not correct,
    as the object would be unusable if the type was splatted.
  - [X] SMM crashes fairly consistently when running the test suite with an additional generation of 1 MB.
    (Seemingly always when scanning a weak array). Making VMAlloc::anyWrites always return 'true' seems to
    alleviate this issue, pointing towards an issue with keeping track of references between generations.
    We should investigate this further!
  - [X] Investigate where we should put 'suggestCollection' in 'allocBlock'. Currently, we're a bit aggressive.
  - [X] Tweak collection frequency. Currently, it seems gen 1 collections are always triggered because
    we try to allocate large objects from gen 0 rather than objects from gen 0 spilling into gen 1. This
    could mean that we're too aggressive with collections (we try as soon as we would otherwise need
    to allocate memory, even though we're way below our threshold).
  - [X] Utilize memory protection (write barriers) to improve performance.
  - [X] GcWatch objects seem to fail to notify their owner of moved objects in rare circumstances. Investigate
    further to see if the bug is remaining after the recent refactor. MapMoveTest could fail from time to time.
  - [X] Calling 'objectMoved' for individual objects is probably wasteful. We could batch calls to 'objectMoved'
    by updating history during compaction rather than object movement. At that time, we can simply mark all
    reclaimed memory as moved (with some exceptions related to GcType objects).

* Performance improvements [4/9]
  - [X] The main culprit of the startup time is loading all functions in the system (about 50%). Investigate why.
    It seems much of the time can be traced to filling in the VTables, out of which the main culprit is
    'fn->directRef()', which initializes references.
    Finished: reduced startup with approx. 10-20 ms on Windows.
  - [X] Each function needs to create strings to initialize the references. This is not optimized for speed
    and takes about 10 ms during startup. Should be fixed by allowing RefSource to take arbitrary objects
    as their "names" instead of strings.
  - [X] TypeChain is currently always allocating an array of size 1 before it is properly initialized. This is very
    wasteful, as it is almost always overwritten with a new array an instant later.
  - [X] Move the atomic operations in Utils/Utils.h to a separate header, and implement them inline in the
    header so that they can be properly inlined in more cases. Also reduce the harsh checking of alignment,
    it likely bloats the code quite a bit.
  - [ ] Improving StrBuf << Char likely improves reading source code. Currently it calls the "output string"
    function, which is overly complicated for that context.
  - [ ] Take a look at improving the performance of Map<>. On Linux, it actually performs worse than std::map
    during insertions at least.
  - [ ] If a copy constructor for a type is marked as 'pure', keep the 'copy' entry in the handle 'null' so that
    containers may use memcpy instead of calling the copy ctor for trivial types all the time.
  - [ ] In Basic Storm: It is likely that "result" is called multiple times from some nodes, which causes an
    exponential growth in calls towards the leaves of the AST. Caching in Expr could solve the issue,
    but the scale of the issue should be assessed first.
  - [ ] Parsing core.lang.syntax.bnf takes about 80 ms, which is a bit on the high end when compiling code...

* Loose ends so far [72/131]
  - [ ] The thread-switching code probably interacts poorly with the GC in some subtle way that
    causes crashes in rare situations (edge-case in detours?). Previously, the locking code in
    Progvis performed a thread switch on each synchronization operation (from "unknown-thread" to
    "Render", which was actually always from one thread to itself). At that point, the model checker
    typically crashed on large programs with a GC-related error (e.g. recursive locking from MPS).
    However, now that the thread switch has been eliminated, it happily runs checks ~150000 states
    or so, indicating that the thread switch stressed some part of the system. Perhaps some point in
    the detours caused some thread to not be scanned at all?
  - [ ] There seems to be situations where vtable entries become empty when the corresponding types
    are no longer referenced from the name tree. For example, when Progvis generated code that
    referenced a type and vtable from a type that was only ever in a copy of the name tree, the
    vtable entries of virtual functions were sometimes empty when the functions were called.
  - [ ] Relative imports in Basic Storm?
  - [ ] Verify that toS in containers respect thread affinity of the contained objects (WeakSet is OK).
  - [ ] Find cases where static local variables are used for "initialize once", possibly to solve
    concurrency issues. This does not work on VS2008, as static initializers don't use atomics.
  - [ ] Serialization: When a default constructor exists, use it for default initialization, even if
    no explicit default is set?
  - [ ] The Compiler thread should probably wait for all UThreads to terminate. Otherwise any UThreads
    that are sleeping will not block the system from terminating properly.
  - [ ] When type-checking e.g. where-clauses in the SQL plugin, the type system there does not
    account for things that may be nullable due to LEFT, RIGHT or OUTER JOINS. As such,
    we can not check for cases where IS NULL or IS NOT NULL always returns false/true. The information
    exists, but seems to only be used to generate output types.
  - [ ] Add a buffered input stream to match the buffered output stream. Add to stream documentation.
  - [ ] Introduce "negative matches" or "lookahead" in the BNF grammar. This would make it easier
    to write rules for matching "int" that do not match "intx" by having the "int" rule like:
    Primitive : "int" - !"[A-Za-z]"; or
    Primitive : "int" - !SIdentifier;
  - [ ] Serializing an object graph containing multiple references to the same string currently
    causes the string to be duplicated. This might not be ideal, and surprising since we break
    object identity (even if it generally does not matter for strings, as they are immutable).
  - [ ] It is possible to create a function pointer to a constructor, but they will not behave
    properly when calling the constructor of an actor, for example.
  - [ ] Font sizes in DirectX (in particular, the default font) are larger than when using Gdi.
  - [ ] When reloading types, it is possible (and even likely) that WeakSets among others contain a duplicate
    key (we're modifying memory). This will currently be retained during rehashes, meaning that the slot is 
    essentially leaked. The rehash code should be modified to handle this.
  - [ ] lang:bs should probably not depend on lang:bs:macro. This creates weird dependency cycles when attempting to load
    lang:bs:macro first as it depends on lang:bs to parse the code in there.
  - [ ] We want to allocate threads in some kind of pool. since the minimum alignment for VirtualAlloc on Windows
    is 64k, we might waste quite a lot of memory when allocating small stacks.
  - [ ] Rename "StrBuf::add" to "StrBuf::push" to be consistent with "Array".
  - [ ] Cyclic dependencies between packages are not always handled nicely. One idea to solve this
    would be to have Package only load stages that correspond to the ones loaded by the package that
    is currently loading, and then hold off remaining loading until a later point, for example when
    the other package advances.
  - [ ] SSL library should report errors properly.
  - [ ] Perhaps port the Windows SSL library to use newer API:s than SChannel. That might allow us to
    handle server-side certificates better.
  - [ ] Maybe types are not visualized properly in Progvis. We need a special pointer/value for those.
  - [ ] The Value() ctor was changed to accept a Maybe-type. Because of this, auto-cast from Type to Value
    no longer works in Basic Storm. Investigate, and make a special case for Maybe perhaps.
  - [ ] Having a generator in Basic Storm generate types, makes it impossible to use those types in other files
    in the same package (depending on load order).
  - [ ] If CppAbstractHints is empty, it is still possible to instantiate it, even if the base class is abstract.
  - [ ] Implement 'clearBody' in all classes that implement 'createBody'.
  - [ ] A production like this: "SOp3 : "&", SOp3(block) n;" works for "Expr SOp3(Block block);". It should give an error!
  - [ ] It is currently possible to crash the system by attempting to call (e.g. using the pointer() function)
    a function that has not been given any Code(). This should perhaps raise an exception or something similar.
  - [ ] A new thread association for Actors would be useful. In many cases inside libraries, we want to be
    able to provide some object that is able to execute on any thread, yet have the semantics of an actor,
    since copying does not really make sense (e.g. ui.Painter, util.FileStream). Here, we would like to say:
    this object should remain on the thread it was created on, disallow passing it to other threads (perhaps
    "on same"). It should be possible to subclass such classes and associate them with a particular thread.
    This allows a caller to be "unaware" of threads, while code in the subclasses may still avoid thread
    switches since the actual thread is known there. Of course, such subclasses shall only be possible to
    create on the specified thread. This is potentially also useful for implementing the generated types
    in the syntax language. The base classes can be locked, and the derived classes could be placed
    on threads inside the syntax language.
  - [ ] When using "unless (foo)", "foo" uses a local variable in the block as well as outside of the block,
    which makes assignments to that variable to not write to the original variable even if one would expect so.
    We should at least warn about this.
  - [ ] Perhaps most containers shall provide a range-iterator as well? It is probably easier to provide
    some generic facility to convert from a pair of iterators to a range and use that.
  - [ ] The expression Int[]:foo does not parse properly. I don't know if we want it to or not, but it is
    nice when calling static functions (which is rare for these).
  - [ ] Finish the implementation of core:Variant. It is currently lacking a typesafe Storm interface (usable with "as").
  - [ ] Calling init(1, 2) {} when the superclass is Object will not raise an error as expected.
  - [ ] It should be easier to write toS functions for values. Ideally, they should look the same as for classes.
  - [ ] Update the grammar inside the "ui" package so that "window Foo extends Bar" uses a decorator.
  - [ ] Inside Type::updateHandle, we should check return types for the found functions! Otherwise, things
    may end badly if the return type differ from what we expect!
  - [ ] The documentation view in Emacs should probably show which package the type is located in as well.
    It is not easy to keep track of the current package oneself when navigating through the hyperlinks.
  - [ ] When editing a file that uses parent requirements in the language server, and there are multiple
    valid parses for some token when context is disregarding, introducing an error regarding requirements
    could make other valid places pick the wrong parse with regards to context. See the file
    test/server/context.bs for an example of this happening.
  - [ ] When a .bnf-file includes another package, productions from there are not automatically visible,
    which seems unintuitive. Even though a package (perhaps containing syntax helpers) is included, its
    productions are not visible. This could probably be solved nicely with 'package exports' or a similar
    mechanism.
  - [ ] Support documentation of templates from C++.
  - [ ] It seems like the sound library crashes during shutdown from time to time, at least on Windows.
  - [ ] In Basic Storm, writing 1.2 currently produces a float by default. Is this desirable?
  - [ ] Allow easy creation of subtypes similar to Ada, where one can something like: type Foo is (0 .. 99).
    Implement this as a library, eg. lang:bs:subtype
  - [ ] Expose all function pointers the Engine knows about to Storm using a similar API to what is used now.
    This allows other languages to use "internal" features, for example, to access global variables properly.
  - [ ] Generalize the "weak cast" functionality so that new types may "overload" them. This can for example
    be done by providing an entity type WeakCast that one can include (named "as" for example) that provides
    the desired functionality. It can then be injected using generators.
  - [ ] It is not possible to chain 'assignment' functions using the = operator.
  - [ ] Allow declaring member functions (at least in values) as a different thread than the owner. Possible
    in C++, not in Basic Storm.
  - [ ] Change the default visibility of class members in Basic Storm to private.
  - [ ] Destructors do not need their own slot in the Storm vtables anymore since we have another mechanism for that.
  - [ ] Check so that destructors are required if a value-type object within a class or actor
    contains a destructor.
  - [ ] Improve the preprocessor by generating toS() and deepCopy() if not present.
  - [ ] Finish the clone() functionality.
  - [ ] Destructors in maps and arrays are not working properly yet. Idea: add (yet another) member
    to array headers, and let the user provide a custom destructor in there if neccessary. The same
    is true for places that allocate plain GcArray:s.
  - [ ] Make sure Array<>, Map<> and Set<> clear the memory when an element is removed (and call destructors).
  - [ ] Function pointers should maybe allow casting to less specific types of parameters.
  - [ ] if (x = foo.bar) does not produce an error if 'foo.bar' is not Maybe<T>.
  - [ ] Support marking functions as 'pure' in C++.
  - [ ] Move the 'assign' declaration to being purely a decorator (ie. Foo field(Foo v) : assign)?
  - [ ] If a type has a '==' or '<' outside the type itself, the corresponding operator will not be present in
    a Handle, like '<<' at the moment.
  - [X] There is a potential deadlock as follows:
    - Assume we have code running on thread X, calling a function that needs to be compiled.
      The code in LazyCode switches to the Compiler thread using a Semaphore (i.e. blocking the thread)
    - The code running on the compiler thread does something that needs a global variable or needs
      to run code on thread X that need to be executed.
    - This can be solved either by using normal Sema. Otherwise, we could have threads have "higher priority"
      that is inherited through Futures.
    - This also raises the question of why we eagerly create the value of global variables (doResolve calls create).
    - Fixed by assigning the critical threads a higher priority.
  - [X] For replacing return ptrs on the stack, we might need to use paciasp and autiasp if pointer
    authentication is active. That, or we need to disable branch protection on ARM for Debian builds.
    This feature is enabled with -mbranch-protection=standard on GCC. It can be detected by looking
    for the presence of __ARM_FEATURE_PAC_DEFAULT and __ARM_FEATURE_BTI_DEFAULT. Both only require
    injecting a few custom instructions in the final machine code (in prolog and epilog).
  - [X] The SSL library needs to handle timeouts properly.
  - [X] When calling default members inherited from TObject (e.g. toS()), they will be considered
    as "run on any thread" even though we know that we have an instance of a class that is tied to
    some particular thread. We could maybe modify the logic in 'autoCall' to take this into account,
    but it would need to have more information than what it currently has in that case (i.e. it needs
    to know if the this-parameter is from a subclass).
  - [X] In the UI-library, button, checkbox, and group labels are interpreted as mnemonic strings, even
    if they are not advertised as such. They should be properly escaped.
  - [X] We can not use 'this' captured inside a lambda function since 'this' refers to the one already present
    in the lambda function.
  - [X] Interestingly: "strBuf << maybe<Str>" calls via Variant. This is since Maybe<Str> does not have
    an "<<" operator. Note: solved by reworking how toS works for value types.
  - [X] Lambda functions can not infer their proper type when being assigned to Maybe<T>.
  - [X] If a class contains a variable "center", and the layout library is imported, the class
    "center" in the library takes precedence over the class-local variable. This should probably not
    be the case.
  - [X] Str:unescape() does not handle \\. Adding this breaks the syntax language, so we need to
    revise the logic for that particular language.
  - [X] Trap division by zero errors. On Linux + AMD64, division by zero crashes the process. ARM gives zero.
  - [X] Add some helper "rules" to the recursive descent parser. For example: Capture(Nat n) that
    just captures 'n' chars/bytes (can't implement this in grammar). Then we can parse quite a bit
    of binary formats!  Perhaps also some rules for quick parsing of various integer types.
  - [X] When a non-member function declares a "this" variable, we implicitly assume that it is a true "this"
    and make assumptions about it (wrt threads) based on this assumption. This is dangerous. We need
    to detect whether the "this" pointer is a "true" this-pointer or not.
  - [X] Using "spawn" always causes class-types to be copied, even if we're spawning on the same UThread.
  - [X] The Value() ctor was changed to accept a Maybe-type. Because of this, auto-cast from Type to Value
    no longer works in Basic Storm. Investigate, and make a special case for Maybe perhaps.
  - [X] When reloading types, it is possible (and even likely) that WeakSets among others contain a duplicate
    key (we're modifying memory). This will currently be retained during rehashes, meaning that the slot is
    essentially leaked. The rehash code should be modified to handle this.
  - [X] When reloading types, it seems like the SMM implementation of the Walker fails to find some references,
    as replacing "lang.bs.macro" works the first few times, but fails afterwards. Probably due to underscanning.
  - [X] When reloading types, templated types like Maybe<T> may end up having multiple instances created for what
    becomes the 'same' type. We need to find and fix such cases globally in the name tree (this happens when reloading
    lang.bs.macro for example).
  - [X] Add a 'pos' member to Named. Then we can implement a generic 'file private' and use that in Basic Storm.
    If this is done, we should remove or replace storm::bs::FileScope in Basic/Scope.h, as it is most likely not
    needed anymore.
  - [X] Nested classes declared in C++ are not private in Storm, even if they are declared as such in C++.
  - [X] This expression "VarInfo v = r.location(to);" should not compile, since we should not be able to auto cast here.
  - [X] A production like this: "SOp3 : "&", SOp3(block) n;" works for "Expr SOp3(Block block);". It should give an error!
  - [X] An exception thrown as "const Exception" will not be catched by the Code backend currently.
  - [X] Executing "Var v = to.to.createVar(to.to.root, sPtr, exitFn.ref);" on an improper thread cases
    a crash (where "to.to" is a "Listing" and "exitFn" is a "Function").
  - [X] Sometimes when reloading a large presentation quite a few times, Storm runs out of memory, failing
    to spawn new UThreads for handling UI events. The error message tells that around 30000 threads are alive
    at the point of failure, hinting at a resource leak somewhere. An utility that outputs stack traces for
    all UThreads would be very useful in finding this bug!
  - [X] The scope for lambda functions is not correct. A lambda function inside a class should be able to
    access a private member in that class. That is currently not the case.
  - [X] Support two-stage initialization. First a call to 'super' or similarly, after which 'this' is accessible
    as the parent class, then a call to 'init {}' which initializes the rest of the object. Slightly tricky
    to implement wrt the 'as' operator.
  - [X] The for loop does not work for WeakSet<>.
  - [X] It would be nice to rework the semantics of Value::isValue to also return "true" for primitive types. 
    It is easier to think of it that way in many cases.
  - [X] Finish integrating the Double class in the system. Basic Storm should be able to instantiate them from
    literals. Str and StrBuf should be able to parse and stringify them, and conversions between built-in
    types should be implemented. Finally, the implementation needs to be tested.
  - [X] We don't properly unescape \" in string literals in Basic Storm.
  - [X] The expression -1 can not be automatically casted to a float since the - operator is used rather than
    interpreting the entire thing as a numeric literal.
  - [X] Asking for a random access stream from an IStream should produce a LazyIStream if nothing better
    is available. However, this is not yet implemented!
  - [X] The Ui library crashes during shutdown under heavy rendering load.
  - [X] The core does not check the return type of overloaded functions, which leads to strange behaviours from time to time...
  - [X] We probably want to allow creating documentation for an entire package. Possibly by creating
    a file called 'doc.txt' or similar inside the appropriate folder.
  - [X] Gradients in the UI library should prehaps have a fixed origin, so that we can draw things
    in multiple passes with the same gradient without issues... It seems like all graphic API:s are
    designed this way, perhaps for a good reason.
  - [X] There seems to be a small issues with expressions like ~10 | 5
  - [X] Support marking functions as 'pure' in Storm.
  - [X] Missing bitwise operators and hexadecimal numbers.
  - [X] Add documentation for the built-in types (such as core.Int).
  - [X] Improve the preprocessor by automatically adding copy constructors and assignment operators
    where neccessary.
  - [X] Global variables should perhaps be initialized lazily. Otherwise, initialization expressions may fail
    to compile properly if they refer to functions in the same compilation unit.
  - [X] Allow creating variables from the REPL. We could use global variables inside the ReplSandbox object for this.
  - [X] Function pointers should perhaps be able to infer the parameter types from context if possible, just like lambdas.
  - [X] Allow initializers for global variables.
  - [X] Automatically mark non-virtual functions in C++ as 'final' in storm, since VTables will not work anyway.
  - [X] The scope of the type lookup for parameters in Basic Storm is wrong (with respect to visibility).
  - [X] BSFunction and BSCtor should release their syntax tree after they are compiled.
  - [X] Show 'known subclasses' inside the documentation in Emacs?
  - [X] Storm crashes when running the test suite when compiling with newer GCC (8.0 or 8.1 and newer).
  - [X] Unary negation is not implemented in Basic Storm (and possibly not in the built-in types).
  - [X] Allow nesting class declarations in Basic Storm.
  - [X] Accessing member variables do not respect the thread associated with the type like functions do.
    Therefore, it is possible to break the threading model by using raw variable accesses!
  - [X] In Basic Storm, taking a function pointer of a private function does not work.
  - [X] Make a generic toS() for Storm which uses operator << (if present) for values.
  - [X] In Basic Storm, expressions like '2 - 1.0' fail to compile since Float is not searched for
    candidates. This could be solved by moving the operators out of the number classes or improve
    overload resolution in this case.
  - [X] Implement 'private' for non-members in Basic Storm.
  - [X] When creating an Arena using code:arena(), the vtable dispatch for 'transform' is not correct. The
    base class is called directly (no lookup) even though there are implementations in the derived classes.
  - [X] Stack traces for Windows (32-bit) do not always contain names of Storm functions. Only functions
    that require exception handling are currently shown.
  - [X] Examine if the special case in the stack scanning actually works. The one time I've seen
    it, everything crashed shortly afterwards, but that could have been something else.
    Note: The crash was due to newly created UThreads being visible to the GC before they
    were completely initialized, resulting in the GC trying to scan the address 0 or being
    very confused with multiple main stacks.
  - [X] Check all synchronization primitives used on Linux. It seems that the BSThread test crashes
    sometimes when the GC decides it needs to perform garbage collection around the time when threads
    are spawned and/or when futures are used.
  - [X] We need to scan the data inside a StackTrace object using mps_rank_ambig().
  - [X] The grammar rule X : Y ("w", Y)* "w"; does not parse properly. It should either work as expected
    or report an error!
  - [X] Thread sleep needs to be improved! We should put threads in a sleep queue so that the thread
    can be properly put to sleep even if there is another uthread active on the current thread.
  - [X] Review the semantics of Buffer::filled() wrt IStream::read. Buffer::filled could be used instead
    of the explicit 'start' parameter. This allows a Buffer to be passed to 'read' multiple times
    to fill the buffer until completion.
  - [X] Handles for values do not get a proper == operator.
  - [X] Enums should be treated like raw integers (currently they are Values).
  - [X] Destructors should be auto-generated in Basic Storm if they are needed.
  - [X] It seems we fail to handle moving objects in Set and Map in rare cases. Examine why!
  - [X] Implement shrink() for Map<> as well.
  - [X] Handles and templates does not work with built-in types (like Int).

* Improvements [7/27]
  - [ ] In the language server: Add the ability to tell the parser to abort parsing after some time.
    In cases where parsing takes much time, the results are typically very bad anyway, so it might
    be a good strategy to actually just give up if parsing takes more than 100 ms or so, and try
    again later (at least when re-parsing parts of the AST, maybe not on the initial parse, or in
    other situations). Also: we probably want to ensure that we *always* schedule a full re-parse of
    nodes that contain errors, even if the regexes match, or if the surrounding node is too large.
    Otherwise, we might end up in situations where code right before- or after a comment is never
    re-parsed into code (this is common when working with large-ish presentations when adding a new
    slide after a comment block).
  - [ ] It would be nice to be able to capture expressions and pass them to functions in patterns.
    For example: pattern() { if (x = y) { ${my_function($expr: x, y)} } }
  - [ ] Consider utilizing the transformations better in Basic Storm. We could, for example, skip the
    XxxDecl classes, and just have lists of AST nodes that are transformed as appropriate later in the
    compilation instead.
  - [ ] Maybe we want to reverse the concatenation order of Transform to make it easier to understand.
    It is currently right to left (since we're using a column vector), but maybe it should be left to right.
  - [ ] Add a type that represents byte sizes. Use that in eg. Socket::readBuffer.
  - [ ] The call to 'getaddrinfo' in the networking subsystem blocks an entire OS thread waiting for
    the network. This is not very good, as we might have other things to do in the meantime.
  - [ ] Automatically re-flow the raw text in comments, just like Markdown would. This is good
    when the width of the users terminal or buffer is smaller than the width of the comments.
  - [ ] Allow comment that 'groups' functions together. This will form a two-level tree that could improve
    readability of the documentation.
  - [ ] Switch the order of 'src' and 'dest' in 'jmp'. They are currently reversed when compared to 'call'.
  - [ ] Use the LO pool for object formats, this should make it possible to have them garbage collected
    and readable during scanning.
  - [ ] Cache and re-use the function thunks generated by CodeGen/callThunk().
  - [ ] Decouple a variable's storage location from when it needs destruction. This could be used to make
    variables immediatly eligible for destruction even if they are moved to an outer scope.
  - [ ] Properly handle failure conditions when creating Threads and UThreads (eg. out of memory).
  - [ ] Rename 'TObject' to 'Actor' to make it easier to understand.
  - [ ] Fix destructors in Storm...
  - [ ] Clone objects using a member function generated by the STORM_CLASS macro or the preprocessor.
  - [ ] Generate toS() and deepCopy() automatically using the preprocessor unless supressed.
  - [ ] We can remove a lot of copy-constructors in Code/, and use memcpy + default generated ones!
  - [ ] Remove mov eax, eax (or similar) They are occasionally generated if we're unlucky.
  - [ ] Idea: disallow cloning of values without deepCopy() so that we can safely make iterators for actors.
  - [X] In the DB library, warn about WHERE clauses that are trivially always true (e.g. id == id).
    These are most likely cases where the programmer *thinks* that they are comparing a column with
    a variable, but for some reason they are not (this happened in the Progvis online exercises).
  - [X] Indicate function return types and types of variables in Doc objects.
  - [X] Why is the expression '"foo" + foo()' allowed if 'foo()' returns null?
  - [X] The syntax SExpr (, SExpr)? is treated as a parameter list. Switch to {} for capture so that
    this does not happen. (requiring SExpr - (,SExpr) instead), stricter parsing.
  - [X] Implement attaching and detaching threads using ThreadGroups for os::Thread.
  - [X] Make it possible to mark entire rules with syntax colors. That would be equivalent to marking
    all usages of that token with the corresponding color.
  - [X] In Array.get(), do not create the exception in getRaw() since it takes up a lot of valuable space in
    the i-cache. Instead, call a separate function or reverse the logic.
* Bugs/improvements in Progvis [1/3]
  - [ ] Make it possible for the model checker to check for memory leaks -- just check if there
    is anything left in all leaf nodes at the end of model checking.
  - [ ] Rendering is very flickering when resizing the Progvis window. Probably due to repaints from
    the window system fail to ensure that a new frame is rendered for some reason. Most notably
    visible on Linux, but also on high-refresh displays on Windows in some situations. (At least
    partially fixed by not moving the window incorrectly in Gtk).
  - [X] The program below does not behave correctly in Progvis, the call
    to "thread_main" is skipped, and Progvis seems generally confused about
    what is happening: root/progvis_demo/test/step_error.c

* C++ front-end (in Progvis) [8/18]
  - [ ] Fix the for-loop to allow for ( ; ; ) and other variants.
  - [ ] Allow multiple variables to be declared on the same line.
  - [ ] Allow type-checked casts between pointer types? We could cache the layout to make this relatively cheap.
  - [ ] Ability to make const member functions.
  - [ ] Check if function resolution works somewhat properly with const parameters etc.
  - [ ] Ability to declare member functions outside the class.
  - [ ] static_cast, c-style-cast, etc.
  - [ ] Some kind of standard library for C++?
  - [ ] Check so that we don't overwrite pointers with something weird.
  - [ ] sizeof() for an array probably don't work correctly.
  - [X] Global arrays (e.g. int x[2])
  - [X] Threading constructs.
  - [X] Strings.
  - [X] malloc/free
  - [X] Arrays
  - [X] sizeof()
  - [X] Pointer arithmetics.
  - [X] nullptr/NULL