Policies, Norms and Actions: Groundwork For A Framework: Robert Craven
Policies, Norms and Actions: Groundwork For A Framework: Robert Craven
a
of action constants. Further, the uent constants are partitioned into those which are simple
and those which are statically determined. We sometimes use
smpl
to stand for the simple uent
constants, and
stat
to stand for the statically determined uent constants. And so:
=
f
a
=
smpl
stat
a
.
4
Statically determined uent constants depend only on features of the current state: the values
they take may not directly depend on the past history of the domain. In the representation of
many domains, the set of statically determined uent constants is empty.
For each constant c there is a nite, non-empty set dom(c), disjoint from and known as
the domain of c. An atom of the signature is an expression c=v, where c and v dom(c).
Formulas are constructed from the atoms using propositional connectives and a familiar syntax,
with a literal as an expression A or A, for atomic A. The expressions and are connectives
of zero arity, with the usual interpretation. A Boolean constant is one whose domain is the set
of truth-values t, f , and a Boolean signature is, by extension, one all of whose constants are
Boolean. If c is a Boolean constant, we often write c for c=t, so that where our propositional
signatures are restricted to be Boolean and we deal with no formula containing f , we may reduce
our syntax to that of standard propositional logic.
A uent formula is a formula whose constants all belong to
f
; an action formula is a formula
which contains at least one action constant, and no uent constants. Note that according to these
denitions, and are uent formulas but not action formulas. Disjointness of
f
and
a
forces
disjointness of the set of uent formulas (which we abbreviate to fmla
f
) and the set of action
formulas (abbreviated to fmla
a
). The disparity in the denitions of fmla
f
and fmla
a
makes later
denitions more compact.
An interpretation of a multi-valued propositional signature is a function mapping every
constant c to some v dom(c); an interpretation X is said to satisfy an atom c=v if X(c) = v,
and in this case one may write X [= c=v. Standard structural recursions over the propositional
connectives apply, and where is a set of formulas of our propositional signature, X [= expresses
that X [= c=v, for every c=v in . We let the expression I() stand for the set of interpretations
of .
A static law is an expression of the form
F if F
(1)
where F and F
are uent formulas. These laws are similar to the state constraints which appear
elsewhere in computer science; their meaning is that when the formula F
F, where A
is true in a state, and A occurs, then F is true in the following state. Causal laws are static laws
or dynamic laws, and an action description is a set of causal laws.
An action description D is said to be denite when
the head of every causal law of D is either an atom or , and
no atom is the head of innitely many causal laws of D.
When an action description of (+ is denite in this sense, then there is a straightforward method
of nding runs through the transition system it denes, which we will present in Section 2.5. All
of the examples we will mention in the current paper are denite action descriptions.
5
For the purpose of illustration, consider the very simple action description having as its Boolean
signature
smpl
= p
stat
= q
a
= a
Thus, p and q are intended to represent properties of states, and a to represent an action, the
performance of which may aect those properties. Let the laws of the action description be:
q if p, (4)
q if p,
p after a,
p after a.
exogenous a.
We will soon see that action descriptions of (+ can be rendered graphically; action description (4)
can be depicted as in Figure 1. The rst two (static) laws make qs value dependent on that of p.
p, q p, q
a,
a
a a
Figure 1: Transition system for action description (4)
The second two laws make the value of p change, depending on whether a is performed or not. The
fth law states that a can occur, or not occur, in any situation, other things being equal (for the
meaning of the keyword exogenous, see the end of this subsection). We see that static laws can
be used to describe how the eects of actions ramify. Transitions between states are depicted as
arrows, and the labels on the arrows represent what actions and events occur, to move the domain
from one state to another. For instance, if p and q are true of the system being represented, then
if the event or action a does not occur (i.e. a is true), then the system will move to a state in
which both p and q are falseone where p and q are true.
A number of abbreviations of causal laws are useful, making the meaning of specic structures
of law more clear. Fluent dynamic laws of the form after A, where A is an action formula, may
also be written
A is non-executable
and uent dynamic laws after A F, where A is an action formula and F a uent formula,
may be written
A is non-executable if F
A static law of the form F if can simply be written as
F
in which case F must be true in all states. Further, the law
inertial c
where c is a simple uent constant, abbreviates the set of causal laws
c=v if c=v after c=v [ v dom(c)
6
The eect of this is to enable the value of the uent constant c to persist by default into the next
state (unless c is caused to have some other value). The law
exogenous c
where c is an action constant abbreviates the set of action dynamic laws
c=v if c=v [ v dom(c)
These have the eect of allowing a to take any value in a transition (except if it is caused to have
some value by other causal laws).
2.2 Action Descriptions to Transition Systems
Every action description of (+ denes a labelled transition system. In general, transition systems
are graphs, whose vertices represent the states of some system, and where an edge between two
vertices represents that the system may evolve from the one state to the other. The edges are
typically called transitions, and where the transitions are labelled, the labels usually denote the
performance of some action, or the execution of some computation, which eects the given tran-
sition between states. This sort of graphical structure is, of course, ubiquitous in computing and
articial intelligence.
The precise form of the transition systems with which we will deal in the current thesis will
vary, usually as the language used to dene them accrues special features. It is therefore dicult
even to dene an underlying template to which all labelled transition systems must conform. So
we relativize to (+, as follows.
Denition 1 A transition system for (+ is a triple (S, L, R), where
S is a set of states, sometimes called vertices;
L is a set of labels;
R is a set of transitions, R S L S, sometimes called edges.
The purpose of this section is to describe how each action description D of (+with signature
f
a
denes a labelled transition system L
D
, of the form dened above. But we will rst
note that states will turn out to be interpretations of
f
which satisfy certain constraints, and the
set of labels will be the set I(
a
). The denitions and theorems in this section are mostly taken
from [Sergot, 2004].
Suppose we are given an action description D of (+, with signature
f
a
.
Denition 2 We dene:
T
static
(s) = F [ F if F
D, F fmla
f
, s [= F
,
E(s, e, s
) = F [ F after G D, s e [= G,
A(s, e) = A [ A if G D, A fmla
a
, s e [= G,
Simple(s) = c=v [ c
smpl
, s [= c=v,
With these preliminary denitions, we can now dene the transition systems dened by (+ action
descriptions. We rst need to dene our states.
Denition 3 Let D be an action description of (+. An interpretation s of
f
is a state of D i
s = s
I(
f
) [ s
[= T
static
(s) Simple(s).
In words, s is a state when s satises the set of forumlas T
static
(s) Simple(s), and there is no
other interpretation of
f
which satises this set. We move on to the transitions dened by (+
action descriptions.
7
Denition 4 Let D be an action description of (+, with signature . Suppose s, s
I(
f
), and
e I(
a
). We say that (s, e, s
= s
I(
f
) [ s
[= T
static
(s
) E(s, e, s
);
e = e
I(
a
) [ e
[= A(s, e).
Again, in words: (s, e, s
satises T
static
(s
) E(s, e, s
)
and no other interpretation does so; and where e satises A(s, e) and no other interpretation in
a
does so.
The transition systems dened by a (+ action description have the form given above in Def-
inition 1: the component S is the set of states dened by the action description D; the possible
labels L are found in I(
a
); and R is the set of transitions, as given in Denition 4.
Theorem 5 If (s, e, s
is a state.
Proof: This is Proposition 4 of [Sergot, 2004].
At a rst glance the reason that these denitions take precisely the form they do is far from
obvious, and they are apt to seem somewhat arbitrary. Matters become clearer when we examine
the relationship of action descriptions of (+ to causal theories.
2.3 Causal theories
The language of causal theories [McCain and Turner, 1997, Giunchiglia et al., 2004] is a more
general-purpose, non-monotonic formalism which can be seen as underlying the action language
(+. (The manner in which it is non-monotonic is not entirely straightforward: for details, see
[Sergot and Craven, 2005a].) Causal theories are very closely related to Reiters Default Logic
[Reiter, 1980], as Section 7 of [Giunchiglia et al., 2004] shows, and it is partly their scope for a
highly nuanced representation of default behaviour which brings causal theories close to (+. It
will be seen that (+ action descriptions correspond to families of certain forms of causal theories;
but this correspondence does not use the full expressivity of causal theories.
In causal theories we start, as with (+, with a multi-valued propositional signature . In
the language of causal theories, however, there is no distinction between uent constants and
action constantsmembers of are undierentiated. Formulas are built up from atoms c=v using
standard propositional connectives, again including and as connectives of zero arity.
A causal rule is an expression of the form
F G,
where F and G are formulas of the underlying, multi-valued propositional signature. Such expres-
sions are related to the (almost) natural language statement if G, then the fact that F is caused;
perhaps they could better be paraphrased as if G, then there is a reason for F to be true (and F
is true). A causal theory is a set of causal rules.
Now let be a causal theory, and take X to be an interpretation of its underlying propositional
signature. The reduct of with respect to X is dened as
X
= F [ F G and X [= G.
X is a model of the causal theory , written X [=
C
, if X is the unique model of
X
. (This
uniqueness constraint is related to the role of singletons in Denition 4.)
For an illustration of the preceding denitions, consider the causal theory T
1
, with underlying
Boolean signature p, q:
p q
q q
q q
8
There are clearly four possible interpretations of the signature:
X
1
: p t, q t
X
2
: p t, q f
X
3
: p f , q t
X
4
: p f , q f
and it is clear that
T
X
1
1
= p, q whose only model is X
1
T
X
2
1
= q which has two models
T
X
3
1
= p, q whose only model is X
1
,= X
3
T
X
4
1
= q which has two models
In only one of these casesthat of X
1
is it true that the reduct of the causal theory with respect
to the interpretation has that interpretation as its unique model. Thus X
1
[=
C
T
1
and X
1
is the
only model of T
1
.
See [Sergot and Craven, 2005b] (or its expanded version [Sergot and Craven, 2005a]) for logical
properties of causal theories, and relations to modal logic. Also see [Erdogan and Lifschitz, 2006].
2.4 Action Descriptions to Causal Theories
Action descriptions of (+ can be seen as shorthand for families of causal theories. The index set
is the non-negative integers, which represents the time for which the system runs.
Thus to every action description D of (+with signature and non-negative integer t, there
corresponds a causal theory
D
t
. The signature of
D
t
contains the constants c[i],
1
such that
i 0, . . . , t and c
f
, or
i 0, . . . , t 1 and c
a
,
and the domains of such constants c[i] are kept identical to those of their constituents c in the
signature of the action description. Where is the signature of the (+ action description D,
we will let
m
denote the signature of the causal theory
D
m
. The expression F[i], where F is a
formula, denotes the result of inserting [i] after every occurrence of a constant in F. The causal
rules of
D
t
are:
F[i] F
[i],
for every static law F if F
in D and every i 0, . . . , t;
A[i] G
[i],
and for every action dynamic law A if G in D and every i 0, . . . , t 1;
F[i + 1] G[i],
for every uent dynamic law F after G in D and every i 0, . . . , t 1;
c[i + 1]=v c[i + 1]=v c[i]=v
for every simple uent constant c, v dom(c) and i 0, . . . , t 1;
a[i]=v a[i]=v
1
These are written as i : k in [Giunchiglia et al., 2004]; we nd the current notation easier to read.
9
for every action constant a, v dom(a), and i 0, . . . , t 1; and
c[0]=v c[0]=v,
for every simple uent constant c and v dom(c).
We have already dened the labelled transition systems which are determined by (+ action
descriptions, in a way which did not depend at all on the formalism of causal theories. The same
transition systems can be dened much more succinctly using causal theories, however, and it is
often much more easy when trying to imagine the systems dened by action descriptions, to think
in terms of the causal-theoretic denitions rather than those given in Section 2.2. In the current
context we will identify interpretations of the underlying propositional signature of D with the
sets of atoms they satisfy. Where i is a non-negative integer and s an interpretation, we can write
s[i] for the result of suxing [i] to every constant of an atom made true by the interpretation (in
symbols, c[i]=v [ s [= c=v).
We trespass on our previous denitions:
Denition 6 Let D be an action description of (+, with signature .
A state is any s I(
f
), such that s[0] [=
C
D
0
;
a transition is any triple (s, e, s
) I(
f
) I(
a
) I(
f
) such that
s[0] e[0] s
[1] [=
C
D
1
.
According to this denition, the component S of the labelled transition systems dened by (+
action descriptions is the set
s [ s I(
f
), s[0] [=
D
0
;
the set of labels L is I(
a
) as before; and the set of edges is the set
(s, e, s
) [ s, s
I(
f
), e I(
a
), s[0] e[0] s
[1] [=
D
1
.
Theorem 7 Let D be an action description. Then for any transition (s, e, s
), s
is a state, where
transitions and states are both dened according to Denition 6.
Proof: This is Proposition 7 of [Giunchiglia et al., 2004].
We now have two alternative denitions for the labelled transition systems dened by our
action descriptions. The following theorem shows they coincide.
Theorem 8 Let D be an action description of (+, with signature . Then:
(i) s is a state of D according to Denition 3 i s is a state of D according to Denition 6;
(ii) (s, e, s
) is a transition of D according
to Denition 6.
In other words, Denitions 3, 4 and 6 coincide.
Proof: This is essentially Theorem 9 of [Sergot, 2004].
Let
D
t
be the causal theory generated from the action description D and non-negative integer
t as described above. Let s
0
, . . . , s
t
be interpretations of
f
and e
0
, . . . , e
t1
be interpretations of
a
. Then using the notation above, we can represent interpretations of the signature of
D
t
in the
form
s
0
[0] e
0
[0] s
1
[1] e
1
[1] e
t1
[t 1] s
t
[t] (5)
The following result holds.
10
Theorem 9 An interpretation of the signature of
D
t
is a model of
D
t
i each triple (s
i
, e
i
, s
i+1
),
for 0 i < t, is a transition.
Proof: Proposition 8 of [Giunchiglia et al., 2004].
Let D be an action description of (+. A run of length t through this transition system is dened
to be a sequence
(s
0
, e
0
, s
1
, e
1
, . . . , e
t1
, s
t
) (6)
such that all triples (s
i
, e
i
, s
i+1
), for 0 i < t, are members of the transition system.
Theorem 10 Let D be an action description and t any non-negative integer. Then the sequence
(6) is a run of the transition system i the interpretation (5) is a model of the causal theory
D
t
.
Proof: First, assume we have a run of the transition system of length t. Then every triple
(s
i
, e
i
, s
i+1
), for 0 i < t, is a transition, and so by Theorem 9 the interpretation (5) is a model
of
D
t
.
Alternately, suppose that (5) is a model of the causal theory
D
t
, Then clearly, each triple
(s
i
, e
i
, s
i+1
), for 0 i < t, is a transition, and so the sequence (6) is a run of the transition
system dened by D.
2.5 Deniteness and Completion
A causal theory is said to be denite when:
the head of every causal rule is either an atom or , and
no atom is the head of innitely many causal rules.
Clearly this denition is related to that of the deniteness of an action description of (+, given
in Section 2.1. Indeed, it turns out that when an action description D is denite, then the causal
theories
D
t
, for 0 t, are also denite.
Models of a denite causal theory can be found by rst completing the causal theory, trans-
forming it to a set of formulas of propositional logic. The models of the propositional logic formulas
are the same as the models of the causal theory. (This process is structurally similar to what hap-
pens in the Clark completion used in the semantics of logic programs [Clark, 1978]though the
Clark completion is used to dene a kind of semantics; we make no reference to completion in the
denition of models.) Once the completion of the causal theory has been found, the models of the
resulting propositional theory can
The latter problem can be shipped out to a propositional satisfaction solver. So, in the light
of Theorem 10, we have a means of nding runs of length t 0 through the transition system
dened by a denite action description of (+.
Let be a denite causal theory, of which we wish to nd the completion, and let have
signature . An atom c=v of is said to be trivial when dom(c) = v: in this case any
interpretation of must assign to c the value v. (We also call the constant c trivial in this case.)
We let Trivial() be the set of atoms c=v of such that c is trivial. For each non-trivial atom
c=v of , the completion formula is:
c=v G
1
G
n
,
where
c=v G
1
, . . . , c=v G
n
are all the rules in with head c=v. The completion of is the set of all completion formulas of
all non-trivial atoms in , together with all formulas F for each rule
F
11
in . We let comp() be the completion of ; this is:
c=v G
1
G
n
[ c=v Trivial(), G(c=v G i(0 i n G = G
i
))
F [ F
Theorem 11 The models of a denite causal theory are precisely those of its completion.
Proof: Proposition 6 of [Giunchiglia et al., 2004].
3 Basic formalism
We rst cover the case of a centralized set of policies: where a single set of policies holds for the
entire agent society or distributed system. There may beindeed, in all examples, there will be
dierent agents, but they are all subject to the same set of policies. Later sections will consider
the case where these multiple agents are subject to dierent policy sets.
3.1 Signature
In this section we add more structure to the signatures of (+ that we will use in representing
policies. The language presented here will later be further enriched to accommodate named sets
of policies, and expressions for dening an algebra over such named policies; for the moment, we
keep to the essentials.
Sets, may be empty, except where stated to be otherwise. Let Ag be a non-empty set of agents;
this set will normally be written ag
1
, . . . , ag
n
. For each ag
i
Ag, there is a set of multi-valued
uents, u
i
. We dene, for each i such that 1 i n, a set Flu
i
= ag
i
:f [ f u
i
of uent
constants; each member ag
i
:f has the same domain as its component f. There is also a set Flu of
multi-valued uent constants which can be considered to represent properties of the environment,
which is not an agent. The set Fluents = FluFlu
1
Flu
n
includes all uent constants. We use
letters f to refer both to members of u
i
and Fluents. For each f Fluents there is a non-empty
set dom(f), the domain of f. If a uent constant f has domain t, f, it is Boolean. If f Fluents
and v dom(f), the expression f=v is known as a uent atom. For a Boolean uent constant c,
we usually abbreviate c=t to c, and c=f to c (c is therefore an atom). Some members of Fluents
are simple uent constants, and some are statically determined uent constants; we often refer to
members of Flu or Flu
i
, or u
i
as simple or statically determined if the members of Fluents they
give rise to are simple or statically determined.
Sub Ag is the set of subjects, Tar Ag is the set of targets; these need not be disjoint, but
Sub must be non-empty. There is also a set Act of actions. The function subjects : Act (Sub)
gives, for each action, the set of subjects that can perform itthe subjects that have the capacity
or ability, not those who are permitted. Analgously, targets : Act (Tar
tar
) gives the set of
possible targets. (We allow the possibility that it may be easier to model some actions as not having
a target: this is the role of
tar
.) For act Act, if sub subjects(act) and tar targets(act), then
sub:act:tar is a Boolean action constantwe often call these simply actions, where that does not
lead to confusion with the members of Act. These actions sub:act:tar are the equivalent of what is
often represented, in work on policies, as done(X), where X is some appropriate access or action in
the system being modelled. Where tar is
tar
, then sub:act:tar may be abbreviated to sub:act. The
set of all these is Actions: this is, to stress the point, a set of Boolean action constants.
2
Actions is
partitioned into two sets Actions
eca
and Actions
reg
; this will be of relevance later in the discussion
of obligationswe do not explain it more here. There is also a set Events of events, constants
which represent events in the system being modelled which are not controlled by policies. The
2
It is entirely possible to use multi-valued action constants instead, with a (very minor) complication of syntax.
However, in this case, defaults for which values the members of Actions taketo deal with the case where there are
no requests for that member, or all requests are deniedneed to be stated explicitly in the action description. In
the current version of the language, we assume that the negations of members Sub:Act:Tar of Actions are true by
default: which can be glossed as an assumption that actions not requested, by default do not happen.
12
members of Events are multi-valued (+ action constants. We let Happenings = Actions Events.
As have uent constants, each member a Happenings has a non-empty domain dom(a), and
the same conventions are observed for happening constants as for uent constants; there are
therefore happening atoms. The set Fluents Happenings is known as that of system constants,
and abbreviated to Sys.
The constants introduced so far are enough to represent domains in which subjects perform
actions on targets, these have certain eects on the subjects and targets and environment, and
events in the environment play their part. However, where we are modelling the eects of policies
on systems (which will be our objective in the present section), then additional constants are used,
to represent the policies and the way they interact with the subjects and targets.
All new policy constants we will add are Boolean action constants. First, for all Sub:Act:Tar
Actions, there are action constants permitted(Sub:Act:Tar) and denied(Sub:Act:Tar); if we have
Sub:Act:Tar Actions
eca
, then we will also add action constants obligation(Sub:Act:Tar). These
three types of constants are used in the specication of positive and negative authorization
policies, and obligation policies. Secondly, to represent the fullment and violation of obliga-
tions, we have for each Sub:Act:Tar Actions
eca
a constant fullled(Sub:Act:Tar) and a constant
violated(Sub:Act:Tar). Thirdly, for all Sub:Act:Tar, a constant [Sub requests Act on Tar], which
represents that Sub has sent a request to the policy enforcement point (PEP) or reference manager
to perform Act on Tar. We let the set of all [Sub requests Act on Tar] constants be Requests.
Fourthly, again for all Sub:Act:Tar Actions, there is a constant [Sub:Act:Tar is allowed], which
is used to mean that a request to the PEP from Sub to perform Act on Tar is granted. Let the set
of all these new constants be Pol. We refer to the members of Sys and Pol collectively as constants.
As (+ is our base language, we make it clear that using the notation normally employed for
(+ action descriptions,
f
= Fluents and
a
= Happenings Pol. Signatures of our language are
given by =
f
a
, as usually for (+.
3.2 System Models
In order to model the eects of actions on state variables and properties of systems, we write laws
of (+. The system representations are kept, as far as possible, distinct from the representations
of policies. For a signature (as given in Section 3.1), a system description is dened to be
an action description of the restricted version of (+ dened in Section 2, using as its signature
only
s
= Fluents Happenings: the policy action constants Pol are therefore excluded. System
descriptions are action descriptions of (+, with a little additional structuring of the underlying
signatures.
System descriptions, by themselves, represent domains in which there is no policy apparatus
in place to control the performance of actions. Accordingly, there is no gap between the request
for an action and that actions performance, and any action immediately produces its eects as
described in the causal laws of the action description.
For example, consider a very simple system, in which two user accounts left and right can read
a le le; when an account x reads the le, x:hasRead(le) becomes true. The system description,
A
S
1
, can be represented as in Table 1. Its transition system is shown in Figure 2. In the gure, we
have abbreviated uents left:hasRead(le) and right:hasRead(le) by l:hr and r:hr, and abbreviated
the actions (left:read:le) and (right:read:le) by l and r, all for the sake of readability.
It is often useful to have a logically separable representation of the way a system evolves, as
this enables one to reason more easily about the sets of conguration states the system supports.
Adding policies, and the representation of how they are implemented and enforced, does not aect
the set of possible states the system can be in, but only the transitions between those states, and
thus the possible histories of the system (where histories are conceived as runs through the resultant
labelled transition system). Thus if a reasoning task requires the ability to look merely at state
properties, then doing so on the bare system description and the transition system it denes could
be more clear. Further, bare system descriptions of the sort depicted in Figure 2 provide a starting
point for the design of policies: in they can be viewed as showing the most permissive policy
(without explicitly having the policy action constants), which allows every action requested, and
13
Sub = left, right
Act = read
Tar = le
Fluents = Ag:hasRead(le) [ Ag Sub
Actions = (Ag:read:le) [ Ag Sub
Events =
System Laws: Ag:hasRead(le) after (Ag:read:le) (Ag Sub)
inertial F (F Fluents)
exogenous A (A Actions)
Table 1: Simple action description A
S
1
l:hr,
r:hr
l:hr,
r:hr
l:hr,
r:hr
l:hr,
r:hr
r
l
l, r
r
l
l, r
r
l
l, r
l
r l, r
Figure 2: Transition system for system description A
S
1
.
permits requests at any time. Policy design then amounts to identifying the transitions considered
undesirable, and writing policies to exclude them.
3
3.3 Policies
Policies govern a system, consisting of the subjects and targets referred to in the policy, other
objects, and the properties of all. The properties of the system vary over time, as a consequence
both of the actions that are performed according to policies, and events occuring which do not
3
This idea is used later, when norms are brought in and their relations to policies studied.
14
fall within the policys scope. These system properties themselves determine the applicability of
a policy in a given state. Policies partially determine the way the system behaves: a request by a
subject to perform an action will be allowed or denied depending on what the authorization policies
imply, and thus certain system transitions are made possible, others not, by the authorization
policy being used. Obligation policies trigger requests for actions under stated conditions.
In order to represent the operation of policies, we try and stay close, in the structure of our
action descriptions, to the nature of the policy architecture we presuppose. This will perhaps come
more to the fore in Section 4, where we consider policy composition and enrich our language for
it, but the eects of staying close to policy architecture are felt here too.
A positive authorization rule has the form
permitted(Sub:Act:Tar) if G (7)
where Sub:Act:Tar Actions and G is a formula. The meaning is that where G is true, then Sub
is permitted, according to the policy, to perform Act on Tar. In the case where G is a conjunction
A F, with A a happening formula and F a uent formula, then the meaning is that if F is true
in a state, and the actions and events A occur, then Sub:Act:Tar is permitted. If G is , then the
rule may be written simply as
permitted(Sub:Act:Tar)
A negative authorization rule has the form
denied(Sub:Act:Tar) if G (8)
In other respects, the same things are true of negative as of positive authorization rules. Such
rules are intended to mean that when G is true, then the action Sub:Act:Tar is explicitly denied
by the policy.
An obligation rule has the form
obligation(Sub:Act:Tar) if G (9)
Conditions on abbreviations are as before; the meaning is, of course, that if F is true in a state
and A occur, then Sub:Act:Tar is obligatory: Sub must perform Act on Tar.
A set of positive authorization rules is a positive authorization policy; a set of negative autho-
rization rules is a negative authorization policy; a set of obligation rules is an obligation policy. If
a set has both positive and negative authorization rules, it is an authorization policy. A policy can
contain all three types of rule. Where confusion is unlikely to result, a single rule is also sometimes
referred to as a policy.
Policies are of little interest to us without an underlying description of the system they govern;
we therefore join policies to the system descriptions presented in the previous section. In doing
this, the assumption we made for system descriptions, that actions can be performed in any state
that the system supports them in, regardless of any other controls, must be abandoned: it is
precisely the function of a policy to provide additional control over the behaviour of the system.
This means that the relationship between actions, requests for actions, and the eects of
actions must be represented. We introduce the action constants [Sub:Act:Tar is allowed] and
[Sub requests Act on Tar], for all Sub:Act:Tar Actions, for this purpose. We also alter the
nature of system descriptions when they are yoked to policies: in action constraints A if G,
A may no longer contain members of Actions; it may contain, however, constants of the form
[Sub requests Act on Tar]and A may still contain members of Events. The removal of members
of Actions signals that whether or not an action, having form Sub:Act:Tar, is to be performed,
will now depend on the policy point; the allowance of [Sub requests Act on Tar] constants in the
heads of action constraints signals that whether or not a request for an action is made will not
depend directly on the policy system.
4
4
In some policy systems, such as Ponder2 [Damianou et al., 2001], making a request must also be allowed by a
policy. We could model such complication hereit is quite straightforwardbut have chosen not to.
15
Policies need one other kind of rule, aside from the authorization and obligation rules we have
introduced so far. This is to express the interface between PDP and PEP, and for this we use the
action constants [Sub:Act:Tar is allowed]. A policy description is a policy supplemented with a
set of allowance rules, which are action constraints of the form
[Sub:Act:Tar is allowed] if F (10)
where F conjoins atoms of constants permitted(Sub:Act:Tar) and denied(Sub:Act:Tar). For exam-
ple, a specic allowance rule might be
[Sub:Act:Tar is allowed] if permitted(Sub:Act:Tar) denied(Sub:Act:Tar)
The eect of this will be to allow any requests for an action Sub:Act:Tar that are both permitted
and not denied by the policy. When the semantics of policy descriptions is given, it will also be
clear that the logic of the system is such that the law
(Sub:Act:Tar) if [Sub:Act:Tar is allowed] [Sub requests Act on Tar] (11)
is implied. However, we do not include this explicitly in policies.
So far, we have been considering only the relationship of authorizations to the system; obliga-
tions are treated somewhat dierently. We believe that there two principle ways of using obligations
in policies. The rst is as statements of event-condition-action (ECA) rules, and the second is
as the cue for a monitoring system that takes action in response to the obligations fullment or
violation. In the rst case, we suppose the way the policy system enforces the obligation is by
triggering a request for the action; this request must then be authorized in just the same way as
an unprompted request by a subject within the system. In the second case, the action itself is
not prompted by the policy system, but depends on a request by a subject. However, laws can be
written that express the response to the violation or fullment of the obligation.
To allow for this in our policy descriptions, we do two things. The rst is to make a division,
in our signatures, between those actions which may be within the scope of an ECA rule, and
those which, when they are the subject of obligations, may only be monitored (the division does
not aect the expression of authorization policies). The intuition here is that some actions are
within the control of the policy system, and others are not, and may merely be monitored, with
the policy system taking action in response to the obligations status. This is the prupose of the
partioning of our set Actions as Actions
eca
Actions
reg
, where Actions
eca
and Actions
reg
are disjoint.
The semantics of our policy descriptions will be such that for all Sub:Act:Tar Actions
eca
, it is as
though the action constraint
[Sub requests Act on Tar] if obligation(Sub:Act:Tar) (12)
were present in the system description.
To model the fullment and violation of obligations, we have the following laws, whose presence
is felt semantically, but which are not included explicitly:
fullled(Sub:Act:Tar) if obligation(Sub:Act:Tar) (Sub:Act:Tar) (13)
violated(Sub:Act:Tar) if obligation(Sub:Act:Tar) (Sub:Act:Tar) (14)
For a Sub:Act:Tar Actions
reg
, the usual procedure will be to include obligation policies that
respond to its violation and fullment, where the obligation policy refers to actions Sub:Act:Tar
Actions
eca
. For instance, suppose there is an obligation on a user to release a lock on a password le
if there is an emergency status, but that the system cannot control whether the user does this or
not. If the user does not release the lock, the system will impose a punishment by putting the users
home directory into a red category. This can be represented as follows (we use abbreviations of
16
Boolean constants):
obligation(U:release:F) if U:isUser F:leType(passwd) F:hasLock=U emergency
obligation(system:putCat(red):D) if violated(U:release:F) U:isUser F:leType(passwd) (15)
F:hasLock=U emergency U:homeDir=D
permitted(system:putCat(red):D) if U:isUser U:homeDir=D (16)
[Sub:Act:Tar is allowed] if permitted(Sub:Act:Tar)
F:hasLock=f after (U:release:F)
D:hasCat(red) after (Sub:putCat(red):D)
The rst four laws are policies; the fth states that when a user releases the lock on a le, this
causes the user no longer to have the lock; the sixth states that a users home directory is put into
a red category when the system assigns it to that category. emergency is a member of Events.
Where U is the name of an account, and F a lename, we suppose (U:release:F) Actions
reg
,
but that (system:Act:Tar) Actions
eca
, for all Act and Tar such that (system:Act:Tar) Actions.
If, in a given state s, some user has a lock on a password le and an emergency is declared,
then that user is obliged to release the lockso that all transitions (s, e, s
) from s have e [=
obligation(U:release:F). Whether or not the user makes the release will depend on two things: a
requests being made, and that requests being authorized, by an authorization policy also present
(obligations do not automatically include the authorization to satisfy them). Let us suppose the
user does not full the obligation: it is violated, and so e [= violated(U:release:F). In that case,
the other obligation is activated: that the system should put the users home directory in the
red category. Across the same transition (s, e, s
in the transition
(s, e, s
), we must have s
[= D:hasCat(red).
Note that, as system:Act:Tar) Actions
eca
, and emergency Events, the second policy (15)
has a structure that corresponds directly to the ECA rule (in a stereotypical syntax):
On : emergency
If : U:isUser F:leType(passwd) F:hasLock=U
violated(U:release:F) U:homeDir=U
Do : (system:putCat(red)):D)
In the domain being modelled, the sequence of events described above is shown in Figure 3.
The two states between which the system moves, s and s
s
U:isUser
F:leType(passwd)
F:hasLock=U
U:homeDir=D
D:hasCat(red)
emergency obl(U:release:F) (U:release:F) violated(U:release:F)
obl(system:putCat(red):D)
[system: requests putCat(red) on D]
perm(system:putCat(red):D)
[system:putCat(red):D is allowed]
(system:putCat(red):D)
U:isUser
F:leType(passwd)
F:hasLock=U
U:homeDir=U
D:hasCat(red)
Figure 3: Domain ow diagram for release lock example
Sub = left, right
Act = read
Tar = le
Fluents = Ag:hasRead(le) [ Ag Sub
System Laws: Ag:hasRead(le) after (Ag:read:le) (Ag Sub)
inertial F (F Fluents)
Policies: permitted(Ag:read:le) if (Ag
:read:le) (Ag, Ag
Sub : Ag ,= Ag
)
[Sub:Act:Tar is allowed] if permitted(Sub:Act:Tar) [Sub requests Act on Tar]
Table 2: Simple policy description A
1
for our language
and r; le has been removed, as there is only one such le; read has also been removed, as it is the
only act; requests by left to perform a read on le are depicted as l:reqand similarly for the other
policy-related actions and the other agent. Note that we have not yet described how to generate
the sort of transition systems depicted in Figure 4; that will be shown soon.
Policy description A
1
in eect exhibits a kind of circular dependency in the logic of its policy:
for left to be permitted, right must not be doing; right does if it is allowed; right is allowed if it is
permitted; it is permitted if left does not do; left does if it is permitted. It is a particular feature
of the semantics of (+ and of the semantics of the causal theories on which (+ depends, that such
circular dependencies in causal laws can exist without removing the possibility of nding models
for them. This fact enables us to write policies that have much more direct circular dependencies:
a policy that permits Romulus to go to Rome if Remus is not permitted to go to Rome, and
permits Remus to go to Rome if Romulus is not permitted, is easy to support. In many policy
languages, and evaluation frameworks, policies that have such cycles through negation cannot be
18
l:hr,
r:hr
l:hr,
r:hr
l:hr,
r:hr
l:hr,
r:hr
l:perm,
r:perm
r:req, r:perm
r:allow, r
l:req, r:req
r:perm, r:allow, r
l:req, l:perm
l:allow, l
l:req, r:req
l:perm, l:allow, l
l:perm,
r:perm
l:req, l:perm
l:allow, l
l:perm,
r:perm
r:req, r:perm
r:allow, r
l:perm,
r:perm
r:req, r:perm
r:allow, r
l:req, r:req
r:perm, r:allow, r
l:req, l:perm
l:allow, l
r:req, l:req
l:perm, l:allow, l
l:req, r:req, r:perm
r:allow, r
r:req.r:perm
r:allow, r
r:req, l:req
l:perm, l:allow, l
l:req.l:perm
l:allow, l
Figure 4: Transition system for action description in Table 2
supported, and result in failure.
In many treatments of deontic logic, there is a close relationship between permission and
obligation; one is frequently dened in terms of the other, so that an obligation to do a is dened
as the lack of permission to do aor a permission to do a as the lack of an obligation to do
a. Research on norm-governed systems of agents, drawing as it does more on deontic logic as
a branch of modal logic, has often inherited this relationship. In research into the policy-based
management of distributed systems, in contrast, the modalities are usually more separate. This
is partly because of the particular operational focus of that work. Authorization policies then
guide whether or not a request results in the execution of an action. Obligation policies can be
understood as event-condition-action rules, in the presence and applicability of which an action
is automatically attempted. (Alternatively, obligations can be seen as conditions attached to the
award of authorizations.) Where obligations are interpreted as event-condition-action rules, it may
be necessary for the action that is red to have an associated permission.
In the current paper, the modalities are also kept distinctwe do not follow the tradition of
deontic logic that strongly relates them. We take them to be similar to event-condition-action
rules, in that where the body of an obligation policy rule is true, this automatically res a request
for the action referred to in the head to be performed.
3.4 Semantics for policy descriptions
The semantics for policy descriptions is given in terms of labelled transition systems. This can
be done directly, by dening how to each policy action description a labelled transition system
corresponds, or indirectly, by showing how to translate policy action descriptions of our language
into (+ proper, and then noting that, of course, every action description of (+ denes a labelled
transition system. Theorems then demonstrate that the transition systems dened by the indirect
and the direct methods are the same.
We rst show how to construct labelled transition systems for our policy descriptions.
19
Recall that for policy descriptions P with signature ,
=
f
a
f
= Fluents
a
= Happenings Pol
a
Happenings = Actions Events
We need a preliminary denition, for a modied version A
P
(s, e) =
A
P
(s, e)
c=f [ c Actions, e [= c=f
c=v [ c Requests, v dom(c), e [= c=v
(Sub:Act:Tar) [ e [= [Sub:Act:Tar is allowed] [Sub requests Act on Tar]
(Sub:Act:Tar)=f [ e ,[= [Sub:Act:Tar is allowed] [Sub requests Act on Tar]
[Sub requests Act on Tar] [ e [= obligation(Sub:Act:Tar) Sub:Act:Tar Actions
eca
).
We can now dene the labelled transitions formed from policy descriptions.
Denition 13 Let P be a policy description with signature . The labelled transition system
dened by P is a triple (S, L, R). S, the set of states, is given as in Denition 3: it is the set of
interpretations s of Fluents (i.e.,
f
) such that
s = s
I(
f
) [ s
[= T
static
(s) Simple(s).
L, the set of labels, is simply I(
a
), the set of interpretations of the action constantsincluding the
policy constants. Finally, R is the set of transitions (s, e, s
)
is a transition of P i s is a state, and
e = e
I(
a
) [ e
[= A
P
(s, e);
s
= s
I(
f
) [ s
[= T
static
(s
) E(s, e, s
).
As well as this direct semantics for policy descriptions, which shows how labelled transition
systems are dened by sets of policies and causal laws, it is possible to translate policy descriptions
into (+ action descriptions. This makes it possible to use existing implementations that calculate
models of (+ action descriptions, such as iCCalc, to work with our policy descriptions, and
answer queries about them.
Denition 14 Let P be a policy description with signature . The corresponding (+ action
description D
P
has the same signature as P, and all its causal laws. It also has the additional
laws:
exogenous [Sub requests Act on Tar]
20
for all Sub:Act:Tar Actions;
default (Sub:Act:Tar)
default permitted(Sub:Act:Tar)
default denied(Sub:Act:Tar)
default obligation(Sub:Act:Tar)
default fullled(Sub:Act:Tar)
default violated(Sub:Act:Tar)
default [Sub:Act:Tar is allowed]
for all Sub:Act:Tar Actions;
(Sub:Act:Tar) if [Sub:Act:Tar is allowed] [Sub requests Act on Tar]
fullled(Sub:Act:Tar) if obligation(Sub:Act:Tar) (Sub:Act:Tar)
violated(Sub:Act:Tar) if obligation(Sub:Act:Tar) (Sub:Act:Tar)
for all Sub:Act:Tar Actions; and
[Sub requests Act on Tar] if obligation(Sub:Act:Tar)
for all Sub:Act:Tar Actions
eca
.
This denition corresponds closely to the augmentations of the set A
P
(s, e) introduced in Deni-
tion 12. The following proposition shows that the direct labelled transition system semantics of
that denition match those determined by the (+ translation given above.
Proposition 15 Let P be a policy description, with signature . The labelled transition system
dened by P according to Denition 13 is the same as the labelled transition system dened by
the (+ action description D
P
, where D
P
is as given in Denition 14.
Proof: Let (S
P
, L
P
, R
P
) and (S
D
P
, L
D
P
, R
D
P
) be the two transition systems. We clearly have
S
P
= S
D
P
and L
P
= L
D
P
; we need to check whether the transitions are the same. We need to
show that for all (s, e, s
), A
P
(s, e) = A
D
P
(s, e). First, we show A
P
(s, e) A
D
P
(s, e). Clearly
A
P
(s, e) A
D
P
(s, e), so assume c=v is in one of the additional sets added in A
P
(s, e), i.e. c=v
is in A
P
(s, e) A
D
P
(s, e). A case analysis based on the additional laws of D
P
and the sets of
A
P
(s, e) A
D
P
(s, e) then shows that c=v A
D
P
(s, e). The proof in the other direction proceeds
similarly.
4 Policy composition
Thus far, we have grouped authorization and obligation rules together into a single set, conceived
of as existing at a single, centralized policy point. The set of policies has no internal structure.
Many common policy frameworks, however, allow multiple set of rules, the decisions of which
are combined in reaching an overall decision for the family of sets. The ways in which the sub-
decisions are combined can either be user-dened, or are xed by the specic framework being used
to evaluate the policies. XACML, for example, has a small number of simple policy combination
rules, which can state whether a deny overrides a permit. Another way of putting this is to say
that the positive authorization rules form a set P
+
, the negative rules form P
, and P
always
takes precedence over P
+
. In our previous work [Craven et al., 2009], we allowed such precedence
rules to be much more context-dependentwith a rich notion of context embracing policy and
system history, constraints, and properties of subjects, actions and targetsbut without making
any kind of logical separation of policies into dierent sets.
Recent work on policy composition has taken an algebraic approach, allowing names for sets
of policies in a policy language, and composition operators for their combination. We have been
21
particularly interested in the papers [Bruns et al., 2007], [Bruns and Huth, 2008], [Ni et al., 2009]
and [Li et al., 2009]. The semantics of policy composition is greatly claried in this research, and
we wish to make use of it, in several ways, here. The main dierence between the approaches
of the rst two papers, from one set of authors, and the second two papers, from another, is in
the multiplicity of policy decisions their frameworks allow, and the resultant expressivity of the
languages. In the rst two papers, a four-valued logic, that of [Belnap, 1977], is used to express
policy evaluations. A decision is a member of the set p, d, u, c,
5
where p represents a permitted
access, d a denial, u an undened decision (neither p or d), and c a conict (both p and d). The
value u, can be taken to apply in several dierent situations: rst, where there is no rule in a
given policy set that applies to a request, and secondly, if there is an error in the evaluation of a
condition of a policy, so that it is unknown what the decision would be. The value c is used to
expression the result of using both of two sub-policies, one of which evaluates an access request to
p and the other to d.
That the u value serves this dual purpose just mentioned is one of the motivations behind the
work of the two related papers [Ni et al., 2009] and [Li et al., 2009]; they enrich the values of the
policy logic in slightly dierent, though related ways. They use non-singleton, non-empty subsets
of policy evaluation values for representing indeterminacy resulting from errors in the results of a
policy evaluation. The underlying policy values of [Li et al., 2009] are p, d, n/a and in. However,
policy evaluations in the algebra are formed of subsets of these values. With respect to a given
policy, p represents an access request which is permitted by that policy, d an access that is
denied, and n/a a request to which the policy is not applicable. We will discuss in in a moment.
A value such as p, n/a is used by the authors in the presence of an evaluation error during a
request. For example, if a policy p
1
has only the rule
permitted(Sub:read:F) if Sub:isUser F:leType(passwd)
then if the database holding information about which groups Sub belongs to is corrupt, or in-
accessible owing to network problems, at the time of the request of some specic Sub, then the
PDP does not know whether Sub:isUser is true or not. This means that the PDP does not know
whether the rule is inapplicable (n/a), or would grant access (p). The uncertainty, a consequence
of error, can be modelled as the value p, n/a. The set d, n/a represents the analagous situation
for a negative authorization rule.
Algebraic operators on policies are dened by pointwise extension of operators over the values;
for instance, if a policy p
1
evaluates an access request [Sub requests Act on Tar] to p, and
p
2
evaluates it to d, then a deny overrides policy combination would evaluate to d, whereas
a permit overrides would evaluate to p. In some situations, however, it is desirable that
conict between two such sub-policies p
1
and p
2
should not be removed on combination. This is
particularly the case when the policy combining them is not the top level of policy in the PDP,
whose values are used by the PEP in deciding whether to grant an access. Where one wishes to
retain a representation of conict, the value in can be used; this is one of its functions. The
other is in the case where a policy evaluation error has occured in a policy p (such as p, n/a),
but one does not wish to expose the occurrence of this error to a policy r dened using p. In such
a case, it would be possible to dene an intermediate policy q, which takes an such error value of
p and transforms it to in.
The value is used where there are no policy rules in a policy; this is distinguished from
n/a, in which policy rules exist but none is applicable. The values not mentionedp, d, in,
for instanceare used when combinations are made of policies whose evaluations are uncertain,
propagating and adding to the uncertainty.
It is clear that, if one were to use the value in only in the rst of the two functions assigned
to it in [Li et al., 2009]that of representing conictand use p, d, n/a and in as the values for
policies rather than the subsets of them, then the result would be in all essentials the same as
the approach, based on Belnap logic, of [Bruns et al., 2007]. We therefore see the main expressive
dierence between the two approaches as being whether or not they allow the explicit depiction
5
We use p for permit, instead of their g for grant.
22
of failures and errors in the evaluation process. Which policy composition framework we should
adopt will then depend on whether such errors are ones we want to represent, and reason about,
during policy analysis and renement. In the current work, we are interested in such errors
only when they spring from policy-related processes. For example, if policies are distributed
between dierent organizations, and the information relevant to policy evaluation spread between
dierent sites, then if an organization denies access to retrieve a given credential, this is something
we would wish to model. A communications failure in contacting the distant site, though it
does aect policy decisions, is not itself policy-based, and we would not wish to model it. This
means that a four-valued approach is appropriate in the centralized case, where all policies and
information is presumed to be accessible; but in the distributed case, if it is deemed important to
model communication and policy decision failures at dierent sites, then the richer composition
semantics using subsets can be adopted. At the moment, we are only considering the centralized
case, and so we will use Belnap logic, and the composition operators of [Bruns et al., 2007]. Later
on, we will change to the richer framework.
For the moment, we deal with policies consisting only of authorization rules; remarks on the
composition of obligation policies are made in Section 8. The language that we introduce in the
following section is called p(+.
4.1 Language and semantics
In PBel, the policy algebra based on Belnap logic introduced in [Bruns et al., 2007], single policy
rules are the atoms of the composition process. We will alter the approach to allow for sets,
composed of only positive authorization policies, or only of negative authorization policies. (This
can be translated into their approach straightforwardly.) So, we assume a set PolicyNames =
p
1
, . . . , p
n
of policy names. The syntax of authorization rules is changed, to show that each such
rule is a member of a named set of policies. Thus, a positive authorization rule has the form
permitted(p, Sub:Act:Tar) if G (17)
and a negative authorization rule has the form
denied(p, Sub:Act:Tar) if G (18)
where p PolicyNames.
We will wish to be able to make use of the basic operations over the Belnap space dened in
[Bruns et al., 2007]. To be clear about the nature of these operations, it is useful to visualize the
bilattice of values. The relationship between them can be shown as in Figure 5. The bilattice has
two orderings. The truth ordering, which in its application to policies is better thought of as a
permission ordering, is marked t in Figure 5. Its least element is d and its greatest is p, with n/a
and in being non-comparable. The information ordering, marked k in the diagram, has n/a as its
least element, with in its greatest.
Basic operations over these values are dened; the binary operations are familiar from lattice
theory. The operators are , , for the permission ordering, and , and for the knowledge
ordering; in both cases, they are respectively a meet, join, and complement operation. We provide
the meanings in Table 3, in order to make later denitions clearer. The order of operands is given
alphabetically; the operators are commutative. The operations are lifted from their application to
policy values to policies; this means, for example, that if two of our policy names are p
1
and p
2
(i.e. p
1
, p
2
PolicyNames), and a given access request is evaluated to p by p
1
, but to n/a by p
2
,
then the policy p
1
p
2
would evaluate to n/a; p
1
p
2
would evaluate to p; and so on.
In addition to the positive and negative authorization rules as dened above in (17) and (18),
two other sorts of expression are added to our language. A policy composition rule has the form
policy P is P
(19)
where P is a policy index, and P
be
desiganted as top in Pso the rule
policy p
is top
is in P. Where s is an interpretation of
f
and e is an interpretation of
a
, then
A
P
(s, e) = A
P
(s, e) [Sub:Act:Tar is allowed] [ (Sub:Act:Tar), (s, e) [=
p
p
[Sub:Act:Tar is allowed]=f [ (Sub:Act:Tar), (s, e) ,[=
p
p
It remains to dene the relationship [=
p
, where p is a policy index. This is done recursively,
depending on which p is used.
(Sub:Act:Tar), (s, e) [=
p
p if p is basic and e [= permitted(Sub:Act:Tar)
(Sub:Act:Tar), (s, e) [=
p
d if p is basic and e [= denied(Sub:Act:Tar)
(Sub:Act:Tar), (s, e) [=
p
n/a if p is basic and e ,[= permitted(Sub:Act:Tar) denied(Sub:Act:Tar)
(Sub:Act:Tar), (s, e) [=
p
x if p is not basic and p is f(p
1
, . . . , p
n
) P
and i(1 i n (Sub:Act:Tar), (s, e) [=
p
i
x
i
)
and x = f(x
1
, . . . , x
n
).
In the nal clause of this denition, the denitions of the operators , , , , and as they
apply to policy values are applied recursively, to give the value f(x
1
, . . . , x
n
). Constraints placed
on the occurrence of policy indices in composed policy descriptions, according to Denition 16,
ensure that Denition 17 is well-formed.
Denition 18 Let P be a composed policy description of signature . The labelled transition
system dened by P is the triple (S, L, R). S, the set of states, is given as usually, as the interpre-
tations s of Fluents such that:
s = s
I(
f
) [ s
[= T
static
(s) Simple(s). (22)
L, the set of labels, is simply I(
a
), the set of interpretations of the action constantsincluding the
policy constants. Finally, R is the set of transitions (s, e, s
)
is a transition of P i s is a state, and
e = e
I(
a
) [ e
[= A
P
(s, e);
25
s
= s
I(
f
) [ s
[= T
static
(s
) E(s, e, s
).
Translating composed policy descriptions into (+ requires that we alter the signatures, adding
constants that are used to represent the values of decisions for each policy index.
Denition 19 Let P be a composed policy description, with signature . For each p which
is a policy index in P and each action constant of the form (Sub:Act:Tar), add a multi-valued
action constant pdp(p, Sub:Act:Tar) to the signature ; the domain of each new constant is the
set p, d, in, n/a. The new constants will represent what values a request for Sub:Act:Tar would
take, according to policy p, as dened by the authorization rules and policy composition rules of
P. Let the new signature be
, L
, R
). Dene
L
= e
[ e L
, e
= (s, e
, s
) [ (s, e, s
) R
, e
, L
, R
) are equal.
Proof: We clearly have S = S
and L = L
in terms of
the non-basic policy names, l, r
w
and r
r
. A context for this is easily imagined: perhaps those
responsible for writing the policy for the library sta are dierent from those that set the policy
for its users, and the work of each has to be combined; or it may simply be natural to group the
rules together into such sub-policies. In either case, the sets must be combined.
Let us rst consider the following composition:
policy p
is l (r
w
r
r
) (23)
This is a simple-minded combination: as Table 3 makes clear, the result of -ing a permitted
decision with a not-applicable decision is not-permittedso that where borges is a librarian but
not a reader, then because r
r
and r
w
are not applicable, p
, l, r
w
, r
r
is top
Table 4: Basic elements of the policy description for library example.
This idea of policies being overriding promotes the introduction of another policy operator,
>, taken from [Bruns et al., 2007]. Where q
1
and q
2
are policy names, then q
1
> q
2
is the policy
which evaluates to q
1
if q
1
is the value of q
1
, unless q
1
evaluates to n/a, in which case the value of
q
1
> q
2
is q
2
. X > Y is dened as
X (((X (X))) Y ).
As a correction of the rst proposal, the top policy could be dened in the following way:
policy p
is l > (r
w
> r
r
) (24)
This means that l trumps all other policies: whenever borges is a librarian, then requests both to
write to the catalogue and to read it are allowed. If l does not apply (borges is not a librarian),
then (r
w
> r
r
) is used to evaluate requests. This means that, if borges is a reader, then a request
to write to the catalogue would be denied; a request to read the catalogue would be allowed.
All other combinations of requests and circumstances (in this case, user possessions by borges)
of user categories result in a n/a decision by p
) R
red
;
transitions too are green ((s, e, s
) R
grn
) by default. Note that state and action permission
laws, if present in an action description D, do not alter the structure or nature of the labelled
transition systems: they are not used in the denision of S and R, only in classifying the states and
transitions normatively. Using this formal apparatus, the green-green-green constraint (henceforth,
), requires that when s S
grn
and e R
red
, then s
S
red
.
(There is a certain regrettable overlap in terminology here, that might be confusing to some-
body new to the various languages and concepts presented. Specically, the use of not-permitted
to indicate normative status might be confused with the idea of permission as this features in
policies, and the policy language we introduced in Sections 3 and 4. They are distinct. We stress
again that norms are higher-level, abstract classications of what is deemed to be good or bad
behaviour and properties in a system, but which do not in themselves determine how the bits of
system can act. Policies are typically lower-level, and through the presence of a PDP and PEP
a policy management componentthey do control what can be done in a system. Policies are
modelled in such a way that changes in policies mean a change in the structure of the labelled
transition systems used to depict the domains behaviour.)
As mentioned above, this classication is of states and transitions as a whole: there is no sense
of whether an individual agents contribution to a state or transition is good or badwhether
some specic agent conforms to the norms governing it, or not. Yet clearly this is desirable, so
n(+ also adds features that pick out an individual agents contribution to a transition, and allow
that contribution also to be classied. The full form of labelled transition systems for n(+ can
now be dened.
29
Denition 21 A coloured agent-stranded transition system is a tuple
(S, A, R, S
grn
, R
grn
, Ag, strand, green).
(S, A, R) is as given in Denition 1, and S
grn
S and R
grn
R are the sets of green states and
transitions. Ag is a set of agents. For ag Ag and e A, strand(ag, e), which we also write
as e
ag
, picks out ags contribution to the label eprecisely what this contribution is, we leave
open. Finally, green(ag), for each ag Ag, is the set of transitions that are green for ag (so,
green : Ag (R)).
As well as the state and action permission laws we have already introduced, n(+ also has
agent-specic permission laws, which have the form:
not-permitted(ag) A if G (27)
Here, ag must be in Ag, and as usual A is an action formula and G a formula. An action description
of n(+ is an action description of (+, which also may include laws of the form (25), (26) and (27).
Denition 22 Let D be an action description of n(+. The coloured agent-stranded transition
system (S, A, R, S
grn
, R
grn
, Ag, strand, green) determined by D has:
(S, A, R) is the (+ labelled transition system dened by D
, where D
is D without any
permission laws.
S
grn
= S S
red
, where S
red
is s S [ s [= F for some law (25) in D
R
grn
= R R
red
, where R
red
is
(s, e, s
) R [ s S
grn
, s
S
red
, where A ,= A
, to represent whether
two agents are alone together in a room, or a single agent is alone in a room. These statically
determined uent constants are of use in the expression of policies and norms, later. The actions
are for an agent A to move in a given direction D, which we represent as A:move:D.
Causal law (28) describes the eects of a successful move by an agent. Law (29) means that
agents cannot request to move to non-adjacent rooms. Law (30) means that agents may not
simulatneously request to move to two dierent rooms. Law (31) means that two dierent agents
cannot move in the same direction through a doorway, and law (32) means that agents cannot
move in opposite directions through doorways: strait are the gates.
Let us suppose that a system designer wishes to impose some order on this non-normative,
ungoverned free-for-all. The basic norm to be adhered to is that men and women ought not to be
alone together in a room. In n(+, we can represent this using the state permission law
not-permitted alone(m, f) (33)
This has the desired eect of colouring red all states where the man m is in the same room as the
woman f; all other states are coloured green by the default which is standard in n(+. As there
are no action permission laws, the transitions are coloured green by default, with the exception
of all transitions from green states to states which, according to (33), are redthe ggg constraint
colours those transitions red. A fragment of the resulting transition system is shown in Figure 7.
The colour of the agents in a state represents the colouring determined by the state permission
m
f
m f
m:move:clockwise
m:move:anti
Figure 7: Fragment of transition system for the rooms example.
laws; transition colours are shown by the colour of the arrows and their labels.
31
Sub = m, f
Act = move:anti, move:clock
Tar =
tar
) [ A, A
Sub, A ,= A
Actions
eca
= A:move:anti, A:move:clock [ A Sub
Actions
reg
=
Events =
System Laws: A:loc = R
) (28)
req(A:move:D) is non-executable if A:loc=R [ A Sub, Xadj(D, R, X)
(29)
req(A:move:D) req(A:move:D
) is non-executable [ A Sub, D ,= D
(30)
A:move:D A
:loc=R [ A ,= A
(31)
A:move:D A
move:D
is non-executable ifA:loc = R A
:loc=R
[ A ,= A
, D ,= D
, adj(D, R, R
) (32)
default alone(A, A
) if A:loc=R A
:loc=R [ A ,= A
alone(A, A
) if A:loc=R A
:loc=R
[ A ,= A
, R ,= R
alone(A, A
) if A:loc=R A
:loc=R A
:loc=R [ A ,= A
, A ,= A
, A
,= A
default alone(A)
alone(A) if A:loc=R A
:loc=R [ A ,= A
inertial F [ F Fluents
Table 5: Signature and system laws for the rooms example.
The norms that have coloured the states and transitions of this system in dierent ways rep-
resent a system-level authoritys perspective on what is desirable or undesirable in the system.
The policies are used to change the various components, agents, or subjects behaviour, and it is
natural that the objective should be to have policies in place that guarantee the achievement of the
normswhere achievement means that nothing bad ever happens: no redness is present. The poli-
cies can be imagined as being derived by the various agents themselves; or, in the case where the
agents are less autonomous, the policies might also be derived by a system-wide authority, either
the same as or dierent from the one who sets the norms. There are various dierent possibilities.
(The current work does not take into account the epistemic complications of derivation, or indeed,
how derivation of policies from norms is achieved: it only considers the ways of representing both,
and reasoning about their interactions.)
For a rst attempt at policies that are intended to achieve norm-compliance, consider those
set out in Table 6. The rst, positive authorization policy p
m
states that men are allowed to go
anywhere. The second states that men are not allowed to move clockwise into the top-left room
forbidding transitions where men move from the bottom-left to top-left. The third policy states
that women are allowed to go into any room where there is no man. The policy combination for
p
means that p
m-restrict
overrides p
m
.
Do these policies eliminate redness? It is rst important to note that there are several dierent
interpretations of that question for which the answer might be required. The most obvious is: do
32
PolicyNames = p
, p
m
, p
m-restrict
, p
f
Policies: permitted(p
m
, m:move:D) if m:loc=R (R
adj(D, R, R
))
denied(p
m-restrict
, m:move:clock) if m:loc=R (adj(clock, R, top left))
permitted(p
f
, f:move:D) if f:loc=R m:loc=R
(adj(D, R, R
))
policy p
is top
policy p
is (p
m-restrict
> p
m
) p
f
Table 6: Policy set (1) for the rooms.
the policies eliminate red transitions? Yet this is not the best way of understanding the question
of our interest, in policy authors, is in writing policies which prevent the system from entering
bad states and doing bad things, and also ensure that if the system does ever go wrong, then it
recovers. For, there may be green transitions from a red state to a redstate, and so the elimination
of red transitions may not guarantee that a system must always recover and move out of a red
state. So, a better interpretation of the question is: are there any transitions in the system to a
red state? This is what we shall answer.
The rst set of policies, in Table 6, clearly do a poor job. The transition shown in Figure 7
from left to right, is one to a red state; but this is not eliminated by the policies. To see this,
consider the fate of a request req(m:move:clock) when the system is in the state on the left. p
f
evaluates to n/a for this, p
m
of course evaluates to p, and p
m-restrict
evaluates to n/a, because its
condition amounts to if m:loc=bot right given the arrangement of the rooms in our example. p
is therefore whatever (n/a > p) n/a is evaluated to, and this is p. The request is thus allowed.
In fact, there are 26 transitions to red states under this policy set; if all requests were allowed,
then this number would only increase to 28, which shows that the policies are very unsuccessful
job in eliminating them. (The two which are eliminated are those where the man moves clockwise
into the top-left room: the rst where the woman is already there, the second where she moves in
simultaneously from the top-right.)
Let us have another attemptshown in Table 7. In set (2), we will add policies that mean the
PolicyNames = p
, p
m
, p
m-restrict
, p
f
, p
m-bar
, p
f-stay
Policies: permitted(p
m
, m:move:D) if m:loc=R (R
adj(D, R, R
))
denied(p
m-restrict
, m:move:clock) if m:loc=R (adj(clock, R, top left))
permitted(p
f
, f:move:D) if f:loc=R m:loc=R
(adj(D, R, R
))
denied(p
m-bar
, m:move:D) if m:loc=R f:loc=R
(adj(D, R, R
))
denied(p
f-stay
, f:move:D) if alone(f) f:loc=R
m:loc=R
x
m:loc=R
y
(adj(anti, R, R
x
), adj(clock, R, R
y
))
policy p
is top
policy p
is (p
m-bar
> p
m-restrict
> p
m
) (p
f-stay
> p
f
)
Table 7: Policy set (2) for the rooms.
33
man may not enter a room if there is somebody there, and also a policy requiring that if a woman
is alone and there is nobody in a room either side of her, then she must stay put. The intention
is that the second of these policies should guarantee that there are no meetings where a man and
woman enter the same room from dierent directions.
This attempt works much better. It eliminates all red transitions, and leaves only 5 transitions
to red states. When these transitions are examined, using a tool such as iCCalc, they are seen
all to be self-transitions. The policies have ensured that no red state is never entered from a green
state, but failed to ensure recovery. To do that, we can augment the policies to include several
obligations (the authorization policies remain the same). They require that, if a man and woman
are alone together, the man must move clockwise if he is allowed to; if they are alone and they
man is not allowed to move clockwise, then the woman must move anti-clockwise. The new policy
set in full is in Table 8. As is easy to check (and intuitively clear), this policy achieves what we
PolicyNames = p
, p
m
, p
m-restrict
, p
f
, p
m-bar
, p
f-stay
Policies: permitted(p
m
, m:move:D) if m:loc=R (R
adj(D, R, R
))
denied(p
m-restrict
, m:move:clock) if m:loc=R (adj(clock, R, top left))
permitted(p
f
, f:move:D) if f:loc=R m:loc=R
(adj(D, R, R
))
denied(p
m-bar
, m:move:D) if m:loc=R f:loc=R
(adj(D, R, R
))
denied(p
f-stay
, f:move:D) if alone(f) f:loc=R
m:loc=R
x
m:loc=R
y
(adj(anti, R, R
x
), adj(clock, R, R
y
))
obligation(m:move:clock) if alone(m, f) allow(m:move:clock)
obligation(f:move:anti) if alone(m, f) allow(m:move:clock)
policy p
is top
policy p
is (p
m-bar
> p
m-restrict
> p
m
) (p
f-stay
> p
f
)
Table 8: Policy set (3) for the rooms.
wanted: there are no transitions to red states. It does not rule out red states: but the only way a
red state can be part of a simulated run through the system is if such a state is the initial state of
the run. The actions of the various components of the system governed by policiesin our case,
the man and womanwill always ensure that any red initial state is immediately left behind, and
none is subsequently entered.
5.3 Extracting the System Component
We would like to be able to speak of the transition system dened by the system component
of an action description of p(+, n(+ or np(+this would model the eects of actions on non-
normative, non-policy features of the system, if policies and norms are removed. If we simply
remove from an action description D all policy laws and permission laws, however, we will still be
left with policy action constants, and some system laws may refer to those action constants. In
the rooms action description shown in Table 5, for example, the causal laws (29) and (30) both
use the action constant req(A:move:D). However, we can make two changes to action descriptions
involving policies or norms, which reveals the underlying system structure. (i) rst remove any
causal laws that use policy-related constants such as req(), permitted() and so on. Then make
action constants exogenous, by adding a causal law
exogenous a
34
for every a
a
. iCCalc can then be used to nd the transitions of the system, and visualize
them (see Section 6 for how this is done, and examples). Where D is an action description of p(+,
n(+ or np(+, let D
, A
, R
) dened by D
S,
A,
R). They are not the same transition system, because
(
S,
A,
R) is dened over a signature that also includes policy action constants; but if one starts
with (
S,
A,
R) and removes all policy action constants, and bleaches states and transitions of their
norm-determined colourings, the result is (S
, A
, R
, A
, R
) and (
S,
A,
R), and consider the very simple action description shown in Table 10.
In this domain, because a request is automatically triggered when p is true, then removing all
causal laws in which policy-related constants occur will remove information that is essential to the
determination of the structure of (
S,
A,
R). In fact, (
S,
A,
R) has no transition from the state p
where a is not performed, whereas (S
, A
, R
Fluents = p
Actions
reg
= x:a
Events =
System Laws: inertial p
p after x:a
req(x:a) if p
PolicyNames = p
Policies: policy p
is top
permitted(p
, x:a)
Table 10: Simple policy description.
an externally implemented SAT-solver. Solutions represent runs of length t through the transition
system dened by D, that are consistent with the information of the query Q.
With Marek Sergot of Imperial College, the current author reimplemented (Calc, to add
support for a number of additional features. The result, iCCalc, some of the same core algorithms
as (Calc, but there are substantial additions and alterations, as follows.
The syntax for source les is changed: full Prolog can now be used in the denitions of
signatures and action descriptions, with features to use named variables as a shorthand.
This makes the specication of large domains much more convenient. (Calcs input syntax
was subject to an overly strict type-check: this has been removed.
There is a choice between using the SAT-solver clasp,
7
a state-of-the-art SAT-solver, or,
if SICStus-Prolog
8
is being used, of employing its built-in Boolean constraint satisfaction
library, clp(b), for query solution. Initial experiments indicate that clasp is much the best
option.
Several additions to the basic (+ language are fully-supported, including n(+, p(+ (the
language for policies presented in the current paper), and (+
timed
[Craven and Sergot, 2005].
Queries in the agentive modal logic LUCA [Sergot, 2008] are supported by an addition to
the code, such queries being evaluated over transition systems dened using (+ or one of its
extensions.
Full transition systems, and fragments of transition systems, can be written to an external
le and visualized using graphviz,
9
freely-available graph visuzlization software.
The code runs on many common variants of Prolog, including SICStus Prolog (versions 3
and 4), Yap Prolog
10
and SWI-Prolog
11
.
7
See http://www.cs.uni-potsdam.de/clasp/.
8
See http://www.sics.se/sicstus/.
9
See http://www.graphviz.org/.
10
See http://www.dcc.fc.up.pt/~vsc/Yap/.
11
See http://www.swi-prolog.org/.
36
The code for iCCalc is freely available from http://www.doc.ic.ac.uk/~rac101/iccalc/.
6.2 Query and Analysis Types
Recall the rooms example presented in Section 5.2. We will use this domain, with more variations
of its norms and policies, to illustrate the various kinds of analysis and reasoning task possible
over domains of (+ and extensions of that language for norms and policies. We will only consider
the sorts of queries currently supported within iCCalc; but as the action descriptions of members
of the family of langauges all dene labelled transition systems (sometimes coloured, sometimes
stranded), then of course many other kinds of query can be imagined. It is possible, for instance,
to use model-checkers to check various kinds of property over the transition system. Though these
possibilities are very interesting, we do not discuss them further in detail here.
In order to illustrate the kinds of query possible, we will use the action description for the
rooms example with a slight variations on policy set (2). The relevant system specications are
shown in Table 5. However, we will also add some agent-specic norms to the example, so that
the full strength of the representation, and all forms of query, can be shown. The full compliment
of norms and policies is shown in Table 11. There are two agents, and the state permission law
Agents = m, f
Norms: not-permitted alone(m, f)
not-permitted(m) m:move:clock m:move:anti if m:loc=R f:loc=R
PolicyNames = p
, p
m
, p
m-restrict
, p
f
, p
f-stay
Policies: permitted(p
m
, m:move:D) if m:loc=R (R
adj(D, R, R
))
denied(p
m-restrict
, m:move:clock) if m:loc=R (adj(clock, R, top left))
permitted(p
f
, f:move:D) if f:loc=R m:loc=R
(adj(D, R, R
))
denied(p
m-bar
, m:move:D) if m:loc=R f:loc=R
(adj(D, R, R
))
denied(p
f-stay
, f:move:D) if alone(f) f:loc=R
m:loc=R
x
m:loc=R
y
(adj(anti, R, R
x
), adj(clock, R, R
y
))
policy p
is top
policy p
is (p
m-restrict
> p
m
) (p
f-stay
> p
f
)
obligation(f:move:anti) if f:loc=top right
Table 11: Norms and policies for the rooms example.
from before stating that the man and woman may not be alone together. There is a single agent-
specic permission law, which states that it is not permitted for m, the male, to stand still, if f is
in the room. Note that this is dierent from an obligation on m to move if f is in the room: the
obligation would force m to make a request to move, and thus eects the systems behaviour; the
norm merely colours ms strand red should he be with a woman and fail to move. The absence of
agent-specic laws for f means that fs strand in a transition will always be green. We will also
impose the local-global constraint, which means that a transition is (globally) red, whenever any
agent strand of that transition is red. The policies are those from (2), except that p
m-bar
, which
37
stated that the man is not permitted to enter a room if the woman is there, has been omitted. We
have also added a new obligation, requiring f to move anti-clockwise when she is in the top-right
room.
We now describe a sample of the kinds of analysis query possible. Given the number of types
and examples, we do not list the solutions to all, but merely a representative.
Normative status The colourings of the transition system and its strands mean we can ask lots
of questions about the combinations of colourings with properties of states and systems; to
do so is to ask about the circumstances in which norms are adhered to, or contravened. For
example, (i) Is there a red state where m is in the top-left room? (ii) Is there a transition
where m transgresses the normshis strand is redbut the resulting state is green? (iii) If
m moves anti-clockwise four times in a row, is one of the states he passes through necessarily
red?This last can be queried by asking iCCalc for a run of length 4, where each state
is green, and where m:move:anti is true across each transition. Any solution disproves the
statement that a red state must be passed through. iCCalc nds 36 solutions to this query,
with groups divded depending on which room m starts from. The solutions all have f chase
m round the suite of rooms (or m chase f).
Red transitions, agent-redness We may also be interested in the relationship of the agent-
specic norms to the global norms. Of course, where the local-global deontic constraint is
enforced, any transition where an agent acts badly is automatically forced to break the global
norms, and is coloured red. Yet we may still want to know whether there are transitions that
are globally red without being red for any specic agent. Such transitions may of particular
interest, in that they signify either a failure to design agent-specic norms that match the
global norms, in which case the agent-specic norms may need modication; or else, they
might represent transitions which are known to be bad because of factors the agents cannot
controlsome agent whose norms and behaviour we cannot direct did something wrong, or
the system malfunctioned in a way that nobody was responsible for. There are 14 transitions
of this sort in our new rooms example; they are all instances where m and f are initially
in adjoining rooms, the woman doesnt move, and the man moves into the womans room.
If the optional local-global constraint is not enforced, we may be interested in seeing whether
the property it enforces is, nevertheless, true. Are all states coloured red for some particular
agent also globally red? If we remove the constraint from our domain, the answer is that
there are 13 transitions where m breaks his agent-specic norms, but the transition is not
considered globally red. These might be instances of a too-strict development of agent norms.
Planning under norms One form of planning query that considers the normative status of the
world asks whether it is possible to go through from an initial state in which F is true,
to a nal state in which G is true, with a particular pattern of adherence to norms along
the way. That adherence may be total: no agent does anything wrong, meaning that there
are no intermediate states between those in which F and G are true that are red, no red
transitions between any of these states, and there is no transition that has a red strand for
any agent. Yet there are also weakings of this total adherence to norms that one might be
willing to accept: runs, for instance, where every strand in every transition is green, but
there are some transitions which are globally red (this situation can only arise when the
optional global-local constraint is not imposed). Such runs might be considered to be those
in which external factors are responsible for the systems badness, not any of the agents
whose actions the plan is to dictate. For example, suppose we wanted to nd the shortest
sequence of actions of m and f from a state where m is in the bottom-left room, f is in the
bottom-right, to a state where m is in the top-left, and f in the bottom-left; none of the
intermediate states brought about by the actions in the plan should be red, and all agent-
specic norms should be adhered to. Is this possible? iCCalc conrms that it is, and that
the shortest plan involves three stepssets of concurrent actions by m and f. The sequence
where m and f request to move anti-clockwise at each stage results, after three steps, in
both agents being where they are required to be. The agent-specic norms are keptand,
38
in fact, all transitions are globally green too.
12
Obligation violations Given the possibility of including obligations in our policies of p(+, we
can ask what the interaction is between these obligations and the authorization policies.
The eect of an obligation on a subject is to cause that subject to make a request; are such
requests permitted or denied? If permitted, the obligation is fullled; otherwise, it is violated.
We may wish to know whether obligations are ever violated given specic system constraints,
or whether, when an obligation is violated by an agent ag, the previous actions of ag were in
some way responsible for putting him in a situation that made such a violation ineluctable.
Our example policy contains a single obligation, on f: she must go anti-clockwise if ever in
the top-right room. As iCCalc shows, this obligation is violated in 6 transitions, which fall
into two groups depending on the reason for the violation. The rst group of 3 violations
occurs when m is in the diagonally opposite, bottom-left room. In this situation, p
f-stay
denies f permission to move in any direction, so that the request forced by fs obligation is
not allowed. There are three violations in this sub-group because m can either do nothing,
request to go clockwise, or request to move anti-clockwise. In the other group of three, the
man is in the top-left room, and f is then denied permission to move anti-clockwise into
it by p
f
; the three members again match ms possibilities for requests. The fragment of
the transition system showing violations is depicted in Figure 8. Those action and policy
f m
m
f
m
f
m
f
m:move:clockwise,
f:req(move:anti),
obligation(f:move:anti),
viol(f:move:anti)
m:move:anti,
f:req(move:anti),
obligation(f:move:anti),
viol(f:move:anti)
m:move:anti,
f:req(move:anti),
obligation(f:move:anti),
viol(f:move:anti)
f:req(move:anti),
obligation(f:move:anti),
viol(f:move:anti)
f:req(move:anti),
obligation(f:move:anti),
viol(f:move:anti)
m:req(move:clockwise)
f:req(move:anti),
obligation(f:move:anti),
viol(f:move:anti)
Figure 8: Violations in the rooms example.
constants that are most relevant to the violations have been marked: the requests made by
the woman, her obligations, whether or not the obligation was violated, and any actions
12
In iCCalc, nding the shortest plan from a state where F is true to a state where G is true is done as follows.
The length n of plans is gradually increased, from 0 upwards. For length n, we query whether there is a run through
the transition system dened by the action description, such that F is true in the initial state and G in the nal
state. If there is, we then need to check that all runs of length n, beginning in a state which satises F, in which
the same actions are performed by the agents for which we are planning, results in G being true in the nal state.
(This is to rule out Gs holding by luck, given the possibility of non-deterministic action descriptions in C+ and its
extensions.) If this is true, then the plan is the sequence of actions performed by our agents. If not, we increment
the value of n and repeat the process.
39
performed by the man. The various authorization policy decisions, and requests of the
man, have not been shown. (These can be viewed in full using the visualization feature in
iCCalc.)
Policy conict Violated obligations represent one form of policy conict analysis: for an obliga-
tion to be violated, the authorization policy must imply that a request to perform the action
is not allowed. There are also other forms of policy conict, where named sub-policies used
in the denition of the top policy are found to give conicting decisions. Whether or not
this is a problem will depend on the application area, and the specic way in which policies
are combined. For instance, if there are two policies p and p
e
, where p
e
is an exception
to p, then p
e
may contain negative authorizations that override the positive decisions of p
under certain circumstances; we have made use of such structures in examples in the current
paper, using the > operator. But there may be other situations, where the way that policies
are combined requires that they never issue contradictory decisions. Suppose, instead of
p
e
> p, the policy author had written p
e
p; then, when both p
e
and p apply, p
e
p would
be evaluated to in, and this may propogate undesired eects through the evaluation of the
rest of the composition. We can use analysis to discover when sub-policies give conicting
results: for iCCalc includes an option to make the internal workings of the PDP visible;
action constants are then included for the PDPs evaluation of requests against all named
policies in the action description. Making that query for the rooms example shows there
are several examples of named policies reaching conicting decisionsone p and the other
dalthough, since the policy for our example has been well designed with good uses of >,
these do not signal a aw in the policy. (It is also possible, of course, to test for the presence
of an in evaluation against a named policy directly; if we do this for our example, no solutions
are found.)
Coverage gap A coverage gap exists with respect to a policy p when there is a request to which
no rule in p applies. If policies are dened as compositions using a policy algebra, this may
not be a problem: for dierent named sub-policies may be intended to apply to disjoint sets
of requests, with no single named basic policy covering all. However, if it is known that
all requests of a given type should be jointly covered by a given set p
1
, . . . , p
n
of policies,
then we may wish to prove that this is so; this can be done by showing whether there is
any transition such that a request sub:req(act:tar) will be evaluated to n/a by all policies
p
1
, . . . , p
n
. If there any transitions of this sort, then iCCalc will nd them, discovering all
requests that are not covered, as well as the various circumstances in which the gaps occur.
Policy comparison One kind of policy subsumption was dened in [Craven et al., 2009] as hold-
ing between two policies, in the context of a given domain description, when all positive and
negative authorizations and all obligations implied by one policy in a given context, are also
implied by the other policy; the second policy is then said to subsume the rst, for the given
domain description. One purpose of determining whether one policy subsumes another is
when updates to a policy are being considered: if the new policy to be added already has all
its decisions matched by an existing policy, then there may be no reason to add it.
Where p
1
and p
2
are two basic policies (hence sets of rules, rather than algebraic expres-
sions in terms of other policies), then a similar notion of policy subsumption is useful in
the current work. Suppose p
1
and p
2
are positiveanalagous remarks will hold for negative
basic policies. Then, if all contexts in which p
1
determines an action as permitted are also
contexts in which p
2
determines the action as permitted, there can be no reason to add the
rules of p
1
to those of p
2
: p
1
p
2
is the same, for the system being considered, as p
2
. We
can dene this as follows.
Denition 23 Let p
1
and p
2
be basic positive authorization policies, where p
2
features in
some action description D of p(+ or np(+. Let (S, A, R) be the LTS dened by D. Then,
if for all Sub:Act:Tar Actions and all (s, e, s
) R
s e [= permitted(p
1
, Sub:Act:Tar) implies s e [= permitted(p
2
, Sub:Act:Tar)
40
we say that p
2
D-subsumes p
1
, and write this as p
1
D
p
2
. If p
1
and p
2
are negative basic
authorization policies, the denition is the same but with permitted replaced by denied.
Note that if p
2
D-subsumes p
1
, then replacing p
2
by p
1
p
2
has no eect on the transition
system dened, and so no eect on the policy decisions made, however p
2
features in the
denition of the top policy. That this property holds is clearly one reason why this denition
of subsumption is useful.
What if p
1
and p
2
are not both basic policies? In general, there is then the possibility that
for a given request they may take any of the four values p, d, n/a and in. Two natural
denitions of subsumption would then be that p
2
D-subsumes p
1
when, for all (s, e, s
) in
the transition system,
s e [= pdp(p
1
, Sub:Act:Tar)=X implies s e [= pdp(p
2
, Sub:Act:Tar)=X
for (i) X p, d or (ii) X p, d, n/a, in. However, note that where p
1
and p
2
are non-
basic, the expression p
1
p
2
is not meaningful, because p
1
and p
2
are no longer sets of rules.
Instead of considering adding the rules of p
1
to those of p
2
, and thus comparing p
2
with
p
1
p
2
, we might consider replacing p
2
by p
1
; but if p
1
and p
2
are non-basic, then it is not
only the p and d values that may make a dierence. The way p
2
features in the algebraic
denition of the top policy may mean that the values of n/a and in are taken account in
whether the top policy allows an action or not. This means that, if we are interested in
replacing p
2
by p
1
a form of updatethen (ii), above, would be the correct denition of
subsumption. Yet this is very strong: in the context of the given system, p
1
and p
2
should
give identical results to all possible requests.
What if we consider replacing p
2
by p
1
Opp
2
, where Op is a (possibly non-basic) composition
operation which is intended to be as close as possible to set union, and thus to mirror the
situation with basic p
1
and p
2
? The natural candidate here is probably . What denition
of policy subsumption for non-basic p
1
and p
2
would make it true that where p
2
D-subsumes
p
1
, then replacing p
2
by p
1
p
2
has no eect on what the top policy allows? The meanings
of the operators, as shown in Figure 5 and Table 3, make this clear. It is that, for all (s, e, s
)
in the transition system and all Sub:Act:Tar,
s e [= pdp(p
1
, Sub:Act:Tar)=X implies X
[X
k
X s e [= pdp(p
1
, Sub:Act:Tar)=X
]
Testing for policy subsumption is easy using iCCalc. In our rooms example, there are no
two basic policies between which a relation of subsumption holds.
Simulation Simulation is understood here to be the modelling of how the policy-governed
system behaves as a response to various changes in the environment; in this way simulation
does not involve nding out whether some specic policy-related, or norm-related property
holds. One sort of simulation that can be performed using iCCalc is to specify what is
known to be true in an initial state of the system, and then to include hypothetical requests
for actions and non-policy events that occur at various times after the initial state. We can
then see what follows about the state properties of the system under these assumptions,
or how the policy decisions turn out. iCCalc can show all runs consistent with the input
information. It is often instructive to view how a system will behave under a number of
predicted conditions and inputs; this often reveals properties of the policies that are in play
which are unexpectedfor which it did not occur to an analyst to query explicitly.
We can also include, under the current heading, more general system enquiries, such as
whether a given system state is possible if certain policies are in place. In our rooms
example, for instance, we may want to know whether the man and the woman can be in the
top-left room togetherwhether the policies allow this, rather than whether it is acceptable
that they be so. Queries like this are the bread-and-butter of iCCalc usage: in the current
instance the answer is of course that the state is possible, and the further information is
supplied that such a state is not permitted (red).
41
Modular analysis In the case where the dierent policy names are used to hold the policies in
sway over dierent components of a distributed system, it is of course possible to analyse
the behaviour of those components policies separately. In this context, with n components
of a distributed system governed by policies p
1
, . . . , p
n
, each policy p
i
would govern dierent
actions from a p
j
for i ,= j. For any given access request, the p
1
, . . . , p
n
can be dened in
such a way that either all of them evaluate to n/a, or precisely one of them evaluates to p or
d. The top policy can then be dened as the join p
1
p
n
of the various components
policies, and queries can be made of the behaviour of one of the p
i
in isolation, or of the
eect of decisions of the policy p
i
, and the behaviour of the i
th
component it controls. (In
the rooms example, we can view the man and the woman as being dierent components,
with the policy (p
m-restrict
> p
m
) as being the module of the total policy governing the mans
behaviour, and (p
f-stay
> p
f
) as the sub-policy governing the womans behaviour.)
Planning under policies Where an action description has policies, these will be taken account
in any planning query made, as the eects of a request are determined by the policies in
place. Where there are obligations on an agent, these also inuence the solutions to a
planning problem: as the agent will automaticallygiven our understanding of obligation
policies as ECA rulesrequest to try and full any obligation under which it nds itself.
Incorporating the constraints of existing policies into the solution of queries is performed
automatically by iCCalc, which builds only those transitions consistent with the policies i
attempting to solve a planning problem.
There is another way, however, in which we might study the interaction between policies
and plans. Suppose a successful plan has been generated to solve a planning problem in
the presence of given policies. (Perhaps, also, in certain kinds of accordance with norms,
as described above in Planning under norms.) Such a plan will be a sequence of actions
which, if performed, guarantees the state will move from that initially specied to one where
the planning goal is true. The policy engineer may then want to derive a set of policies from
the plan that can be added to the policies already in place, in order to ensure the plan is
followed. The new policies would be obligations: in certain circumstances, and in the right
order, request to perform the actions contained in the plan.
There are complications here which we do not probe further at this time. One concerns
the possibility of adapting the current set of authorization policies in order to allow dierent
obligation policies, implementing a dierent plan. Another concerns the way in which a group
of agents can, with policies governing the various members of the group, jointly achieve the
plans goal. These are subjects for further work.
Policies and Norms Finally, one family of queries concerns the relationship between norms and
policies. If both are in place, and the action description is therefore in np(+, we can ask
about the interaction between the various named policies and the normative status of the
system and its agents. Given the designation of a top policy, then clearly where some agent
s strand of a transition (s, e, s