----- Pparse syntax (primitive parse) -----

Basic rule:         h :- a1, a2, an, not b1, not b2, not bm.

  If a1,..,an are in the stable model and b1,...,bm are not, then h is
  put in the model.


Constraint rule:    h :- number { a1, a2, an, not b1, not b2, not bm }.

  If number1 of a1,...,an are in the stable model, number2 of
  b1,...,bm are not, and number1+number2 >= number, then h is put in
  the model.


Choice rule:        { h1, h2, hk } :- a1, a2, an,
                                     not b1, not b2, not bm.

  If a1,..,an are in the stable model and b1,...,bm are not, then any
  number of h1,...,hk are put in the model.

  Example:
            { a, b, c }.

      is interpreted as

	a :- not a'.
        a' :- not a.
	b :- not b'.
        b' :- not b.
	c :- not c'.
        c' :- not c.


Generate rule:      number { a1, a2, an } :- b1, b2, bm.

  If b1,...,bm are in the stable model, then it is guaranteed that
  number of a1,...,an are in the model.

  Example:
            1 { a, b, c }.

      is interpreted as

            a :- not b, not c.
            b :- not a, not c.
            c :- not a, not b.


Weight rule:        h :- { a1, a2, an, not b1, not b2, not bm }
                         > number1 <= number2.

  The weight is the sum of the weights of the a1,...,an in the stable
  model and the weights of the b1,...,bm not in the model. If the
  weight is greater than number1 and at most number2, then h is put in
  the model. Constraints accepted are <, >, <=, >=, and =.


Optimize statement: maximize { a1, a2, an, not b1, not b2, not bm }
                    minimize { a1, a2, an, not b1, not b2, not bm }

  The weight in subsequently computed stable models are larger and
  larger or smaller and smaller. Multiple optimize statements are
  given in priority order, the last being the most important.


Compute statement:  compute { a1, a2, an, not b1, not b2, not bm }

  Only stable models that contain a1,...,an but not b1,...,bm are
  computed. The word compute may be followed by the word all or a
  number to restrict how many models are computed. The default is one
  stable model.


Weight statement:   a = number

  The atom a is given the integral weight number. It is possible to
  give an atom a local weight inside a weight rule or an optimize
  statement. This weight will then override the global weight in that
  particular rule or statement.


Comment:            % Comment here

  The percent sign begins a comment that ends at the end of the line.
