The CiaoPP command-line interface

Author(s): The Ciao Development Team.

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.

Command-line options

This interface can be used by means of the following command-line options:

Usage 1: (batch mode)
	ciaopp [-o OutFile] Option 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.

    Option 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 CiaoPP 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 option 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.

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

Description of the execution examples

  • The following command will prompt the user with the options needed to preprocess myfile.pl:

    ciaopp -Q myfile.pl

  • If we want to verify the assertions of myfile.pl, and generate the resulting source code that will the new status of the assertions (either checked, if CiaoPP has proved that the assertion holds, or false if it has falsified the assertion), the command line is as follows:

    ciaopp -o myfile_checked.pl -V myfile.pl

  • To optimize myfile.pl, and write the optimize code in a file named automatically (e.g., myfile_pd_codegen_af_co.pl), the following command line must be used:

    ciaopp -O myfile.pl

  • If the default flag values need to be changed, the -f option can be used. For example, in order to analyze myfile.pl to change the types analysis domain to terms instead of the default one, and the mode-aliasing domain to pd, the command line to use should be:

    ciaopp -A myfile.pl -ftypes=terms -f modes=pd

  • Finally, the following command line can be used to start a top-level CiaoPP shell (this is the default behavior):

    ciaopp -T