<commit_before>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>

int r;

int f(int i, int n) {
	return n + 2 * i * r * r; 
}

int main(int argc, char* argv[]) {
	if (argc < 2) { 
		fprintf(stderr, "Provide a parameter r > 0 for the size of the insertion system.\n");
		return EXIT_FAILURE;
	}

	r = atoi(argv[1]);
	if (r < 1) {
		fprintf(stderr, "Provided r=%d is not positive.\n", r);
		return EXIT_FAILURE;
	}

        // x is a symbol not found anywhere else 
	int x = f(16, 0);

	printf("# Monomers generated by superfastgrowingis.\n");
	printf("# Parameters:\n#r = %d\n#x = %d\n\n", r, x);<commit_msg>Added documentation to superfastgrowingis.<commit_after>/*
Author: <NAME> (<EMAIL>)

Program for generating an insertion system that deterministically
constructs a very long monomer very quickly, following the algorithm 
described in the proof of Theorem 4.2 of http://arxiv.org/abs/1401.0359

The program takes a positive integer r as a command-line argument,
and prints the resulting insertion system to stdout. 
This output can be piped directly into simulator.

The system deterministically constructs a polymer 
of length 2^{Theta(r^3)}. Some example values for r:
r = 1, length = 245 
r = 2, length = 3154033
*/

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>

int r;

int f(int i, int n) {
	return n + 2 * i * r * r; 
}

int main(int argc, char* argv[]) {
        // Parse command-line arguments
	if (argc < 2) { 
		fprintf(stderr, "Provide a parameter r > 0 for the size of the insertion system.\n");
		return EXIT_FAILURE;
	}

	r = atoi(argv[1]);
	if (r < 1) {
		fprintf(stderr, "Provided r=%d is not positive.\n", r);
		return EXIT_FAILURE;
	}

        // x is a symbol not found anywhere else 
	int x = f(16, 0);

        fprintf(stdout, "# Insertion ystem generated by superfastgrowingis using algorithm from\n");
        fprintf(stdout, "# <NAME>, <NAME>, <NAME>,\n");
	fprintf(stdout, "# \"Tight bounds for active self-assembly using an insertion primitive\",\n");
        fprintf(stdout, "# http://arxiv.org/abs/1401.0359\n\n");
{'fraction_non_alphanumeric': 0.13500482160077146, 'fraction_numerical': 0.023143683702989394, 'mean_word_length': 3.4527896995708156, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3178238', 'n_tokens_mistral': 766, 'n_tokens_neox': 705, 'n_words': 258}