We extend the answer set semantics to a class of logic programs with nested
expressions permitted in the bodies and heads of rules. These expressions
are formed from literals using negation as failure, conjunction (,) and dis
junction (;) that can be nested arbitrarily. Conditional expressions are in
troduced as abbreviations. The study of equivalent transformations of progr
ams with nested expressions shows that any such program is equivalent to a
set of disjunctive rules, possibly with negation as failure in the heads. T
he generalized answer set semantics is related to the Lloyd-Topor generaliz
ation of Clark's completion and to the logic of minimal belief and negation
as failure.