1. 09 Jul, 2018 4 commits
    • Daniel Kraft's avatar
      Bump version to 0.2. · 4812542d
      Daniel Kraft authored
      0.1 has been released now, so set the version on head to 0.2.
      4812542d
    • Daniel Kraft's avatar
      Add small "release notes" to NEWS. · 6553d634
      Daniel Kraft authored
      0.1 will be released now.  Add this with date to NEWS.
      6553d634
    • Daniel Kraft's avatar
      Fix "make distcheck". · 627e217f
      Daniel Kraft authored
      Small fixes to get "make distcheck" to work.  Mainly missing files for
      EXTRA_DIST and using $srcdir in tests properly to make them work with a
      builddir that is not the source directory.
      627e217f
    • Daniel Kraft's avatar
      Format README as proper Markdown. · 469abd51
      Daniel Kraft authored
      The README file was pure text with some structure, but not proper
      Markdown.  This change formats it as such (and renames to README.md to
      imply the format).  No actual content is changed.
      469abd51
  2. 14 May, 2017 1 commit
    • Daniel Kraft's avatar
      Implement [] looping instructions. · d18d103a
      Daniel Kraft authored
      Add support for the "conditional loop" instructions [], according to the
      design already described in the README file.  This makes support for all
      of the Brainfuck language complete.
      d18d103a
  3. 07 May, 2017 2 commits
    • Daniel Kraft's avatar
      Switch to C++14. · ed2cfc6c
      Daniel Kraft authored
      Update the Makefiles to set C++14 as standard.  This allows us to use
      std::make_unique.
      ed2cfc6c
    • Daniel Kraft's avatar
      Add test for compiling empty program. · c5f4d123
      Daniel Kraft authored
      Add a "golden" test that compiling and running an empty program works.
      Also restructure the handling of end-of-program in the compiler loop a
      bit, which will make it easier to fit looping into it.
      c5f4d123
  4. 22 Apr, 2017 2 commits
  5. 19 Mar, 2017 2 commits
    • Daniel Kraft's avatar
      Wire increment operation + through compiler. · 3e2a418d
      Daniel Kraft authored
      Add support (and a corresponding golden test) for + in the compiler.
      Includes some refactoring of the instruction classes to make it simpler
      to add.
      3e2a418d
    • Daniel Kraft's avatar
      Implement increment operation basics. · dc7b8103
      Daniel Kraft authored
      Add a new Arithmetic class that complements the Tape of a program with a
      basic arithmetic unit.  It can increment the tape's head for now, based
      on the design already described in the README.
      
      This is not yet wired through to the compiler, which will use this to
      implement + instructions.
      dc7b8103
  6. 12 Mar, 2017 1 commit
  7. 11 Mar, 2017 3 commits
    • Daniel Kraft's avatar
      Add golden data test for neuralbf compiler. · ac666651
      Daniel Kraft authored
      Add a script that compiles predefined programs and runs them with
      specified input data.  The output is then compared to a golden file.
      ac666651
    • Daniel Kraft's avatar
      Implement stop neuron in compiler. · 4c819171
      Daniel Kraft authored
      Make the compiler add a stop neuron and properly connect it to the last
      instruction at end-of-program.
      4c819171
    • Daniel Kraft's avatar
      Add stop neuron to program ABI. · b187abb5
      Daniel Kraft authored
      Instead of always executing a program until EOF is received on input,
      allow the program to indicate that it wants to stop by activating a
      special stop neuron.  Add this to the program execution ABI and the IO
      format and tests.
      
      This is not yet supported by the compiler.  Creating a stop neuron and
      connecting it for end-of-program is the next step.
      b187abb5
  8. 05 Mar, 2017 6 commits
    • Daniel Kraft's avatar
      Fix compilation of tape shifts and startup. · f4a905fc
      Daniel Kraft authored
      There were two bugs in the compilation, one with the startup triggering
      (activator was active for two cycles instead of one) and one with the
      tape shifting (that needs one cycle more delay).  Fix those.
      f4a905fc
    • Daniel Kraft's avatar
      Add execution logging to runner. · 3d5b0455
      Daniel Kraft authored
      Add (disabled, but can be enabled with a compile-time constant) logic to
      verbosely log the status of the execution while running a network.  This
      is useful for debugging.
      
      Also make sure to always flush the output when something is written.
      3d5b0455
    • Daniel Kraft's avatar
      Set IDs of neurons from the compiler. · 50f5d77d
      Daniel Kraft authored
      For all the neurons constructed by the compiler, set descriptive IDs.
      50f5d77d
    • Daniel Kraft's avatar
      Optionally allow setting a string ID for neurons. · 60e9fcc1
      Daniel Kraft authored
      This string ID, if set, will be used for the ID when serialising.  It is
      set to the input ID for neurons read from an ASCII file.
      
      In the future, we can make the compiler set descriptive IDs on the
      neurons it generates, so that debugging the generated output networks is
      easier.
      60e9fcc1
    • Daniel Kraft's avatar
      Allow neuralbf compiler to save output to file. · 4c03751e
      Daniel Kraft authored
      Add a new usage option for the neuralbf compiler to save the output
      network/program to an ASCII file (using the new Writer) instead of
      "just" running it from memory.
      
      This will be useful for debugging in the future.
      4c03751e
    • Daniel Kraft's avatar
      Implement serialisation of programs and networks. · fac8fdac
      Daniel Kraft authored
      Add a Writer class (complementing the Reader) that can serialise
      networks and programs to the ASCII format.  This will be useful for
      debugging compiler output.
      
      To test it, we do an IO roundtrip of the copy.txt program before running
      it in the runner.sh test.
      fac8fdac
  9. 01 Jul, 2016 1 commit
    • Daniel Kraft's avatar
      Move program runner logic to Program. · ec0691fc
      Daniel Kraft authored
      Instead of duplicating the logic to run a program with input and output
      in both runner.cpp and interpreter.cpp, move the logic to the general
      Program class and reuse it twice.
      ec0691fc
  10. 29 Jun, 2016 1 commit
    • Daniel Kraft's avatar
      Start implementing the actual compiler. · 7877f501
      Daniel Kraft authored
      Add the framework for actually "compiling" instructions, chaining them
      together, and for .,<>.  There are still some problems, though, that
      need to be sorted out; in particular, we need an ABI for finishing the
      program without waiting for input, and the network runner should be
      factored out of runner.cpp and interpreter.cpp.
      
      +- and [] are still completely missing.
      7877f501
  11. 27 Jun, 2016 4 commits
    • Daniel Kraft's avatar
      Change input ABI: want active control neuron. · 9c098e76
      Daniel Kraft authored
      Change the input semantics such that an active control neuron signals
      readiness for input, just as with output.  Since neurons are inactive at
      the beginning of the program, this is necessary to give full control to
      the program; otherwise, we would always signal readiness for input right
      at the beginning.
      9c098e76
    • Daniel Kraft's avatar
      Document plan for [] instructions. · 229d39d9
      Daniel Kraft authored
      229d39d9
    • Daniel Kraft's avatar
      7d7b0bee
    • Daniel Kraft's avatar
      Change linking model used for flow neurons in Tape. · 15fd3479
      Daniel Kraft authored
      Previous:  Tape owns activation neuron and links to (not owned)
      activation neuron of the following instruction.
      
      Now:  Tape gets pointed to the previous instruction's flow neuron and
      returns its own (owned) neuron that signals finishing.
      
      The new model is more suited to efficiently implementing the Brainfuck
      instructions in the future.  It is more flexible, since it is up to the
      instructions how to connect the previous instruction's activation neuron
      to their own neurons (for instance, could connect twice or with
      non-one weights).  This also puts neuron construction, including
      choosing the thresholds, under control of the instruction that is
      concerned.
      15fd3479
  12. 26 Jun, 2016 1 commit
    • Daniel Kraft's avatar
      Implement logic for the memory tape. · 52140e99
      Daniel Kraft authored
      Create a class that produces the network structure for the memory tape
      as described in the README for the compiler.  This already implements,
      basically, the tape itself (storage) and the <> operations in Brainfuck.
      52140e99
  13. 19 Jun, 2016 3 commits
  14. 16 Jun, 2016 1 commit
  15. 13 Jun, 2016 1 commit
  16. 09 Jun, 2016 2 commits
  17. 08 Jun, 2016 1 commit
    • Daniel Kraft's avatar
      Implement basic neuron. · f1efaef3
      Daniel Kraft authored
      The neurons can form a graph, fire signals (if active) and update their
      own activation status.  Includes a very basic unit test.
      f1efaef3
  18. 07 Jun, 2016 2 commits