sderes(1)

NAME
sderes - compute stable models of a logic program (in default theory format)

SYNOPSIS
sderes [options] file[file...]

DESCRIPTION
The program sderes computes extensions of a subclass of simple default theories. This subclass includes logic programs; thus, for a logic program, sderes computes stable models of the program. Input is in DeReS format (without disjunction), and consists of three files: a .dt file which points to the other two files; a .dc file which contains the defaults, or rules, of the theory; and a .thc file, containing the initial set of facts (possibly including conjunction, but not disjunctions or more complicated logical connectives). File formats are described below, but these files are most often generated by sm2dt.

OPTIONS

-1, --single
    Compute a single stable model. This is the default.

-a, --all
    Compute all stable models.

-c N, --count=N
    Compute the first N stable models.

-t, --time
    Perform timing. The CPU time in seconds used by parsing and computation (as measured by clock(3)) is displayed to stdout after the computation. This is the default.

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

-V, --verbose
    Display extra status information to stderr. This flag causes sderes to print messages when reading files.

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

-q, --quiet
    Display nothing to stderr; display stable models and possibly timing information to stdout.

-qq, --very-quiet
    Display nothing to stderr. Also do not display stable models to stdout; count them only. Timing information may still be printed, depending on the state of the -t and -n flags.

-v, --version
    Print version information to stdout. The information indicates the version numbers of sderes and lpsms.

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

EXAMPLE USAGE
sderes -t -q -c 3 prog1 Compute the first three extensions of the program in prog1.dt, prog1.thc, prog1.dc, and prog1.str; display the extensions and timing information, but no other status messages, to stdout. sderes -V -1 prog2 Compute the first extension of the program found in prog2.dt, prog2.thc, prog2.dc, and prog2.str. Display that extension with its candidate number and timing information to stdout, and other status information to stderr.

FILE FORMATS
When given a filename file on the command line, sderes first opens file.dt. This file contains two lines (in addition to any comments):
    w = wfile
    d = dfile
The default theory is then read from wfile.thc and dfile.dc. The first file contains expressions which are either literals or conjunctions of literals. Expressions are separated by blank lines. If smdtconv was used to produce the files, the .thc file will contain no expressions. The second contains a set of defaults of the form:
    a : b1, b2, b3
         -> g;
The prerequisite, a, is a literal or conjunction of literals. Conjunction is represented by “&&”, negation by “!”. The justifications b1 . . . b3, are also literals or conjunctions of literals. Finally, the conclusion, g, is a (disjunction-free) logical expression. Each default is separated from the next by a blank line. A default indicates that the conclusion can be proved if the prerequisite can be proved and each of the justifications is consistent with the current context. See [CMT] for a much more detailed and accurate description of default logic (although it should again be noted that sderes accepts only a small subset of default logic). In all of these files, comments begin with % and extend to the end of a line.

AUTHOR
DeReS, a system for full default logic, was originally developed by Pawel Cholewinski. DeReS was simplified into sderes by Neil Moore <neil@cs.uky.edu>. DeReS and sderes are Copyright © 1992-1999 The University of Kentucky. See the file COPYRIGHT in the lpsms distribution for details.

BUGS
sderes is intended primarily for use with the output of sm2dt, and so may have some strange restrictions on syntax not present in DeReS or lderes. Because sderes is primarily intended to work with theories converted from logic programs, the existence of the separate .thc file makes little sense; it should be possible to elimitate the .dt and .thc files, leaving only the .dc and .str files. Changes to the file format would allow these two files to be integrated.

SEE ALSO
sm2dt(1), smdtconv(1), stable(1), lderes(1), smodels(1).
[CMT] Pawel Cholewinski, Victor Marek, and Miroslaw Truszczynski, `Default Reasoning System DeReS'. Proceedings of KR, 1996. pp 518–528.