 # Non Deterministic Logic Programs

Non deterministic applications arise in many domains, including, stochastic optimization, multi-objectives optimization, stochastic planning, contingent stochastic planning, reinforcement learning, reinforcement learning in partially observable Markov decision processes, and conditional planning. We present a logic programming framework called non deterministic logic programs, along with a declarative semantics and fixpoint semantics, to allow representing and reasoning about inherently non deterministic real-world applications. The language of non deterministic logic programs framework is extended with non-monotonic negation, and two alternative semantics are defined: the stable non deterministic model semantics and the well-founded non deterministic model semantics as well as their relationship is studied. These semantics subsume the deterministic stable model semantics and the deterministic well-founded semantics of deterministic normal logic programs, and they reduce to the semantics of deterministic definite logic programs without negation. We show the application of the non deterministic logic programs framework to a conditional planning problem.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Logic programming is a declarative programming paradigm that is based on logic where a substantial subset of first-order logic is used as the basis for the programming language. The basic language of logic programming is the language of definite logic programs. A definite logic program is a set of Horn clauses whose semantics is given declaratively by model theory and fixpoint theory, where a unique model, which is the least model generated from the definite logic program, is adopted to be the meaning of the definite logic program . In addition, several extensions to the language of definite logic programs were developed to strength the knowledge representation and reasoning capabilities of the basic language to be more suitable for real-world applications. These extensions include extending definite logic programs with non-monotonic negation to be capable of performing default reasoning and deriving negative conclusions in the absence of positive conclusions. Therefore, definite logic programs were extended to normal logic programs which are definite logic programs with non-monotonic negation. The meaning of normal logic programs is given by the stable model semantics , which is the most well understood semantics for normal logic programs. In stable model semantics of normal logic programs, a normal logic program can have zero, one, or multiple stable models as a meaning of the normal logic program. In addition, a well-founded model semantics for normal logic programs was developed to provide exactly one model as a meaning for normal logic programs . Furthermore, the relationship between the well-founded semantics and the stable model semantics for normal logic programs were carefully studied in .

Definite logic programs were extended to extended logic programs to allow both classical negation and non-monotonic negation . This extension is necessary to allow knowledge representation and reasoning in the presence of incomplete knowledge. In normal logic programs with stable model semantics an assertion is either true or false. However, in extended logic programs an assertion is either true or false or unknown to cope with incomplete knowledge. The meaning of extended logic programs is given by the answer set semantics , where an atom with respect to a given answer set of an extended logic program is either true, false, or undecidable with respect to that answer set.

Another extension to definite logic programs is extending definite logic programs to allow disjunctions in the head of logic rules and classical negation, and non-monotonic negation in the body of the logic rules presenting several forms of expressive logic programs . These forms of logic programs are; disjunctive logic programs which are definite logic program but with only disjunctions in the head of logic rules; normal disjunctive logic programs which are disjunctive logic programs but with non-monotonic negation in the body of the logic rules; and finally extended disjunctive logic programs which are disjunctive logic programs with classical negation and non-monotonic negation in the body of logic rules. The meaning of disjunctive logic programs and normal disjunctive logic programs are given by the stable model semantics and the meaning of extended disjunctive logic programs are given by the answer set semantics.

Stable model semantics for various expressive forms of logic programs including normal, disjunctive, and normal disjunctive logic programs have been shown effective and efficiently applicable to many real-world problems including but not limited to planning, diagnoses, and model checking, where the stable models generated from the stable model semantics of the logic program encoding of the problem representing one-to-one correspondence to the possible solutions of the problem. For example, in normal logic programs with stable model semantics solution to classical planning, each stable model generated from the normal logic program with stable model semantics representation of a classical planning problem corresponds to a valid plan.

However, in many interesting real-world problems, normal, disjunctive, and normal disjunctive logic programs with stable models semantics are not expressive enough to represent these problems and their stable model semantics do not establish one-to-one correspondence to the solutions of these problems. This is because the solution of these real-world problems are trees of solutions, i.e., each solution to a problem is a tree called a solution tree and stable models semantics works only for problems whose solutions correspond to paths in a tree but not the whole tree, where the whole tree in stable model semantics corresponds to all the possible solutions. But some real-world problems require a tree per a solution.

Consequently, these kind of problems require expressive forms of logic programs whose semantics is capable of producing solution trees with multiple paths, unlike normal, disjunctive, and normal disjunctive logic programs with stable model semantics that generates only paths in a tree as the possible solutions. These real-world problems that require trees as solutions arise in many domains. The most prominent of these domains are stochastic optimization, multi-objectives optimization, stochastic planning, contingent stochastic planning, reinforcement learning, reinforcement learning in partially observable Markov decision processes, and conditional planning. An important observation over these applications is that all these applications are non deterministic, which intuitively require different kind of logic program representation rather than normal, disjunctive, and normal disjunctive logic programs with stable model semantics that are deterministic and work efficiently for deterministic applications. Consider for example the following conditional planning problem which is clearly non deterministic.

###### Example 1

Consider an indoor security robot that checks on the windows lockage. If a window is opened then close the window by the robot gets the window not opened (closed). But, the robot needs to check whether the window is opened or not opened before starting to close the window. In addition, the robot needs to have the window locked as well. Therefore, the robot have to inspect if the window lock is locked or not locked. Then, if the window lock is not locked then flip the window lock by the robot gets the window lock locked. However, if a window lock is locked then flip the window lock by the robot gets the window lock not locked. Initially, some windows are opened and not locked and the target of the security robot is to get these windows not opened and locked. This robot planning problem can be represented as an action theory of the form

 initially{opened,¬locked} (1) executablecloseif∅ (2) executableflip_lockif∅ (3) executablecheckif∅ (4) executableinspectif∅ (5) closecauses¬openedifopened (6) flip_lockcauses{lockedif¬locked,¬lockediflocked} (7) checkdetermines{opened,¬opened} (8) inspectdetermines{locked,¬locked} (9)

The initial situation in this security robot planning problem is presented by the proposition (1). Proposition (1) states that the possible initial state holds, which means that initially a window is and where is the classical negation. Executability conditions of the various actions in this planning problem is represented by propositions (2), (3), (4), and (5), which state that actions , , , and are executable in any state of the world without conditions, where means no conditions are needed for the executability of the actions.

Propositions (6) and (7) represent the conditional effects of the non-sensing actions and . Proposition (6) says that the action causes a window to be to hold in a successor state to a state in which the action is executed and the property holds. Proposition (7) says that the action causes the window lock to be to hold in a successor state to a state in which the action is executed and the property holds. Or the action causes the window lock to be to hold in a successor state to a state in which the action is executed and the property holds. The properties and must be mutually exclusive and exhaustive.

Propositions (8) and (9) describe the sensing actions and with their conditional outcomes. Proposition (8) states that executing the sensing action in a state causes the property or the property to be known true in a successor state to a state in which is executed. The properties and must be mutually exclusive and exhaustive. Proposition (9) states that executing the sensing action in a state causes the property or the property to be known true in a successor state to a state in which is executed. The properties and must be mutually exclusive and exhaustive.

The effects of the actions , , and are non deterministically determined if their preconditions occur. This implies that for any representation to these actions into a logic program, the logic rules representing these actions and their effects should represent the non deterministic effects of the actions as well as their preconditions. In addition, the semantics of this logic program, representing these actions and their non deterministic effects and preconditions, should be capable of deriving the whole non deterministic effects of these actions whenever their preconditions hold.

Unlikely, no current logic programming language syntax and semantics including definite logic programs , normal, disjunctive, and normal disjunctive logic programs with stable model semantics, extended and extended disjunctive logic programs with answer set semantics [2, 3], neither capable of representing nor reasoning in the presence of non deterministic knowledge, like the non deterministic knowledge that arise extensively in many critical applications including stochastic optimization, multi-objectives optimization, stochastic planning, contingent stochastic planning, reinforcement learning, reinforcement learning in partially observable Markov decision processes, and conditional planning.

Therefore, we introduce the notion of non deterministic logic programs to allow representing and reasoning in the presence of non deterministic knowledge. The building blocks of the language of non deterministic logic programs is the notion of non deterministic atoms to allow appropriately representing and reasoning bout inherently non deterministic real-world applications. The introduction of the notion of non deterministic atoms requires changes at the syntactical and semantical level to the exiting logic programming languages. The new framework provides more intuitive and accurate representation and reasoning about non deterministic knowledge. We show that problems such as the one described in Example (1) are properly addressed in the non deterministic logic programs framework. Furthermore, we show that the non deterministic logic programs framework subsume the deterministic definite logic programs framework  for representing and reasoning about deterministic knowledge.

However, providing non deterministic logic programs to be more sophisticated for representing and reasoning about non deterministic knowledge is still not enough for strengthening the reasoning capabilities of the new logical language. For this reason, the non deterministic logic programs syntax and semantics need to be extended to cope with the non-monotonic negation. This is because non-monotonic negation is important to be able to perform default reasoning and derive negative conclusions in the absence of positive conclusions. As a consequence, enhancing the non deterministic logic programs framework with this capability makes it more suitable for real-world applications.

Therefore, we extend the non deterministic logic programs framework to cope with non-monotonic negation. This is achieved by developing the stable non deterministic model semantics and the well-founded non deterministic model semantics for non deterministic logic programs with non-monotonic negation.

In this paper we are concerned with developing a proper syntax and semantics for logic programs to cope with the non deterministic knowledge, where every atom appear in a logic rule in a logic program is non deterministic.

## 2 Non Deterministic Logic Programs

In this section we present the syntax and semantics of the language of non deterministic logic programs. The semantics is based on the set-inclusion order and the notion of non deterministic atoms to appropriately represent and reason about inherently non deterministic real-world applications. The introduction of the notion of non deterministic atoms requires changes at the syntactical and semantical level to the exiting logic programming languages.

We start by defining the syntax of the language of non deterministic logic programs that allows the ability to represent non deterministic knowledge. Then we define a declarative semantics and a fixpoint semantics for non deterministic logic programs. The declarative semantics is based on the notion of satisfactions and non deterministic models in which every rule in a non deterministic logic program is satisfied. The fixpoint semantics is developed by defining the notion of the immediate consequence operator of non deterministic logic programs. In addition, we show that the declarative semantics coincides with the fixpoint semantics. The new framework provides more intuitive and easy way to capture non deterministic knowledge. Furthermore, we show that the syntax and semantics of non deterministic logic programs framework is a natural generalization and subsume the original syntax and semantics of definite logic programs

### 2.1 Syntax

In this section, we provide the syntax of non deterministic logic programs. Let be a first-order language with many predicate symbols, function symbols, constants, and infinitely many variables. A term is a constant, a variable, or a function where is an n-ary function symbol and are terms. An atom, , is an n-ary predicate symbol, , and are terms.

###### Definition 1

A non deterministic atom is a set of atoms of the form , denoted by , i.e., a set of predicates.

Intuitively, a non deterministic atom, , is a new construct in the languages of logic programming in general to allow a set of atoms to non deterministically occurs. This means that if the non deterministic atom, , is occurred to be true is some interpretation, this implies that in any of the worlds one and only one of must be true in that world. This also means that all of the atoms in are mutually true. In other words, if is true in one of the worlds, , this excludes all the other such that from becoming true in that same world .

An atom, , is a non deterministic atom of the form . The Herbrand universe of is the set of all ground terms which can be formed from constants and functions from . The Herbrand base of is the set of all ground atoms which can be formed using predicate symbols from and ground terms from . The non deterministic base, , of is the power set of , i.e., . Non-monotonic negation or the negation as failure is denoted by .

###### Definition 2

A non deterministic logic rule is an expression of the form

 {Ai}ni=1←{Bi1}n1i1=1,…,{Bim}nmim=1

where are non deterministic atoms. is called the head of the non deterministic logic rule and is its body. If , the non deterministic logic rule is called a non deterministic fact, i.e., .

###### Example 2

The non deterministic logic rule that represents the non deterministic conditional effects of the non-sensing action described in Example (1) is given as

 {holds(locked,T+1),holds(¬locked,T+1)}←occ(flip_lock,T),exec(flip_lock,T), {holds(¬locked,T),holds(locked,T)}. (10)

The above non deterministic logic rule says that if the action

occurs at time moment

and the property or the property non deterministically hold at the same time moment, , then the property or the property non deterministically hold at time moment .

###### Definition 3

A non deterministic logic program, , is a set of non deterministic logic rules.

A term is ground if it does not contain any variables. A ground atom is an atom that does not contain any variables. A ground non deterministic atom is a non deterministic atom that does not contain any variables. A non deterministic logic rule, , is ground if every non deterministic atom appearing in is ground. A non deterministic logic program, , is ground if every non deterministic logic rule in is ground.

###### Example 3

Fred is gone for his lunch at a restaurant but he is undeterminate about what to eat for the lunch. His preferences for today’s lunch is either soup or salad but with either meat or fish as a main dish. Fred checked the menu and narrowed his choices to beef or buffalo soup, salmon or seafood salad, beef or buffalo meat for the main dish, and salmon or seafood as a fish main dish. The possible lunch choices that Fred can make can be represented as a non deterministic logic program, , that consists of the following non deterministic logic rules, where predicate means that Fred chooses to eat with or with .

 {meat(beef),fish(salmon)}←
 {meat(beef),fish(seafood)}←
 {meat(buffalo),fish(salmon)}←
 {meat(buffalo),fish(seafood)}←
###### Example 4

Fred is planning for his vacation to Europe, however, Fred is undecided about spending his vacation either in Paris or in London. Therefore, Fred wants to plan his vacation such that he travels on the same route from home to either Paris or London so that he would be able to accommodate to any last minute change to his vacation plan. Fred’s vacation planning problem can be represented as a non deterministic logic program, , that consists of the following non deterministic logic rules where the predicate means that there is a connection route from city to city all the way to London, and the predicate means that there is a connection route from city to city all the way to Paris. The predicate means that city is reachable from city .

 {reachable(X,Y)}←{connection1(X,Y),connection2(X,Y)}.{reachable(X,Y)}←{connection1(X,Z),connection2(X,Z)},{reachable(Z,Y)}.
 {connection1(home,rome),connection2(home,rome)}←.{connection1(home,rome),connection2(rome,london)}←.{connection1(home,rome),connection2(rome,berlin)}←.{connection1(home,rome),connection2(london,paris)}←.{connection1(home,rome),connection2(berlin,paris)}←.
 {connection1(rome,paris),connection2(home,rome)}←.{connection1(rome,paris),connection2(rome,london)}←.{connection1(rome,paris),connection2(rome,berlin)}←.{connection1(rome,paris),connection2(london,paris)}←.{connection1(rome,paris),connection2(berlin,paris)}←.
 {connection1(rome,berlin),connection2(home,rome)}←.{connection1(rome,berlin),connection2(rome,london)}←.{connection1(rome,berlin),connection2(rome,berlin)}←.{connection1(rome,berlin),connection2(london,paris)}←.{connection1(rome,berlin),connection2(berlin,paris)}←.
 {connection1(paris,london),connection2(home,rome)}←.{connection1(paris,london),connection2(rome,london)}←.{connection1(paris,london),connection2(rome,berlin)}←.{connection1(paris,london),connection2(london,paris)}←.{connection1(paris,london),connection2(berlin,paris)}←.
 {connection1(berlin,london),connection2(home,rome)}←.{connection1(berlin,london),connection2(rome,london)}←.{connection1(berlin,london),connection2(rome,berlin)}←.{connection1(berlin,london),connection2(london,paris)}←.{connection1(berlin,london),connection2(berlin,paris)}←.

### 2.2 Declarative Semantics

In this section, we define the declarative semantics, model-theoretic semantics, of non deterministic logic programs. We provide definitions for the notions of non deterministic interpretations, satisfaction, and non deterministic models of non deterministic logic programs.

###### Definition 4

Let be a first-order language. A non deterministic interpretation, , for consists of:

1. The domain of is the Herbrand universe .

2. Each constant in is an assignment of an element in .

3. Each n-ary function symbol in is an assignment of a mapping .

4. Each atom, , an n-ary predicate symbol in , is a mapping .

5. For each non deterministic atom, , , an n-ary predicate symbol in , is a mapping or , an n-ary predicate symbol in , is a mapping .

For easiness we adopt the following. We consider a non deterministic interpretation, , for the first-order language, , as a subset of the non deterministic base, , where all non deterministic atoms that belong to are the true non deterministic atoms with respect to and all non deterministic atoms that do not belong to and belong to are the false non deterministic atoms with respect to .

###### Definition 5

Let be a non deterministic logic program. A non deterministic interpretation for is a subset of the non deterministic base .

The satisfaction of non deterministic logic programs with respect to non deterministic interpretations and non deterministic models of non deterministic logic programs are given by the following definitions.

###### Definition 6

Let be a ground non deterministic logic program and be a non deterministic interpretation. Then the satisfaction, denoted by , of a non deterministic atom and a non deterministic logic rule, by , is defined as follows:

• iff .

• iff for all , .

• iff whenever or does not satisfy .

###### Definition 7

Let be a non deterministic logic program and be a non deterministic interpretation. Then, is a non deterministic model for if satisfies every non deterministic logic rule in .

We say a non deterministic atom is a logical consequence of a non deterministic logic program if this non deterministic atom is true in every non deterministic model of that non deterministic logic program. This is captured by the following definition.

###### Definition 8

Let be a non deterministic logic program and . Then, is a logical consequence of iff is true (satisfied) in every non deterministic model of .

The set of all non deterministic interpretations of , denoted by which is the set of all subsets of the non deterministic base , i.e., , along with the set-inclusion, , forms a complete lattice . The top element of the lattice,, is the non deterministic base and the bottom element is the empty set .

###### Lemma 1

The set of all non deterministic interpretations and the set inclusion relation form a complete lattice . The join operation over is the union operation and the the meet operation is the intersection operation .

Every non deterministic logic program has several non deterministic models that satisfy each non deterministic logic rule in the non deterministic logic program. To provide a meaning for a non deterministic logic program, we use the least non deterministic model for the non deterministic logic program to be the meaning of the program and hence its declarative semantics. The following results show how to declaratively construct the least non deterministic model for non deterministic logic programs.

###### Proposition 1

Let be a non deterministic logic program and be non deterministic models of . Then is also a non deterministic model of .

###### Theorem 2.1

Let be a non deterministic logic program and let be the set of all non deterministic models of . Then, is the least non deterministic model of .

Intuitively, the least non deterministic model, , of a non deterministic logic program, , is the smallest non deterministic model, with respect to the set inclusion , that satisfies which is unique.

###### Definition 9

The least non deterministic model, , of the non deterministic logic program, is the intersection of all non deterministic models of .

###### Lemma 2

Let be a non deterministic logic program. The least non deterministic model of is unique.

###### Proposition 2

Let be a non deterministic logic program. Then is unsatisfiable iff has no non deterministic models.

The language of non deterministic logic programs syntax and semantics are designed to represent and reason about inherently non deterministic real-world applications whose solutions are described by trees. This means that the semantics of a non deterministic logic program representation of a non deterministic problem, described by the least non deterministic model of that non deterministic logic program, represents the solution tree of the represented problem. Therefore, to construct the solution tree represented in the least non deterministic model of a non deterministic logic program representation of a non deterministic problem we introduce the following definition.

###### Definition 10

Let be the least non deterministic model of the non deterministic logic program . Let , for , be a variable ranging over the elements of . Then, the set of answer sets, , corresponding to is the set of all minimal sets formed from the elements of such that

 SΠ={{X1,X2,…,Xm}|∀X1∀X2…∀Xm}.

The set of answer sets represents the solution tree of the represented non deterministic problem by a non deterministic logic program, where every answer set in the set of answer sets corresponds to a branch in the solution tree.

Observe that an answer set, , in the set of answer sets, , that corresponds to the least non deterministic model, , of a non deterministic logic program, , is a subset of the Herbrand base . Intuitively, the meaning of an answer set is that every atom belongs to is true with respect to and every atom that does not belong to but belongs to is false with respect to .

###### Example 5

The non deterministic logic program, , described in Example (3), has a least non deterministic model, . Including the relevant non deterministic atoms, contains

 ⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩{soup(beef),salad(salmon)},{soup(beef),salad(seafood)},{soup(buffalo),salad(salmon)},{soup(buffalo),salad(seafood)},{meat(beef),fish(salmon)},{meat(beef),fish(seafood)},{meat(buffalo),fish(salmon)},{meat(buffalo),fish(seafood)},{lunch(beef,salmon)},{lunch(beef,seafood)},{lunch(buffalo,salmon)},{lunch(buffalo,seafood)}⎫⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎬⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎭

The set of answer sets, , corresponding to the least non deterministic model, of , that represents the solution tree of the non deterministic problem of Example (3) is given as follows, where each , as described below, represents a branch of the solution tree of the problem in Example (3). We list below some of the answer sets from , since it is straight forward to construct the whole set of answer sets.

 S1={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),meat(beef),meat(buffalo)}
 S2={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),meat(beef),fish(seafood)}
 S3={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),fish(salmon),meat(buffalo)}
 S4={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),fish(salmon),fish(seafood)}
 S5={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),meat(beef),meat(buffalo)}
 S6={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),meat(beef),fish(seafood)}
 S7={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),fish(salmon),meat(beef),meat(buffalo)}
 S8={lunch(beef,salmon),lunch(beef,seafood),lunch(buffalo,salmon),lunch(buffalo,seafood),soup(beef),soup(buffalo),meat(beef),fish(salmon),fish(seafood)}
###### Example 6

The non deterministic logic program, , presented in Example (4), has a least non deterministic model, . Including the relevant non deterministic atoms, in addition to every non deterministic fact appearing in , contains

 {{reachable(home,rome)},{reachable(rome,berlin)},{reachable(rome,berlin)},{reachable(rome,london)},{reachable(home,rome)},{reachable(home,london)},{reachable(home,berlin)},{reachable(rome,paris)},{reachable(home,paris)}}

The set of answer sets, , corresponding to the least non deterministic model, of , that represents the solution tree of the non deterministic problem of Example (4) can be constructed in a straightforward way.

### 2.3 Fixpoint Semantics

In this section, we present the fixpoint semantics of non deterministic logic programs. The fixpoint semantics is based on the immediate consequence operator or the fixpoint operator of non deterministic logic programs which is used to compute the least non deterministic model of non deterministic logic programs inductively. Associated with each non deterministic logic program, , is an operator, , called the fixpoint operator, which takes a non deterministic interpretation as an argument and returns a non deterministic interpretation. In this section we define the fixpoint operator of non deterministic logic programs and show that every non deterministic model is a fixpoint of this operator. In addition, we show that the least fixpoint of the fixpoint operator coincides with the least non deterministic model of non deterministic logic programs.

The fixpoint semantics of non deterministic logic programs is considered as the operational counterpart of the non deterministic logic programs declarative semantics. The idea is based on the lattice theory. Let and be two non deterministic interpretations of a non deterministic logic program . Therefore, the non deterministic interpretations and are partially ordered under the subset inclusion iff . Consequently, the set of all non deterministic interpretations and the set-inclusion forms a complete lattice . The bottom element of this lattice is the empty set and is its top element. The meet (the lower bound) and join (the upper bound) operations associated with this lattice are the set intersection and the set union respectively.

###### Definition 11

Let be a ground non deterministic logic program and be a non deterministic interpretation. The immediate consequence operator of is the mapping which is defined as

 TΠ(I)={{Ai}ni=1|{Ai}ni=1←{Bi1}n1i1=1,…,{Bim}nmim=1∈Π,

and