<commit_before># Abacus Machine Simulator
<NAME>, 2016
For PHIL 1880, Spring 2016, Brown University ([http://rgheck.frege.org/](Prof. <NAME>))

## Attribution
This work is released under [The MIT License](./LICENSE). It uses a parser generated by [PEG.js](http://pegjs.org/) for parsing, and [CodeMirror](http://codemirror.net/) with packages for syntax highlighting.

## Language
The `abacusmachine` language is desgined to be a simple and effective language for specifying abacus machines. It comes with built-in testing and scope features to make it easier to build complex functions and verify code correctness.

### Control Flow

Control flow proceeds sequentially forwards unless changed by a `goto` or branching within a register command. Jump anchors are specified at the start of a line with a leading `:`. All names must begin with a letter and can include letters, numbers, and `_`. Examples are:
```
	:anchor_name
	:this123 /* code continues on this line */
```

Within register commands, either `next` or `~` can be used to refer to the next line instead of an anchor. You cannot place an anchor on the same line as a `goto`.


### Registers

As with any abacus machine, an unlimited number of registers storing natural numbers are available. Registers are always specified by square brackets, and may be defined numerically (`[1]`, `[5]`, etc.) or by name (`[ret_val]`, `[arg1]`, etc.). Registers contain the value 0 by default.

Two operations can be performed on registers, addition and subtraction. They are written as:
```
  
  [7]+; // Increment register 1 and continue.
  [7]-; // Decrement register 1 and continue.
  [7]+, next;      // Increment and go to the next line.
  [7]-, :start, ~; // Decrement, and if the register is
                   //  still positive go to :start. If
                   //  zero, go to the next line.
```


### Functions
<commit_msg>FIX: Included mention of loop detector.<commit_after># Abacus Machine Simulator
<NAME>, 2016
For PHIL 1880, Spring 2016, Brown University ([http://rgheck.frege.org/](Prof. <NAME>))

## Attribution
This work is released under [The MIT License](./LICENSE). It uses a parser generated by [PEG.js](http://pegjs.org/) for parsing, and [CodeMirror](http://codemirror.net/) with packages for syntax highlighting.

## Language
The `abacusmachine` language is desgined to be a simple and effective language for specifying abacus machines. It comes with built-in testing and scope features to make it easier to build complex functions and verify code correctness.

### Control Flow

Control flow proceeds sequentially forwards unless changed by a `goto` or branching within a register command. Jump anchors are specified at the start of a line with a leading `:`. All names must begin with a letter and can include letters, numbers, and `_`. Examples are:
```
	:anchor_name
	:this123 /* code continues on this line */
```

Within register commands, either `next` or `~` can be used to refer to the next line instead of an anchor. You cannot place an anchor on the same line as a `goto`.

Runtime detection of infinite loops has been implemented, so some types of infinite loops will stop the engine automatically.

### Registers

As with any abacus machine, an unlimited number of registers storing natural numbers are available. Registers are always specified by square brackets, and may be defined numerically (`[1]`, `[5]`, etc.) or by name (`[ret_val]`, `[arg1]`, etc.). Registers contain the value 0 by default.

Two operations can be performed on registers, addition and subtraction. They are written as:
```
  
  [7]+; // Increment register 1 and continue.
  [7]-; // Decrement register 1 and continue.
  [7]+, next;      // Increment and go to the next line.
  [7]-, :start, ~; // Decrement, and if the register is
                   //  still positive go to :start. If
                   //  zero, go to the next line.
```


### Functions

{'fraction_non_alphanumeric': 0.09582059123343527, 'fraction_numerical': 0.0127420998980632, 'mean_word_length': 3.6893667861409796, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2510635', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1010, 'n_words': 548}