var searchIndex = {}; searchIndex["sbrain"] = {"doc":"SBrain, or Semantic Brain, is a set of extensions to the famous language by Urban Müller\ndesigned to make it more amenable to genetic programming. Additions include a stack, a general-\npurpose register, and single-instruction arithmetic.","items":[[3,"SBrainVM","sbrain","A virtual machine modelling the SBrain Turing machine.\nThis machine implements the specification relatively strictly, providing exactly 2^16 (65536)\ndata and instruction cells. Thus, all pointers are 16 bits and all data is 32 bits.\nThe main deviation from the minimum specification is the jump stack, which is indefinitely\nexpandable.",null,null],[3,"EvalResult","","Represents the outcome of an evaluation by the SBrain VM.",null,null],[12,"output","","The output of the computation",0,null],[12,"cycles","","The number of cycles for which the machine ran",0,null],[12,"halted","","Whether or not the machine halted on its own. False means it was interrupted.",0,null],[4,"FlowAction","","FlowAction allows the VM's execution engine to implement flow control.\nBecause evaluation can only see a single instruction, it must use this struct to instruct the flow\ncontroller to perform flow control actions.",null,null],[13,"NoAction","","No flow control action is required.",1,null],[13,"SkipLoop","","The flow controller should skip to the next 5 (`]`), or loop end instructon.",1,null],[13,"Done","","The program is done.",1,null],[5,"source_to_tapes","","Given source code, create data and instruction tapes.",null,null],[5,"evaluate","","Run the program represented by the given source on a new Semantic Brain VM.\nIf Limit is None, this may never return; if it is Some(n), the machine will run for at most n\ncycles, then stop.",null,{"inputs":[{"name":"str"},{"name":"option"}],"output":{"name":"evalresult"}}],[5,"tape_to_string","","Convert a tape of MData cells into Unicode chars. Invalid chars are excluded, which could have\nsome unintended side effects for genesis based on string comparisons.",null,{"inputs":[{"name":"vec"}],"output":{"name":"string"}}],[0,"specification","","## What is SBrain?\n SBrain, or Semantic Brain, is a language based on Urban Müller's famous language with only 8 symbols (3 bit instructions). SBrain's additions increase the number of symbols to 32 (6 bit instructions) and adds a stack and a register.",null,null],[11,"new","","Return a new SBrainVM, with no data in any tapes.",2,{"inputs":[{"name":"option"}],"output":{"name":"sbrainvm"}}],[11,"boxed","","Return a new SBrainVM in a Box<>, with no data in any tapes.",2,{"inputs":[{"name":"option"}],"output":{"name":"box"}}],[11,"load_program","","Load a program tape: copy data from the given slice into the executable tape.\nOn error, the Err(s) return will contain a message describing the error.",2,null],[11,"load_data","","Load a data tape: copy data from the given slice into the VM's data tape.\nOn error, the Err(s) return will contain a message describing the error.",2,null],[11,"get_output","","Return a copy of the output data of the machine",2,null],[11,"run","","Run the machine, until completion (cycles = None) or for n cycles (cycles = Some(n)).\nReturn values are number of cycles run and why the machine stopped: false if due to a\nprogram halt (instr 31), false if due to running out of cycles.",2,null],[6,"MData","","The type of a data cell",null,null],[6,"MAddr","","The type of a pointer to a cell.",null,null]],"paths":[[3,"EvalResult"],[4,"FlowAction"],[3,"SBrainVM"]]}; initSearch(searchIndex);