[Scummvm-cvs-logs] SF.net SVN: scummvm: [28098] tools/branches/gsoc2007-decompiler

brixxie at users.sourceforge.net brixxie at users.sourceforge.net
Sun Jul 15 14:47:23 CEST 2007


Revision: 28098
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28098&view=rev
Author:   brixxie
Date:     2007-07-15 05:47:22 -0700 (Sun, 15 Jul 2007)

Log Message:
-----------
Added docs dir

Added Paths:
-----------
    tools/branches/gsoc2007-decompiler/docs/
    tools/branches/gsoc2007-decompiler/docs/control_structures.txt
    tools/branches/gsoc2007-decompiler/docs/v5opcodes.txt

Property Changed:
----------------
    tools/branches/gsoc2007-decompiler/


Property changes on: tools/branches/gsoc2007-decompiler
___________________________________________________________________
Name: svk:merge
   - 489ca303-0d3d-4dc1-a57d-017c7912a06a:/local/gsoc2007-decompiler:57
   + 489ca303-0d3d-4dc1-a57d-017c7912a06a:/local/gsoc2007-decompiler:59

Added: tools/branches/gsoc2007-decompiler/docs/control_structures.txt
===================================================================
--- tools/branches/gsoc2007-decompiler/docs/control_structures.txt	                        (rev 0)
+++ tools/branches/gsoc2007-decompiler/docs/control_structures.txt	2007-07-15 12:47:22 UTC (rev 28098)
@@ -0,0 +1,135 @@
+                    High Level Control Structures
+                    =============================
+
+Control structures have been classified according to their
+complexity and based on an initial classification by Kosaraju it was
+determined which classes were reducible to which other classes. An
+expansion on this work by Ledgard and Marcotty was used to create a
+hierarchical ordering of classes based on their semantical
+reducibility.
+
+
+                           Basic structures
+                           ----------------
+
+1. Action:                      single basic block
+
+2. Composition:                 sequence of two structures
+
+3. Conditional:                 if p then s1 else s2;
+                                s1, s2 structures, p predicate
+
+4. Pre-tested loop:             while p do s, s structure, p predicate
+
+5. Single branch conditional:   if p then s, s structure, p predicate
+
+6. N-way conditional:           case p of
+                                 1 : s1
+                                 2 : s2
+                                 ...
+                                 n : sn
+                                end case
+
+                                s1, ..., sn structures, p predicate
+
+7. Post-tested loop:            repeat s until _, s structure
+
+8. Multiexit loop:              while p1 do
+                                      s1
+                                      if p2 then exit
+                                      s2
+                                      if p3 then exit
+                                      ...
+                                      if pn then exit
+                                      sn
+                                end while
+
+                                s1, ..., sn structures
+                                p1, ..., pn predicates
+
+9. Endless loop:                loop s end, s structure
+
+10. Multilevel exit:            exit(i)
+                                terminates i enclosing endless loops
+
+11: Multilevel cycle:           cycle(i)
+                                re-executes i-th enclosing endless
+                                loop
+
+12: Goto:                       unconditional control transfer
+
+
+                               Classes
+                               -------
+
+D (Dijkstra)                                    D = {1,2,3,4}
+
+D' (extension of D structures)                  D' = {1,2,3,4,5,6,7}
+
+BJn (Böhm and Jacopini,
+     n := maximal number of predicates in a
+          multiexit loop)                       BJn = {1,2,3,8}
+
+REn (Repeat-End,
+     n := maximum number of exit levels)        REn = {1,2,3,9,10}
+
+RECn (RE with cycle(i) structures,
+      n := number of levels)                    RECn = {1,2,3,9,10,11}
+
+DREn (RE and Do-While loops,
+      n := maximum number of enclosing levels
+           to exit)                             DREn = {1,2,3,4,9,10}
+
+DRECn (DRE and cycle(i) structures,
+       n := maximum number of enclosing endless
+            loops)                              DRECn = {1,2,3,4,9,
+                                                         10,11}
+
+GPn (any structure with one-in, one-out
+     substructures with at most n different
+     predicates)                                GPn = {1..7,9}
+
+L (any well-formed structure, no restructions
+   on number of predicates, actions, transfer
+   of control -> goto statements allowed)       L = {1..12}
+
+
+Definition:
+
+ Let s1 and s2 be two structures,
+ s1 is a semantical conversion of s2 iff
+
+  - for every input, s2 computes the same function as s1
+  - the primitive actions and predicates of s2 are
+    precsicely those of s1
+
+
+               Hierarchy based on semantical conversion
+               ----------------------------------------
+
+(classes higher up in the hierarchy are a semantic conversion of the
+ lower classes) 
+
+        REinf = RECinf = DREinf = DRECinf = GPinf = L
+              |                 |
+              |           .DREn = DRECn
+              |     .....       .
+          REn = RECn            .
+              .                 .
+              .           .DRE1 = DREC1
+              .     .....
+          RE1 = REC1
+              |
+            BJinf
+              .
+             BJ2
+              |
+       D = D' = BJ1 = GP1
+
+
+                  Generic Set of Control Structures
+                  ---------------------------------
+
+Antipasto structures control flow graphs using the set of generic
+control structures D' + goto = {1,2,3,4,5,6,7,12}.
+REn, RECn, DREn and DRECn can be simulated via the use of goto.


Property changes on: tools/branches/gsoc2007-decompiler/docs/control_structures.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: tools/branches/gsoc2007-decompiler/docs/v5opcodes.txt
===================================================================
--- tools/branches/gsoc2007-decompiler/docs/v5opcodes.txt	                        (rev 0)
+++ tools/branches/gsoc2007-decompiler/docs/v5opcodes.txt	2007-07-15 12:47:22 UTC (rev 28098)
@@ -0,0 +1,105 @@
+OPCODE(o5_actorFollowCamera),           CHECK
+OPCODE(o5_actorFromPos),                CHECK
+OPCODE(o5_actorOps),                    CHECK
+OPCODE(o5_add),                         CHECK
+OPCODE(o5_and),                         CHECK
+OPCODE(o5_animateActor),                CHECK
+OPCODE(o5_beginOverride),               CHECK
+OPCODE(o5_breakHere),                   CHECK
+OPCODE(o5_chainScript),                 CHECK
+OPCODE(o5_cursorCommand),               CHECK
+OPCODE(o5_cutscene),                    CHECK
+OPCODE(o5_debug),                       CHECK
+OPCODE(o5_decrement),                   CHECK
+OPCODE(o5_delay),                       CHECK
+OPCODE(o5_delayVariable),               CHECK
+OPCODE(o5_divide),                      CHECK
+OPCODE(o5_doSentence),                  CHECK
+OPCODE(o5_drawBox),                     CHECK
+OPCODE(o5_drawObject),                  CHECK
+OPCODE(o5_endCutscene),                 CHECK
+OPCODE(o5_equalZero),                   CHECK
+OPCODE(o5_expression),                  CHECK
+OPCODE(o5_faceActor),                   CHECK
+OPCODE(o5_findInventory),               CHECK
+OPCODE(o5_findObject),                  CHECK
+OPCODE(o5_freezeScripts),               CHECK
+OPCODE(o5_getActorCostume),             CHECK
+OPCODE(o5_getActorElevation),           CHECK
+OPCODE(o5_getActorFacing),              CHECK
+OPCODE(o5_getActorMoving),              CHECK
+OPCODE(o5_getActorRoom),                CHECK
+OPCODE(o5_getActorScale),               CHECK
+OPCODE(o5_getActorWalkBox),             CHECK
+OPCODE(o5_getActorWidth),               CHECK
+OPCODE(o5_getActorX),                   CHECK
+OPCODE(o5_getActorY),                   CHECK
+OPCODE(o5_getAnimCounter),              CHECK
+OPCODE(o5_getClosestObjActor),          CHECK
+OPCODE(o5_getDist),                     CHECK
+OPCODE(o5_getInventoryCount),           CHECK
+OPCODE(o5_getObjectOwner),              CHECK
+OPCODE(o5_getObjectState),              CHECK
+OPCODE(o5_getRandomNr),                 CHECK
+OPCODE(o5_getStringWidth),              CHECK
+OPCODE(o5_getVerbEntrypoint),           CHECK
+OPCODE(o5_ifClassOfIs),                 CHECK
+OPCODE(o5_ifNotState),                  CHECK
+OPCODE(o5_ifState),                     CHECK
+OPCODE(o5_increment),                   CHECK
+OPCODE(o5_isActorInBox),                CHECK
+OPCODE(o5_isEqual),                     CHECK
+OPCODE(o5_isGreater),                   CHECK
+OPCODE(o5_isGreaterEqual),              CHECK
+OPCODE(o5_isLess),                      CHECK
+OPCODE(o5_isNotEqual),                  CHECK
+OPCODE(o5_isScriptRunning),             CHECK
+OPCODE(o5_isSoundRunning),              CHECK
+OPCODE(o5_jumpRelative),                CHECK
+OPCODE(o5_lessOrEqual),                 CHECK
+OPCODE(o5_lights),                      CHECK
+OPCODE(o5_loadRoom),                    CHECK
+OPCODE(o5_loadRoomWithEgo),             CHECK
+OPCODE(o5_matrixOps),                   CHECK
+OPCODE(o5_move),                        CHECK
+OPCODE(o5_multiply),                    CHECK
+OPCODE(o5_notEqualZero),                CHECK
+OPCODE(o5_oldRoomEffect),               CHECK
+OPCODE(o5_or),                          CHECK
+OPCODE(o5_panCameraTo),                 CHECK
+OPCODE(o5_pickupObject),                CHECK
+OPCODE(o5_pickupObjectOld),             CHECK
+OPCODE(o5_print),                       CHECK
+OPCODE(o5_printEgo),                    CHECK
+OPCODE(o5_pseudoRoom),                  CHECK
+OPCODE(o5_putActor),                    CHECK
+OPCODE(o5_putActorAtObject),            CHECK
+OPCODE(o5_putActorInRoom),              CHECK
+OPCODE(o5_resourceRoutines),            CHECK
+OPCODE(o5_roomOps),                     CHECK
+OPCODE(o5_saveLoadVars),                CHECK
+OPCODE(o5_saveRestoreVerbs),            CHECK
+OPCODE(o5_setCameraAt),                 CHECK
+OPCODE(o5_setClass),                    CHECK
+OPCODE(o5_setObjectName),               CHECK
+OPCODE(o5_setOwnerOf),                  CHECK
+OPCODE(o5_setState),                    CHECK
+OPCODE(o5_setVarRange),                 CHECK
+OPCODE(o5_soundKludge),                 CHECK
+OPCODE(o5_startMusic),                  CHECK
+OPCODE(o5_startObject),                 CHECK
+OPCODE(o5_startScript),                 CHECK
+OPCODE(o5_startSound),                  CHECK
+OPCODE(o5_stopMusic),                   CHECK
+OPCODE(o5_stopObjectCode),              CHECK
+OPCODE(o5_stopObjectScript),            CHECK
+OPCODE(o5_stopScript),                  CHECK
+OPCODE(o5_stopSound),                   CHECK
+OPCODE(o5_stringOps),                   CHECK
+OPCODE(o5_subtract),                    CHECK
+OPCODE(o5_systemOps),                   CHECK
+OPCODE(o5_verbOps),                     CHECK
+OPCODE(o5_wait),                        CHECK
+OPCODE(o5_walkActorTo),                 CHECK
+OPCODE(o5_walkActorToActor),            CHECK
+OPCODE(o5_walkActorToObject)            CHECK


Property changes on: tools/branches/gsoc2007-decompiler/docs/v5opcodes.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list