Answer Set Programming - Generating Stable Models

Generating Stable Models

To find a stable model of the Lparse program stored in file we use the command

% lparse | smodels

Option 0 instructs smodels to find all stable models of the program. For instance, if file test contains the rules

1{p,q,r}2. s :- not p.

then the command

% lparse test | smodels 0

produces the output

Answer: 1 Stable Model: q p Answer: 2 Stable Model: p Answer: 3 Stable Model: r p Answer: 4 Stable Model: q s Answer: 5 Stable Model: r s Answer: 6 Stable Model: r q s

Read more about this topic:  Answer Set Programming

Famous quotes containing the words stable and/or models:

    If it is to be done well, child-rearing requires, more than most activities of life, a good deal of decentering from one’s own needs and perspectives. Such decentering is relatively easy when a society is stable and when there is an extended, supportive structure that the parent can depend upon.
    David Elkind (20th century)

    Today it is not the classroom nor the classics which are the repositories of models of eloquence, but the ad agencies.
    Marshall McLuhan (1911–1980)