autoperm 0.3.0

A tool for generating brainfuck programs that apply stack effect diagrams
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// The assumed model of computation
pub trait Model {
    /// The final program output type
    type Output;

    /// Sets the top of the stack to a given index
    /// 
    /// This function should generate a no-op. It is used just to communicate the starting state
    fn start(&mut self, cell: isize);
    /// Clears a cell to 0
    fn clear(&mut self, cell: isize);
    /// Clears the data in a cell and copies it to a list of other cells
    fn mov(&mut self, cell: isize, to: Vec<isize>);
    /// Changes the top of the stack to a given index
    fn top(&mut self, cell: isize);
    /// Returns the final program output.
    fn finish(self) -> Self::Output;
}