-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTODO
64 lines (47 loc) · 1.97 KB
/
TODO
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
TODO:
- Support:
. array bytes() ...
. ... within ...
- Redesign/simplification:
- remove inlined hierarchical structs - instead use names to
indirect inlining which should simplify (but also make less
expressive) referencing from value statements. this would
especially help with switch statements and arrays
- formal handling:
- at parse time, each struct field should have a length
determinable from its type and the lengths of the previous
fields
=> struct is parseable
- at gen time, each struct field that has a value field can have
its value (content) computed from the values of the fields that
don't have a value component.
- Runtime:
- 'marshal' is a catamorphism, and so should not output a
tuple.
- 'unmarshal' is an (partial) anamorphism, so we really need a tuple
result.
- Add type annotations to variant definitions; this is needed to
generate correctly typed variant conversion code.
- With variant definitions, it should be possible to specify the
default at the time of the use of the variant definition.
Currently, the default is only specified at the time of the
declaration, which is restrictive.
- Add type checking for num_bit_sets, to ensure it only works on a
scalar. This will be a special-case, like the one for bits.
- Add a check to ensure that array structs don't have free variables,
to avoid having to deal with value extraction from within arrays.
This is a generation-only check.
- Test Types.ident_map.
- A nice thing to provide good support for is optional fields. Though
they can be manually translated as follows:
type_option : int;
type : classify (type_option) {
0:No_type -> {}
1:Type -> {
type : variant phone_type;
}
}
it would be nice to abbreviate this at the spec level and at the
code generation level.
- Lib: Handcode pcap -> ethernet -> ipv4 -> tcp using fp_lib.
- Ott: type checking the format generation.