1. 21 Jan, 2020 5 commits
    • Etienne Renault's avatar
      Blackbox and global variables are not supported. · 152a00a4
      Etienne Renault authored
      If a Blackbox (BB) function modifies variable that is also used inside
      of a non-blackbox function the following problem occurs: the variable
      cannot be neither in the blackbox package neither in the normal
      package.
      
      We should try to resolve this problem by :
         (1) analysis wether variables are exclusively used by BB-fun
         (2) pass setter as additionnal argument to BB-functions
      
      Still for now it is preferable to forbbids BB and globals.
      
      * main.go, transform/checktype.go: Here.
      152a00a4
    • Etienne Renault's avatar
      Bug fix when -rers option is not available · 894a07f1
      Etienne Renault authored
      * boilerplate/main.go, main.go: Here.
      894a07f1
    • Etienne Renault's avatar
      Avoid parsing errors for options · 710ca455
      Etienne Renault authored
      * main.go: Here.
      710ca455
    • Etienne Renault's avatar
      Add support for RERS. · 4c4096bd
      Etienne Renault authored
      In RERS challenges, file are written in C and
      the environment is modelled by scanf("%d",...).
      
      During the translation, this statement has been
      converted into __RERS__ = __RERS__ + 1, since this
      variable is only used to represents the environment.
      
      As a consequence, the option -rers "1;2;3" will modify
      the previous assignment in order to represent the
      environment. In other this instruction will be replaced
      by three assignment
         - __RERS__ = 1
         - __RERS__ = 2
         - __RERS__ = 3
      while  the instruction __RERS__ = __RERS__ + 1 will be discarded
      
      * boilerplate/main.go, main.go: Here.
      4c4096bd
    • hmoreau's avatar
      Generate successors for channels · 1db6bf82
      hmoreau authored
      * boilerplate/main.go,
        channel/channel.go,
        decl/decl.go,
        main.go,
        transform/afterchannels.go,
        transform/channels.go: Here.
      1db6bf82
  2. 17 Jan, 2020 2 commits
    • hmoreau's avatar
      New channel package created · 8f3889b9
      hmoreau authored
      In order to recover more easily where the channels are set up, a new
      package has been created, giving details about it.
      
      * boilerplate/main.go,
        channel/channel.go,
        decl/decl.go,
        main.go: Here.
      8f3889b9
    • hmoreau's avatar
      Channel treatment integrated to compileTo · 734cfb2d
      hmoreau authored
      Channels are now treated with all the other transform
      
      * main.go,
        transform/channels.go: Here.
      734cfb2d
  3. 12 Dec, 2019 1 commit
  4. 11 Dec, 2019 1 commit
    • hmoreau's avatar
      Alive transform now apply only for the array · 8e7f25c5
      hmoreau authored
      In order to be clearer, there is now only one alive statement for array
      and no more alive statements for every cases of the array.
      
      * main.go,
        transform/arraytreatment.go: Here.
      8e7f25c5
  5. 09 Dec, 2019 1 commit
  6. 04 Dec, 2019 1 commit
  7. 29 Nov, 2019 1 commit
    • hmoreau's avatar
      Displays channel information · 0f24fee3
      hmoreau authored
      use `./go2pins -chaninfo <file>` to display channel information
      
      * main.go,
        transform/channels.go: Here.
      0f24fee3
  8. 27 Nov, 2019 1 commit
  9. 26 Nov, 2019 2 commits
  10. 25 Nov, 2019 1 commit
    • hmoreau's avatar
      New transform for integrating arrays · 32304c62
      hmoreau authored
      This transform allow arrays to generate state cell for arrays composant.
      Need to integrate the make generation of array.
      
      * main.go,
        transform/arraytreatment.go: Here.
      32304c62
  11. 22 Nov, 2019 2 commits
  12. 20 Nov, 2019 1 commit
    • hmoreau's avatar
      duplicateGoroutines() simplified · f4933762
      hmoreau authored
      In order to have a simplier transformation later, duplicateGoroutines
      modify '*ast.GoStmt' with the new name.
      
      * main.go: Here.
      f4933762
  13. 19 Nov, 2019 2 commits
    • hmoreau's avatar
      main.go: Removed printAst func · 0e466683
      hmoreau authored
      * main.go: Here.
      0e466683
    • hmoreau's avatar
      Array of states to one specific state · 865b7cb4
      hmoreau authored
      The previous design allowed functions to return an array of multiple
      states, but now they are all dedicated to computing one specific state.
      
      GoRoutineFunc has been changed.
      G2PMain structure has been totally changed.
      
      * boilerplate/main.go,
        main.go,
        transform/cfg/transform.go,
        transform/functiondefs.go: Here.
      865b7cb4
  14. 18 Nov, 2019 9 commits
  15. 16 Nov, 2019 2 commits
  16. 22 Oct, 2019 2 commits
    • hmoreau's avatar
      tools/blackbox: Detecting sub-functions · 09037f49
      hmoreau authored
      In order to be transparent, blackbox now detects when there is call to
      other function in function to be ignored. This sub-functions are ignored
      and the user can decide if he wants it or not.
      
      * main.go,
        tools/blackbox.go : Here.
      09037f49
    • hmoreau's avatar
      tools/blackbox: handling multiple call in dif func · d664061f
      hmoreau authored
      If a function is ignored and it has sub-functions, this sub-functions
      are cloned into blackbox package and are ignored when the function is
      called, perhaps if this sub-function are called from outside, they are
      still handled by go2pins.
      
      Need to be handled next :
        - Ask user if he is ok with that
        - Handle recursion for each package(main/ blackbox)
      
      * main.go,
        tools/blackbox : Here.
      d664061f
  17. 16 Oct, 2019 1 commit
    • hmoreau's avatar
      Blackbox tool created · a27957f9
      hmoreau authored
      go2pins can now a function in the process of compiling
      Need to improve to ignore multiple functions
      
      * transform/checktype.go,
        tools/blackbox.go,
        main.go : Here.
      a27957f9
  18. 14 Oct, 2019 2 commits
  19. 11 Oct, 2019 3 commits
    • hmoreau's avatar
      tools/formating.go call updated · 7779a3af
      hmoreau authored
      * main.go : Here.
      7779a3af
    • hmoreau's avatar
      New tool: formating · 0935eb6a
      hmoreau authored
      For a better comprehension when reading the output files,
      the output is directly formated.
      G2PVariableNames is now easier to read.
      
      * tools/formating.go,
        main.go : Here.
      0935eb6a
    • hmoreau's avatar
      New transformation: Alive · 1a359102
      hmoreau authored
      This transform will add a "boolean" in order to tell
      when a variable has been set.
      
      * transform/alive.go,
        main.go : Here.
      1a359102