xref: /aosp_15_r20/external/emboss/doc/roadmap.md (revision 99e0aae7469b87d12f0ad23e61142c2d74c1ef70)
1*99e0aae7SDavid Rees# Emboss Roadmap
2*99e0aae7SDavid Rees
3*99e0aae7SDavid ReesArrows indicate implementation order; that is, "A -> B -> C" means "C depends on
4*99e0aae7SDavid ReesB which depends on A."
5*99e0aae7SDavid Rees
6*99e0aae7SDavid Rees```dot {layout_engine=dot}
7*99e0aae7SDavid Reesdigraph {
8*99e0aae7SDavid Rees  node [ shape=box target="_top" ]
9*99e0aae7SDavid Rees  edge [ dir="back" ]
10*99e0aae7SDavid Rees  rankdir="RL"
11*99e0aae7SDavid Rees
12*99e0aae7SDavid Rees  {
13*99e0aae7SDavid Rees    rank="sink"
14*99e0aae7SDavid Rees    misc [ label="Other" URL="#misc" ]
15*99e0aae7SDavid Rees    strings [ label="String Type" URL="#strings" ]
16*99e0aae7SDavid Rees    proto_back [ label="Proto Backend" URL="#proto_back" ]
17*99e0aae7SDavid Rees    arr_of_bits [ label="Packed Arrays" URL="#arr_of_bits" ]
18*99e0aae7SDavid Rees    array_stride [ label="Arbitrary Array Stride" URL="#array_stride" ]
19*99e0aae7SDavid Rees    dyn_array_elem_size [ label="Dynamic Elements" URL="#dyn_array_elem_size" ]
20*99e0aae7SDavid Rees    shift_ops [ label="<< and >>" URL="#shift_ops" ]
21*99e0aae7SDavid Rees    private [ label="Private Fields" URL="#private" ]
22*99e0aae7SDavid Rees    type_syn [ label="Type Syntax" URL="#type_syn" ]
23*99e0aae7SDavid Rees    division [ label="//" URL="#division" ]
24*99e0aae7SDavid Rees    exponent [ label="**" URL="#exponent" ]
25*99e0aae7SDavid Rees    requires [ label="[requires]" URL="#requires" ]
26*99e0aae7SDavid Rees  }
27*99e0aae7SDavid Rees
28*99e0aae7SDavid Rees  del_range [ label="rm [range]" URL="#del_range" ]
29*99e0aae7SDavid Rees  del_is_integer [ label="rm [is_integer]" URL="#del_is_integer" ]
30*99e0aae7SDavid Rees
31*99e0aae7SDavid Rees  {
32*99e0aae7SDavid Rees    rank="source"
33*99e0aae7SDavid Rees
34*99e0aae7SDavid Rees    del_anon_hack [ label="Unhack Anon Bits" URL="#del_anon_hack" ]
35*99e0aae7SDavid Rees    checksums [ label="CRC/Checksum" URL="#checksums" ]
36*99e0aae7SDavid Rees  }
37*99e0aae7SDavid Rees
38*99e0aae7SDavid Rees  del_is_integer -> type_syn
39*99e0aae7SDavid Rees
40*99e0aae7SDavid Rees  del_range -> requires
41*99e0aae7SDavid Rees  checksums -> requires
42*99e0aae7SDavid Rees  del_anon_hack -> private
43*99e0aae7SDavid Rees  del_is_integer -> exponent
44*99e0aae7SDavid Rees  del_is_integer -> division
45*99e0aae7SDavid Rees
46*99e0aae7SDavid Rees  open_source -> del_range
47*99e0aae7SDavid Rees  open_source -> del_is_integer
48*99e0aae7SDavid Rees
49*99e0aae7SDavid Rees  edge [style=dashed]
50*99e0aae7SDavid Rees}
51*99e0aae7SDavid Rees```
52*99e0aae7SDavid Rees
53*99e0aae7SDavid Rees[TOC]
54*99e0aae7SDavid Rees
55*99e0aae7SDavid Rees
56*99e0aae7SDavid Rees## Type Syntax {#type_syn}
57*99e0aae7SDavid Rees
58*99e0aae7SDavid ReesA syntax for expressing Emboss expression types.  Likely some variation of set
59*99e0aae7SDavid Reesbuilder notation:
60*99e0aae7SDavid Rees
61*99e0aae7SDavid Rees```
62*99e0aae7SDavid Rees  { x in $integer | 0 <= x <= 510 && x % 2 == 0 }
63*99e0aae7SDavid Rees```
64*99e0aae7SDavid Rees
65*99e0aae7SDavid ReesThis is needed to replace the `[is_integer]` attribute
66*99e0aae7SDavid Rees
67*99e0aae7SDavid Rees
68*99e0aae7SDavid Rees## Remove `[is_integer]` {#del_is_integer}
69*99e0aae7SDavid Rees
70*99e0aae7SDavid ReesReplace the `[is_integer]` attribute on `external`s with a `[type]` attribute.
71*99e0aae7SDavid ReesThis also lets us remove the hack in `expression_bounds.py`.  In passing, it
72*99e0aae7SDavid Reesshould also allow `Flag` fields to be used as booleans in expressions.
73*99e0aae7SDavid Rees
74*99e0aae7SDavid Rees
75*99e0aae7SDavid Rees## Private Fields {#private}
76*99e0aae7SDavid Rees
77*99e0aae7SDavid ReesProvide some annotation -- likely an attribute -- that indicates that a field is
78*99e0aae7SDavid Rees"private:" that it should not appear in text format, and that it cannot be
79*99e0aae7SDavid Reesreferenced from outside the structure.  From an end user perspective, this is
80*99e0aae7SDavid Reesprimarily useful for virtual fields; internally, the automatic structure that
81*99e0aae7SDavid Reeswraps anonymous bits can also be marked private so that the backend can stop
82*99e0aae7SDavid Reescaring about `is_anonymous`.
83*99e0aae7SDavid Rees
84*99e0aae7SDavid Rees
85*99e0aae7SDavid Rees## Finishing Refactoring Hacky Anonymous Bits Code {#del_anon_hack}
86*99e0aae7SDavid Rees
87*99e0aae7SDavid ReesReplace the final uses of <code>*name*.is_anonymous</code> with something that
88*99e0aae7SDavid Reesmarks "anonymous" fields as "private."
89*99e0aae7SDavid Rees
90*99e0aae7SDavid Rees
91*99e0aae7SDavid Rees
92*99e0aae7SDavid Rees## `[requires]` on Fields {#requires}
93*99e0aae7SDavid Rees
94*99e0aae7SDavid ReesAllow the `[requires]` attribute on fields, which can provide an arbitrary
95*99e0aae7SDavid Reesexpression whose value must be `true` for the field to be `Ok()`.
96*99e0aae7SDavid Rees
97*99e0aae7SDavid Rees
98*99e0aae7SDavid Rees## Remove `[range]` {#del_range}
99*99e0aae7SDavid Rees
100*99e0aae7SDavid ReesReplace all extant uses of `[range: low..high]` with `[requires: low <= field <
101*99e0aae7SDavid Reeshigh]`, and remove support for `[range]`.
102*99e0aae7SDavid Rees
103*99e0aae7SDavid Rees
104*99e0aae7SDavid Rees## Native Checksum/CRC Support {#checksums}
105*99e0aae7SDavid Rees
106*99e0aae7SDavid ReesAdd support for checking standard checksums/CRCs, and for automatically
107*99e0aae7SDavid Reescomputing them.
108*99e0aae7SDavid Rees
109*99e0aae7SDavid Rees
110*99e0aae7SDavid Rees## Shift Operators (`<<` and `>>`) {#shift_ops}
111*99e0aae7SDavid Rees
112*99e0aae7SDavid ReesLeft and right shift operators for use in expressions.
113*99e0aae7SDavid Rees
114*99e0aae7SDavid Rees
115*99e0aae7SDavid Rees## Flooring Integer Division (`//`) and Modulus (`%`) {#division}
116*99e0aae7SDavid Rees
117*99e0aae7SDavid ReesFlooring (not truncating) integer division for use in expressions, and the
118*99e0aae7SDavid Reescorresponding modulus operator.
119*99e0aae7SDavid Rees
120*99e0aae7SDavid Rees
121*99e0aae7SDavid Rees## Exponentiation (`**`)  {#exponent}
122*99e0aae7SDavid Rees
123*99e0aae7SDavid ReesExponentiation operator.  Mostly needed for `[type]` on `UInt`, `Int`, and
124*99e0aae7SDavid Rees`Bcd`.
125*99e0aae7SDavid Rees
126*99e0aae7SDavid Rees
127*99e0aae7SDavid Rees## Arrays with Runtime-Sized Elements {#dyn_array_elem_size}
128*99e0aae7SDavid Rees
129*99e0aae7SDavid ReesSupport for arrays where the element size is not known until runtime; e.g.,
130*99e0aae7SDavid Reesarrays of arrays, where the inner array's size is determined by some variable.
131*99e0aae7SDavid Rees
132*99e0aae7SDavid Rees
133*99e0aae7SDavid Rees## Arbitrary Array Stride {#array_stride}
134*99e0aae7SDavid Rees
135*99e0aae7SDavid ReesSupport for arrays where the stride (distance between the starts of successive
136*99e0aae7SDavid Reeselements) is different from the element size.  Needed to support padding between
137*99e0aae7SDavid Reeselements and interlaced elements.
138*99e0aae7SDavid Rees
139*99e0aae7SDavid Rees
140*99e0aae7SDavid Rees## Large Arrays of `bits` {#arr_of_bits}
141*99e0aae7SDavid Rees
142*99e0aae7SDavid ReesSupport for large, packed arrays of, e.g., 12-bit integers.  Requires such
143*99e0aae7SDavid Reesarrays to be byte-order-aware, and there are potential readability concerns.
144*99e0aae7SDavid Rees
145*99e0aae7SDavid Rees
146*99e0aae7SDavid Rees## Proto Backend {#proto_back}
147*99e0aae7SDavid Rees
148*99e0aae7SDavid ReesA backend which generates:
149*99e0aae7SDavid Rees
150*99e0aae7SDavid Rees1.   A `.proto` file with an "equivalent" set of types.
151*99e0aae7SDavid Rees2.   C++ code that can populate the protos from Emboss views and vice versa.
152*99e0aae7SDavid Rees
153*99e0aae7SDavid ReesEssentially, you would be able to serialize to and deserialize from the "proto
154*99e0aae7SDavid Reesform" the same way that you can currently serialize to and deserialize from
155*99e0aae7SDavid Reestext.
156*99e0aae7SDavid Rees
157*99e0aae7SDavid Rees
158*99e0aae7SDavid Rees## String Type {#strings}
159*99e0aae7SDavid Rees
160*99e0aae7SDavid ReesA physical type for strings.  This is complex, because strings can be stored in
161*99e0aae7SDavid Reesmany formats.  It is likely that Emboss will only support byte strings, and will
162*99e0aae7SDavid Reesnot directly handle character encodings, but that still leaves a number of
163*99e0aae7SDavid Reescommon formats:
164*99e0aae7SDavid Rees
165*99e0aae7SDavid Rees1.   Length-specified: length is determined by another field.
166*99e0aae7SDavid Rees2.   Delimited: string runs until some delimiter byte; usually zero, but
167*99e0aae7SDavid Rees     sometimes ASCII space or '$'.
168*99e0aae7SDavid Rees3.   Optionally-delimited: string runs until either a delimiter byte *or* some
169*99e0aae7SDavid Rees     maximum size.
170*99e0aae7SDavid Rees4.   Right-padded: string bytes run to some maximum size, but padding bytes
171*99e0aae7SDavid Rees     (usually ASCII space) should be chopped off the end.  Bytes with the
172*99e0aae7SDavid Rees     padding value can appear in the middle.
173*99e0aae7SDavid Rees
174*99e0aae7SDavid Rees
175*99e0aae7SDavid Rees## Miscellaneous/Potential Features {#misc}
176*99e0aae7SDavid Rees
177*99e0aae7SDavid ReesThese features could happen if there is interest, but there is no current plan
178*99e0aae7SDavid Reesto implement them.
179*99e0aae7SDavid Rees
180*99e0aae7SDavid Rees
181*99e0aae7SDavid Rees### Fixed Point
182*99e0aae7SDavid Rees
183*99e0aae7SDavid ReesSupport for fixed-point arithmetic, both in expressions and physical formats.
184*99e0aae7SDavid Rees
185*99e0aae7SDavid Rees
186*99e0aae7SDavid Rees### Documentation Backend
187*99e0aae7SDavid Rees
188*99e0aae7SDavid ReesSupport for an HTML/PDF/???-format documentation generator.
189*99e0aae7SDavid Rees
190*99e0aae7SDavid Rees
191*99e0aae7SDavid Rees### Python Backend
192*99e0aae7SDavid Rees
193*99e0aae7SDavid ReesA code generator for Python.
194