next up previous
Next: Tips and Tricks Up: CCL The Computation and Previous: Defining External Functions in

Invoking ccli

The ccli command has the following general form.

ccli file.ccl <args|options>*
That is, the first argument to ccli is a file containing CCL code. The rest of the arguments are either arguments to your CCL program or, if they begin with a leading ``-'' (a dash or minus sign), they are options to ccli. The arguments to your program are available via the ARGV and ARGC variables as discussed in Section [*]. The options are stripped before being put in the in ARGV array (and do not count toward the size of ARGC). The options are put as strings into a global variable called OPTIONS just in the off chance that your program might need to know about them. At present, ccli takes the following options.
-pstring
Defines the name of the main program to be executed to be string. If this option is not given, then the name main is used, as discussed above.
-r
Tell ccli to executes the clauses in the main program in a random order. Normally the clauses are executed in order of appearance in the main program. With the -r option, each clause is executed once before any can be executed again. A sequence of steps wherein each clause is executed once is called an EPOCH. Each epoch has a different ordering. Using this option allows you to see the effect of arbitrary orderings on your program -- in case you are interested in modeling distributed interleaved systems.
-d
Tells ccli to execute the main program using a simple, single-stepping debugger. The commands are executed in order. After all variables are initialized, a command prompt is printed along with a line number and file name of the next guard or command set to be executed. At this prompt you may run the following commands:
s
Execute the currently printed guard or command and move to the next.
p var
Print the value of the variable var.
t n
Print the symbols and their values in top n scopes.
T
Print the symbols and their values in all scopes.
q
Quit.
l
Clear the screen.
h
Print a very simple help message.
Note: the -r and -d options cannot be used together.


next up previous
Next: Tips and Tricks Up: CCL The Computation and Previous: Defining External Functions in
Eric Klavins 2003-12-03