atscc


The command atscc is a wrapper for convenience around the ATS-compilation command atsopt. Sometimes, it is also given the name patscc. In a given command-line starting with atscc, each file containing ATS code is first to be replaced with a corresponding file containing the C code generated by atsopt from compiling the ATS code. A new command-line is then formed by replacing atscc with a C-compilation command (such as gcc and clang) and subsequently executed to compile the files containing the generated C code.

Environment Variables

  • ATSOPT: If set, this variable should store the name of the ATS-compilation command. If not set, then the default name atsopt is assumed.
  • ATSCCOMP: If set, this variable should store the name of the C-compilation command. If not set, then the following default name is assumed:
    gcc -D_XOPEN_SOURCE -I${ATSHOME} -I${ATSHOME}/ccomp/runtime -L${ATSHOME}/ccomp/atslib/lib
    
  • Option-controlling Flags

  • -h: This flag is a short form of --help.
  • --help: This flag is for inquiring usage information on atscc.
  • -hats: This flag is for inquiring usage information on atsopt.
  • -vats: This flag is for inquiring version information on atsopt.
  • -ccats: This flag indicates that atscc is only required to compile files containing ATS code into corresponding files containing C code and it should not attempt to compile the generated C code.
  • -tcats: This flag indicates that atscc is only required to typecheck files containing ATS code.
  • --gline: This flag is passed to atsopt for generating line pragma information in the generated C code.
  • -verbose: This flag indicates that each command-line executed by atscc should be printed out.
  • -cleanaft: This flag indicates that each C file generated by atsopt should be removed once subsequent C-compilation is finished.
  • -atsccomp: This flag indicates that the next argument is to be interpreted as the C-compilation command subsequently employed for processing the generated C files. If this flag is not present, then the value of the environment variable ATSCCOMP is interpreted as the C-compilation command.
  • -DATS: This flag indicates that the next argument, which should be a name or name/value pair (separated by the symbol =), is to be passed to atsopt as a top-level definition.
  • -DDATS: This flag indicates that the next argument, which should be a name or name/value pair (separated by the symbol =), is to be passed to both atsopt and the subsequent C-compilation command as a top-level definition.
  • -IATS: This flag indicates that the next argument should be passed to atsopt as an include-path.
  • -IIATS: This flag indicates that the next argument should be passed to both atsopt and the subsequent C-compilation command as an include-path.
  • -fsats: This flag indicates that the next argument should be interpreted as the name of a file containing static ATS code. Note that this flag is unnecessary if the name of the file ends with the extension .sats.
  • -fdats: This flag indicates that the next argument should be interpreted as the name of a file containing dynamic ATS code. Note that this flag is unnecessary if the name of the file ends with the extension .dats.
  • --tlcalopt-disable: This flag indicates that tail-call optimization (for turning each recursive tail-call into a local jump) is disabled. In general, a proper justification is expected for disabling tail-call optimization.
  • --constraint-ignore: This flag indicates that constaint-solving is to be ignored during typechecking. Note that this is a dangerous flag and it is only suggested to be used with proper justification.