Browse Source

Update todo and implementation notes

Andrew Young 8 years ago
parent
commit
131d4ca24c
2 changed files with 114 additions and 53 deletions
  1. 1 29
      doc/implementation.org
  2. 113 24
      doc/todo.org

+ 1 - 29
doc/implementation.org

@@ -1,7 +1,6 @@
 #+TITLE: Org Merge Driver Implementation Notes
-#+STARTUP: indent
+#+STARTUP:
 #+FILETAGS :note:doc:
-#+TODO: AAAA BBBB CCCC
 
 * Project Details
 ** Contact Information
@@ -338,21 +337,6 @@ Headings level is
   conflict as B is editing a removed heading in A, or should it merge
   with the new subheading under the moved heading in A
 
-* Abstract Syntax Tree Lib
-- Less 
-** Design Goals
-*** Concurrent build / read
-- The library must be able to be built and read simultaneously.
-- Ther
-** Object Orientation
-- The ABSlib will use very simple
-** Parser Interface
-- The ABS is meant to be built using a parser.
-
-** Datastructures
-*** ABS
-The general ABS
-
 * Footnotes and Bibiliography
 -  [[http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c][git-merge-changelog]]provides a good example on how to write a merge driver
 - [[http://www.hiit.fi/files/fi/fc/papers/doceng04-pc.pdf][Three-way XML Merge]]
@@ -365,15 +349,3 @@ Vol. 15 No. 11, 1985, pp. 1025-1040. The algorithm was independently
 discovered as described in "Algorithms for Approximate String
 
 * General Algorithm
-- Main calls the parser
-- Lexer reads the file
-  - Matches patterns
-- Sends symbols and data to the parser
-- 
-- 
-- Parser reacts
-  - enum is an index to an array of function pointers
-  - call function corresponding to enum
-    - this is used as an alternative to case statements
-    - case statements might be better optimized
--

+ 113 - 24
doc/todo.org

@@ -2,9 +2,9 @@
 #+STARTUP: overview
 #+AUTHOR: Andrew Young
 #+DESCRIPTION: TODO list for org merge driver
+#+TODO: TODO WORK | DONE
 
-* Things To Do
-** Webpage
+* Webpage
 *** DONE Add the original posting to the proposal page
     - State "DONE"       from "NEXT"       [2012-05-09 Wed 01:36]
 *** TODO Fix all references to the project to be the same name on the webpage
@@ -12,26 +12,27 @@
 *** TODO Update the usage instructions
 *** TODO Add implementation notes
 - even though nothing is decided, there must be something I can add
-** Prototype
-*** DONE fix up documentation
-    - State "DONE"       from "TODO"    [2012-05-09 Wed 01:34]
-*** DONE Write real manual
+
+* Prototype 							    :ARCHIVE:
+** DONE fix up documentation
+   - State "DONE"       from "TODO"    [2012-05-09 Wed 01:34]
+** DONE Write real manual
     - State "DONE"       from "NEXT"       [2012-05-09 Wed 01:34]
 - manual, how to use it
 - now in the root README
-*** DONE Finish the parser
+** DONE Finish the parser
     - State "DONE"       from "NEXT"       [2012-05-10 Thu 19:03]
 - make sure the new headings are being put in the right spot
   - means: compare level of new heading with old heading to add it in
     the right spot
   - possibly add the new heading to the propper spot right as the next
     one is started
-*** DONE Implement a heading tree printer
+** DONE Implement a heading tree printer
     - State "DONE"       from "NEXT"       [2012-05-09 Wed 23:24]
 - really a org_document_to_file function
-*** TODO Add a TAP for the program which demonstrates its use
+** DONE Add a TAP for the program which demonstrates its use
 - test anything protocol
-*** DONE Write an introductory warning
+** DONE Write an introductory warning
     - State "DONE"       from "NEXT"       [2012-05-10 Thu 19:03]
 - this program assumes things about the structure and use of org-mode
   and org files. If the way you use org files does not match this,
@@ -39,23 +40,111 @@
   assumptions this program makes before using. I (nor anyone other
   than yourself) can be held accountable for the results of using this
   program.
-*** DONE Use Gnulib diffseq to merge
-    - State "DONE"       from "NEXT"       [2012-05-16 Wed 22:26]
-*** TODO Fix memory usage
+** DONE Use Gnulib diffseq to merge
+   - State "DONE"       from "NEXT"       [2012-05-16 Wed 22:26]
+** DONE Fix memory usage
 - nothing is being unmalloced
 - write destroy functions
   - one for document, heading, look at ?gl_list_free? for list notes
-*** DONE Start working on the change detection
-    - State "DONE"       from "NEXT"       [2012-05-16 Wed 22:25]
-*** TODO Create a heading mapping
-*** TODO Begin work on the change merging
-*** TODO Finish the prototype
-** Program
-*** Update autotool files
-*** Find a unit test
-- currently looking at "check" (based off of auto-something)
-  - it is not based off of 
-*** Find a parser/lexer
+** DONE Start working on the change detection
+   - State "DONE"       from "NEXT"       [2012-05-16 Wed 22:25]
+** DONE Create a heading mapping
+** DONE Begin work on the change merging
+** DONE Create text mapping
+** DONE Allow headings to be 'moved' locally
+** DONE Allow headings to be 'moved' globally
+** DONE Print propper merges
+** DONE Finish the prototype
+
+* Org Merge Driver
+** TODO [#B] Argp on main
+** DONE [#A] Create doc_stream sdio wrapper			 :doc_stream:
+- write a stdio wrapper
+- make sure that we can encode 
+
+** TODO [#B] Make the parser construct the doc trees
+** TODO [#B] Merge tree
+- implement the prototypes
+- ??
+** TODO [#C] Memory allocator for document
+** TODO [#A] Support global elt matching			 :global_map:
+*** TODO Allow elements to deal with global matching
+- Add callbacks so elements can choose if and how they match.
+ 
+** DONE [#A] Update autotool files
+** TODO [#C] Add support for multiple encodings				:doc:
+- [ ]  
+- [ ] 
+
+** TODO Devise a doc_elt data allocation scheme
+- Currently:
+  - There is no standard scheme for setting up data in an element
+  - org_heading accepts a pointer to an outside allocated buffer,
+    while org_text actually copies and appends strings passed to it.
+- Ideas:
+  - Outside allocation, pass buffer to const data.
+    - who deallocates?
+** TODO Fix printmerge context
+** TODO Fix org_lexer context
+- Currently using a mishmash of global vars in a reentrant parser.
+- Make a lexer userdata struct to use
+
+** TODO [#B] Make doc_stream macros safe				:doc:
+** TODO [#B] Check and handle memory allocation errors
+- Currently, datastructures malloc without returning error.
+- not detected, checked, etc.
+- See how gl_list does it
+  - Most of our interfaces are modelled slightly afer gl_list
+
+** TODO [#B] Make doc_merge work with null ltree_lists
+- merge_node and doc_nodes currently always have allocated child lists.
+- They should only have one if they have children
+
+** TODO [#A] Implement org_heading				    :org_elt:
+** TODO [#A] Fix the merge_delta/doc_merge interface		      :merge:
+- Currently uses status??
+- Make a real enum & field, don't overload something else.
+
+** TODO [#B] Fix Parser / Lexer
+- currently:
+  - parser is implemented inside the lexer
+  - lexer logic is more complicated than it should be
+  - parser is almost empty
+- To fix:
+  - Make lexer return smaller symbols
+  - Build doc_elt's inside the parser
+- Why bother:
+  - Adding rules to the lexer is error prone & hard.
+  - May make the parser more flexible.
+
+** WORK [#B] Move phony_elt to it's own header			    :testing:
+- phony_elt is a dummy elt used for testing.
+- moving it to it's own header file will let us use it in multiple tests.
+- 
+
+** TODO [#A] Create a debug print macro				    :testing:
+- support different modules enable/disable
+  - eg disable printing in document elements, enable in test functions.
+- fail message macro?
+  - disapears like assert?
+
+** TODO [#C] Create a verbosity-controlled print function
+
+** TODO [#A] Make doc_elt_compare find updates 
+- doc_elt_compare returns a simple boolean
+- make doc_elt_compare decide if something matches
+  - if they do, let it decide whats newest / if something has been updated
+- If compare has to compare every field of a doc_elt, it only makes
+  sense to cache that data for printing.
+** TODO Code cleanup
+
+* Ideas
+** TODO (andrew) add and implement functions to create the mapping and dnode tree
+** TODO implement  org_text.h,r org_document.h, org_phony.h
+*** TODO make the parser work for those elements
+
+* Long Run
+
 * Log
 ** [2012-05-07 Mon]
 - modify gl_list.h to not inline functions