caml-urm
A OCaml module for manipulating unlimited register machines
urm.1 (1984B)
1 '\" t 2 .\" _ _ _ __ _ __ ___ 3 .\" | | | | '__| '_ ` _ \ 4 .\" | |_| | | | | | | | | 5 .\" \__,_|_| |_| |_| |_| 6 .\" 7 .\" Unlimited Register Machine simulator 8 .\" 9 .\" Copyright (C) 2023 Pablo 10 .\" Free use of this software is granted under the terms of the GPL-3.0 License 11 .TH "MAN" "1" "2023-03-19" "\ \&" "\ \&" 12 .ie \n(.g .ds Aq \(aq 13 .el .ds Aq ' 14 .ss \n[.ss] 0 15 .nh 16 .ad l 17 .de URL 18 \fI\\$2\fP <\\$1>\\$3 19 .. 20 .als MTO URL 21 .if \n[.g] \{\ 22 . mso www.tmac 23 . am URL 24 . ad l 25 . . 26 . am MTO 27 . ad l 28 . . 29 . LINKSTYLE blue R < > 30 .\} 31 .SH "SYNOPSIS" 32 .sp 33 A simple Unlimited Register Machine (URM) simulator 34 .SH "USAGE" 35 .sp 36 \fBurm\fP \fIFILE\fP [-i \fIITERS\fP] [-R\fIN\fP=\fIV\fP...] [-R\fIN\fP...] 37 .SH "OPTIONS" 38 .sp 39 \fB-i\fP \fIITERS\fP 40 .RS 4 41 Sets the maximum number of iterations allowed to \fIITERS\fP: an arbitrary 42 program may not halt for a given input and this option configures how much 43 instructions is the machine allowed to run before failing with an error. 44 Defaults to \fI1073741824\fP 45 .RE 46 .sp 47 \fB-R\fP\fIN\fP=\fIV\fP 48 .RS 4 49 Sets the initial value of the \fIN\fP-th register to \fIV\fP 50 .RE 51 .sp 52 \fB-R\fP\fIN\fP 53 .RS 4 54 Prints the value of the \fIN\fP-th register at the end of execution 55 .RE 56 .SH "EXAMPLES" 57 .sp 58 .if n .RS 4 59 .nf 60 .fam C 61 $ # computes R1 mod R2 and stores it in R3 62 $ ./urm examples/mod.urm \-R1=2023 \-R2=5 \-R3 63 R3 = 3 64 .fam 65 .fi 66 .if n .RE 67 .sp 68 .if n .RS 4 69 .nf 70 .fam C 71 $ # computes the R1\-th Fibonacci number and stores it in R2 72 $ ./urm examples/fibonacci.urm \-R1=12 \-R2 73 R2 = 144 74 .fam 75 .fi 76 .if n .RE 77 .sp 78 .if n .RS 4 79 .nf 80 .fam C 81 $ # computes the factorial of R1 and stores it in R2 82 $ ./urm examples/factorial.urm \-R1=6 \-R2 83 R2 = 720 84 .fam 85 .fi 86 .if n .RE 87 .SH "AUTHORS" 88 .sp 89 \fBurm\fP was written by Pablo 90 <\c 91 .MTO "pablo\-escobar\(atriseup.net" "" ">." 92 .SH "RESOURCES" 93 .sp 94 \fBGit source repository:\fP \c 95 .URL "https://git.pablopie.xyz/caml\-urm/" "" "" 96 .SH "COPYING" 97 .sp 98 Copyright (C) 2023 Pablo. 99 Free use of this software is granted under the terms of the GPL\-3.0 License.