
This is the top-level and command-line interface to CiaoPP. Please look at ciaopp documentation for top-level usage information. The command-line interface allows the use of the system in batch mode, using arguments for setting preprocessor flags and performing actions.
This interface can be used by means of the following command-line options:
Usage 1: (batch mode)
ciaopp [OPTIONS] Action Filename [FlagsValues]
Where:
-o <OutFile>
after processing Filename, the resulting source
code is written to OutFile. If this option is
omitted, the output is written to a file
automatically named depending on the actions
performed.
-op <Suffix>
Use Suffix as the optional input code suffix
--cwd Dir
Switch to the selected directory
--timeout Timeout
Execute with a timeout limit (ms).
Default is 0 (no timeout).
Action must be one of the following:
-Q runs the interactive (text-based) menu for
preprocessing Filename.
-A analyzes Filename with the default options
except the flag values set with -f at the
command line.
-O optimizes Filename with the default options
except the flag values set with -f at the
command line.
-V verifies the assertions of Filename with
the default options except the flag values set
with -f at the command line.
-U <Config>
processes Filename with the options set in the
configuration Config.
FlagsValues is a list of options -fFlagName=FlagValue
separated by blank spaces, where FlagName is a valid
CiaoPP flag name. This list is optional, and does not need
to include all flags applicable to the action to be performed:
the flags not included in this list will be assumed to take
their default value. Examples:
-flocal_control=on
where local_control is expected to be
a CiaoPP flag;
-f local_control=on
same as above, with additional blank spaces
Internal flags can also be changed using -pIntFlagName=Value.
Usage 2: (top-level mode)
ciaopp -T <toplevel-opts>
-T starts a CiaoPP top-level shell (using <toplevel-opts> as
options for the toplevel). Any of the predicates described
in the Section 'CiaoPP User Menu Interface' of the CiaoPP
Reference Manual can be used in this top-level.
Usage 3: cache libraries
ciaopp --gen-lib-cache
Preloads libraries for faster load in CiaoPP toplevel
Execution Examples:
ciaopp -Q myfile.pl
ciaopp -o myfile_checked.pl -V myfile.pl
ciaopp -O myfile.pl
ciaopp -A myfile.pl -ftypes=terms -f modes=pd
ciaopp -T
ciaopp -Q myfile.pl
ciaopp -o myfile_checked.pl -V myfile.pl
ciaopp -O myfile.pl
ciaopp -A myfile.pl -ftypes=terms -f modes=pd
ciaopp -T