Skip to content

Commit dfcd72e

Browse files
committed
improve help
1 parent 214942b commit dfcd72e

File tree

2 files changed

+41
-49
lines changed

2 files changed

+41
-49
lines changed

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,34 @@ Welcome to LODA developer version. More information at https://loda-lang.org/
2020
2121
Usage: loda <command> <options>
2222
23-
Core Commands:
24-
evaluate <program> Evaluate a program to an integer sequence (see -t,-b,-s)
25-
export <program> Export a program print result (see -o,-t)
26-
optimize <program> Optimize a program and print it
27-
minimize <program> Minimize a program and print it (see -t)
23+
Commands:
24+
eval <program> Evaluate an integer sequence program (see -t,-b,-s)
25+
check <program> Verify correctness of an integer sequence program (see -b)
26+
mine Mine programs for integer sequences (see -i,-p,-P,-H)
27+
submit <file> [id] Submit an integer sequence program to the central repository
28+
export <program> Export a program and print the result (see -o,-t)
29+
optimize <program> Optimize a program and print the result
30+
minimize <program> Minimize a program and print the result (see -t)
2831
profile <program> Measure program evaluation time (see -t)
29-
fold <program> <id> Fold a subprogram given by ID into a seq operation
30-
unfold <program> Unfold the first seq operation of a program
31-
32-
OEIS Commands:
33-
mine Mine programs for OEIS sequences (see -i,-p,-P,-H)
34-
check <program> Check a program for an OEIS sequence (see -b)
35-
mutate <program> Mutate a program and mine for OEIS sequences
36-
submit <file> [id] Submit a program for an OEIS sequence
37-
38-
Admin Commands:
32+
fold <program> <id> Fold a subprogram given by ID into a seq-operation
33+
unfold <program> Unfold the first seq-operation of a program
34+
mutate <program> Mutate a program to mine for integer sequences
3935
setup Run interactive setup to configure LODA
40-
update Update OEIS and program data (no version upgrade)
36+
update Update integer sequence and program data
4137
upgrade Check for and install the latest LODA version
4238
4339
Targets:
4440
<file> Path to a LODA file (file extension: *.asm)
45-
<id> ID of an OEIS integer sequence (example: A000045)
41+
<id> ID of an integer sequence (example: A000045)
4642
<program> Either an <file> or an <id>
4743
4844
Options:
4945
-t <number> Number of sequence terms (default: 8)
5046
-b Print result in the OEIS b-file format
5147
-o <string> Export format (formula,loda,pari,range)
5248
-d Export with dependencies to other programs
53-
-s Evaluate program to number of execution steps
54-
-c <number> Maximum number of interpreter cycles (no limit: -1)
49+
-s Evaluate program and return number of execution steps
50+
-c <number> Maximum number of execution steps (no limit: -1)
5551
-m <number> Maximum number of used memory cells (no limit: -1)
5652
-z <number> Maximum evaluation time in seconds (no limit: -1)
5753
-l <string> Log level (values: debug,info,warn,error,alert)

src/cmd/commands.cpp

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,41 @@ void Commands::help() {
4646
<< ". More information at https://loda-lang.org/" << std::endl
4747
<< std::endl;
4848
std::cout << "Usage: loda <command> <options>" << std::endl << std::endl;
49-
std::cout << "Core Commands:" << std::endl;
50-
std::cout << " evaluate <program> Evaluate a program to an integer "
51-
"sequence (see "
52-
"-t,-b,-s)"
49+
std::cout << "Commands:" << std::endl;
50+
std::cout << " eval <program> Evaluate an integer sequence program "
51+
"(see -t,-b,-s)"
52+
<< std::endl;
53+
std::cout << " check <program> Verify correctness of an integer "
54+
<< "sequence program (see -b)" << std::endl;
55+
std::cout << " mine Mine programs for integer sequences "
56+
"(see -i,-p,-P,-H)"
5357
<< std::endl;
5458
std::cout
55-
<< " export <program> Export a program print result (see -o,-t)"
59+
<< " submit <file> [id] Submit an integer sequence program to the "
60+
"central repository"
5661
<< std::endl;
57-
std::cout << " optimize <program> Optimize a program and print it"
62+
std::cout << " export <program> Export a program and print the result "
63+
"(see -o,-t)"
64+
<< std::endl;
65+
std::cout << " optimize <program> Optimize a program and print the result"
5866
<< std::endl;
59-
std::cout << " minimize <program> Minimize a program and print it (see -t)"
67+
std::cout << " minimize <program> Minimize a program and print the result "
68+
"(see -t)"
6069
<< std::endl;
6170
std::cout << " profile <program> Measure program evaluation time (see -t)"
6271
<< std::endl;
6372
std::cout << " fold <program> <id> Fold a subprogram given by ID into a "
64-
"seq operation"
73+
"seq-operation"
6574
<< std::endl;
66-
std::cout << " unfold <program> Unfold the first seq operation of a "
75+
std::cout << " unfold <program> Unfold the first seq-operation of a "
6776
"program"
6877
<< std::endl;
69-
70-
std::cout << std::endl << "OEIS Commands:" << std::endl;
71-
std::cout << " mine Mine programs for OEIS sequences (see "
72-
"-i,-p,-P,-H)"
73-
<< std::endl;
74-
std::cout << " check <program> Check a program for an OEIS sequence "
75-
"(see -b)"
78+
std::cout << " mutate <program> Mutate a program to mine for integer "
79+
"sequences"
7680
<< std::endl;
77-
std::cout
78-
<< " mutate <program> Mutate a program and mine for OEIS sequences"
79-
<< std::endl;
80-
std::cout << " submit <file> [id] Submit a program for an OEIS sequence"
81-
<< std::endl;
82-
83-
std::cout << std::endl << "Admin Commands:" << std::endl;
8481
std::cout << " setup Run interactive setup to configure LODA"
8582
<< std::endl;
86-
std::cout << " update Update OEIS and program data (no "
87-
"version upgrade)"
83+
std::cout << " update Update integer sequence and program data"
8884
<< std::endl;
8985
std::cout << " upgrade Check for and install the latest LODA "
9086
<< "version" << std::endl;
@@ -93,9 +89,9 @@ void Commands::help() {
9389
std::cout
9490
<< " <file> Path to a LODA file (file extension: *.asm)"
9591
<< std::endl;
96-
std::cout << " <id> ID of an OEIS integer sequence "
97-
"(example: A000045)"
98-
<< std::endl;
92+
std::cout
93+
<< " <id> ID of an integer sequence (example: A000045)"
94+
<< std::endl;
9995
std::cout << " <program> Either an <file> or an <id>"
10096
<< std::endl;
10197

@@ -110,10 +106,10 @@ void Commands::help() {
110106
std::cout
111107
<< " -d Export with dependencies to other programs"
112108
<< std::endl;
113-
std::cout << " -s Evaluate program to number of "
109+
std::cout << " -s Evaluate program and return number of "
114110
"execution steps"
115111
<< std::endl;
116-
std::cout << " -c <number> Maximum number of interpreter cycles "
112+
std::cout << " -c <number> Maximum number of execution steps "
117113
"(no limit: -1)"
118114
<< std::endl;
119115
std::cout << " -m <number> Maximum number of used memory cells "

0 commit comments

Comments
 (0)