diff --git a/examples/bench_11/main.c b/examples/bench_11/main.c new file mode 100644 index 0000000000000000000000000000000000000000..98526b97f13450f199f77174d208a3c21a32f62f --- /dev/null +++ b/examples/bench_11/main.c @@ -0,0 +1,60 @@ +#include +#include "../../reowolf.h" +#include "../utility.c" +int main(int argc, char** argv) { + int i, j, forwards, num_options, correct_index; + forwards = atoi(argv[1]); + num_options = atoi(argv[2]); + correct_index = atoi(argv[3]); + printf("forwards %d, num_options %d, correct_index %d\n", + forwards, num_options, correct_index); + unsigned char pdl[] = + "primitive recv_zero(in a) { " + " while(true) synchronous {" + " msg m = get(a); " + " assert(m[0] == 0); " + " } " + "} " + ; + Arc_ProtocolDescription * pd = protocol_description_parse(pdl, sizeof(pdl)-1); + printf("Error str `%s`\n", reowolf_error_peek(NULL)); + char logpath[] = "./bench_11.txt"; + Connector * c = connector_new_logging(pd, logpath, sizeof(logpath)-1); + + PortId native_putter, native_getter; + connector_add_port_pair(c, &native_putter, &native_getter); + for (i=0; i