sm2dt(1)

NAME
sm2dt - translate a logic program to a default theory

SYNOPSIS
sm2dt [options] [file...]

DESCRIPTION
The program sm2dt converts a logic program (in lparse syntax) to a default theory (in DeReS syntax). It also performs simplification and stratification. It is a driver for lparse, simplify, stratify, and smdtconv.

OPTIONS

-t, --time
    Perform timing. The CPU time in seconds (as measured by clock(3)) is displayed to stderr after each phase of processing. This is the default.

-n, --no-time
    Do not display timing information.

-c, --cleanup
    Delete all the intermediate files upon success of the processing. This is the default.

-C, --no-cleanup
    Do not delete intermediate files.

-V, --verbose
    Display extra status information to stderr. This flag causes sm2dt to print a message indicating the command line with which each component is run, as well as some additional information. -VV, --more-verbose Display extra status information to stderr. This flag, in addition to providing all the status messages that -V does, also runs simplify, stratify, and smdtconv with the -V flag.

-m, --messages
    Display only error messages (and possibly timing information, depending on the state of the -t and -n flags) to stderr.

-q, --quiet
    Do not display any messages (other than perhaps timing information) to stderr.

-o filename, --output=filename
    Direct the output to the files base.dc, base.thc, and base.dt. If -o is not specified, the base defaults to the name of the first input file specified on the command line, or “sm2dt” if none is specified.

-d dir, --directory=dir
    Search for lparse, simplify, stratify, and smdtconv in the directory dir. If a program is not found in dir, it is searched for in the directory from which sm2dt was run, then in the deafault search path. Multiple -d options are cumulative; the directories are searched in the order given.

-o program, --parser=program
    Use program to ground programs and convert them to smodels 1 format. The default is “lparse -1”. Other possibilities are “parse”, “lparse -1 -d none”, and “lparse -1 -d all”. If the parser is specified with -p, the -d flag is not used to find it.

-v, --version
    Print version information to stdout. The information indicates the version numbers of sm2dt, liblp, lpsms, simplify, stratify, and smdtconv.

-h, --help
    Display usage information to stdout.

EXAMPLE USAGE
sm2dt -V -d/opt/lpsms/bin/ -o prog1 p1-1 p1-2 Combine, simplify, stratify, and convert p1-1 and p1-2 into prog1.dt, prog1.dc, prog1.thc, with stratification file prog1.str. Search for lparse, simplify, stratify, and smdtconv in /opt/lderes/bin/ before searching in the location of sm2dt and in $PATH. Display extra status information to stderr, but have the other programs display only normal status information, errors, and timing. sm2dt -q -n prog2 prog3 prog4 Combine, simplify, stratify, and convert prog2, prog3, and prog4 into prog2.dt, prog2.thc, and prog2.dc, with stratification file prog1.str. Display nothing to stderr or stdout.

COMPONENTS
Information on simplify, stratify, and smdtconv can be found in the appropriate man pages (in the same section as this page—section 1 by default). Information on lparse can be found in the lparse GNU info page, or in the lparse/ directory of the lpsms source distribution.

AUTHOR
Neil Moore <neil@cs.uky.edu> sm2dt is Copyright © 1999 The University of Kentucky. See the file COPYRIGHT in the lpsms distribution for details.

BUGS
If one of the processes (lparse, simplify, stratify, or smdtconv) dies, temporary files (filename.out, filename.sm, filename.sm.simp, or filename.ord) may be left over. This is not necessarily a bug: these files can be useful for determining exactly what caused the process to fail. None of the programs currently support the smodels 2 format. lparse can produce both smodels 1 and 2 format programs, so support for the smodels 2 format is not a high priority.

SEE ALSO
simplify(1), stratify(1), smdtconv(1), sderes(1), lderes(1). lparse.info, in the lparse source distribution. This file describes the input format accepted by sm2dt, as well as providing general information over grounding and over logic programming with stable model semantics.