The CiaoPP command-line interface

Author(s): The CLIP Group.

The command-line interface of CiaoPP allows the use of the system in batch mode, using command-line 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)
	ciaoppcl [-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)
       ciaoppcl -T 

  -T option starts a CiaoPP top-level shell.  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:

  ciaoppcl -Q myfile.pl
  ciaoppcl -o myfile_checked.pl -V myfile.pl
  ciaoppcl -O myfile.pl
  ciaoppcl -A myfile.pl -ftypes=terms -f modes=pd
  ciaoppcl -T

Description of the execution examples

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

    ciaoppcl -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:

    ciaoppcl -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:

    ciaoppcl -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:

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

  • Finally, the following command line can be used to start a top-level CiaoPP shell:

    ciaoppcl -T