view docs/describe-data-struct.muse @ 134:3dee4d929e1f

Wrap _DEX_TypeList to _DEX_TypeList_align before append to list. - Fix the issue described by map_verify_error_test(). - When inject a _DEX_ClassDef, dexfile_insert_classdefs_relative() should also inject related _DEX_TypeList. - But, dex_append_obj_list() does not known that _DEX_TypeList should be wrapped to to _DEX_TypeList_align and appended to DEXFile.typeLists. We add a special case in dex_append_obj_list() to wrap _DEX_TypeList before trying to insert to a list.
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 09 Aug 2011 17:23:01 +0800
parents e790c6b2d5d9
children
line wrap: on
line source

Data struct own some relation-ship or logics internally.  Usually,
they are described in code spreaded over the project.  The problem of
code is deattach relationships from the data struct.  You don't see
the relationship with definition of data struct alone.  You can also
not get the relationship from the code easily.  So, we need a way
to describe relationship in the definition of data struct to attach
the information with data struct.

Attaching relationship is not only easy to read, but also parse-able.
Relationships are attached a part of definition of data struct.  They
are not code, it means more easy to be parsed.  A lot of code can be
generated automatically by tools.

Persisted data (in secondary storage) is usually a tree with reference
between branches while internal data struct is usually a group of
interconnected objects.  We dont use persisted one directly because
they are more hard to be used.  You need extra-logic to travel
persisted data struct.  We need the code to convert persisted data
struct to internal one and in reversed, but it is tedious.  With a
language to describe data struct with attaching relationship, we can
generate code for conversion of data struct from/to persisted to/from
internal ones.

** Construction

 - types
 - relationships
   - reference
   - dependency
 - constrain
 - condition
 - path