normative monitoring: semantics and implementation

29
Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions Normative Monitoring: Semantics and Implementation Sergio Alvarez-Napagao, Huib Aldewereld, Javier V´ azquez-Salceda and Frank Dignum COIN@MALLOW 2010 Lyon, France August 30, 2010 S.Alvarez-Napagao, H.Aldewereld, J.V´ azquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Upload: knowledge-engineering-and-machine-learning-group

Post on 20-Jan-2015

399 views

Category:

Technology


1 download

DESCRIPTION

http://ai-lab-webserver.aegean.gr/coin@mallow2010/COIN@MALLOW_pre-proceedings.pdf#page=9

TRANSCRIPT

Page 1: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Normative Monitoring:Semantics and Implementation

Sergio Alvarez-Napagao, Huib Aldewereld,Javier Vazquez-Salceda and Frank Dignum

COIN@MALLOW 2010Lyon, France

August 30, 2010

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 2: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Outline

1 Introduction

2 Related Work

3 Preliminary definitions

4 Semantics

5 Reduction

6 Implementation

7 Conclusions

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 3: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Motivation

Normative systems can help guide the behaviour ofinteracting agents

Monitoring is vital for the effectiveness of a normativesystem

Agents may enter and leave interaction contexts, sodynamic normative specifications are desirableMonitoring is a passive procedure based on the checkingof past events

Interpretation of institutional events from brute eventsIf decoupled from reasoning, can be used by different kindsof agents and third parties

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 4: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Requirements

Dynamic normative specifications

→ Run-time specificationloading

Interpretation of bothInstitutional facts

→ Counts-as rules

What ought to be done

→ Expressive normative language

Ability to reason about norms themselves

→ Norms as first-classentities

Efficiency with large sets of events

→ Rule-based engine

Reusable formalism, decoupled implementation

→ From norms to rules

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 5: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Requirements

Dynamic normative specifications → Run-time specificationloading

Interpretation of bothInstitutional facts → Counts-as rulesWhat ought to be done→ Expressive normative language

Ability to reason about norms themselves→ Norms as first-classentities

Efficiency with large sets of events→ Rule-based engine

Reusable formalism, decoupled implementation→ From norms to rules

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 6: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Related work

Normative / contract monitoring is not a new topicSome approaches (e.g. [Kyas et al. 08]) are based onverification techniques, checking events against traces

For the monitoring of past events such complexity is notneeded

The most common approach has been rule-based

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 7: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Related work

Some approaches for electronic SLA / contracts are quitemature (e.g. [Paschke et al. 05][Strano et al. 08])

However, the expressivity of the norm language used islimited

Other approaches (e.g. [Governatori 05][Hubner et al. 09])use rules to assert deontic expressions

Parts of the norm lifecycle implementation are out of thebase rule engineNorm instances are not easily traceable

[Garcıa-Camino et al. 05] defines a full translation schemeinto Jess

But it uses language-specific constructsNo support for constitutive rules

[Tinnemeier et al. 09] defines operational semantics with acombination of counts-as rules and sanctions

Regulative norms are not supported

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 8: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Our proposal

Use of norm language with support for conditional deonticexpressionsSupport for counts-as rulesReduction to semantics of a general rule-based languageProviding a direct syntactic translation from norms to rulesDecouple monitoring process from reasoning

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 9: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Example scenario

1 A person driving on a street is not allowed to break a trafficconvention.

2 In case (1) is violated, the driver must pay a fine.3 In a city, to exceed 50kmh counts as breaking a traffic

convention.

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 10: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Notation

O is a set of predicates and constants,LO is a predicate based propositional logic language withthe connectives {¬,∧,∨},wff (LO) is the set of all possible well-formed formulas ofLO,Θ = {x1 ← t1, x2 ← t2, ..., xi ← ti} is a substitution instanceof the terms ti for the variables ti ,R ⊂ O is the set of roles, and P is the set of participants,each one enacting at least one role in R,s ⊆ O is a certain state of the world,ni = 〈n, θ〉 is a norm instance, andn ; n′ means that n′ is a violation handling norm of n:fA ∧ ¬fM ∧ ¬fD ≡ f ′A.

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 11: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Definition of counts-as

DefinitionA counts-as rule is a tuple c = 〈γ1, γ2, s〉, whereγ1, γ2 ∈ wff (LO), and s ⊆ O.

ExampleIn a city, to exceed 50kmh counts as breaking a trafficconvention:C :={〈exceeds(D,50), traffic violation(D), is in city(D)〉}

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 12: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Definition of norm

DefinitionA norm n is a tuple n = 〈fA, fM , fδ, fD, fw ,w〉, where

fA, fM , fδ, fD, fw ∈ wff (LO), w ∈ R,fA, fM , fD respectively represent the activation,maintenance, and deactivation conditions of the norm,fδ, fw are the explicit representation of the deadline andtarget of the norm, andw is the subject of the norm.

This definition does not explicitly include deontic operators, but:

fA → [Ow (Ew fw ≤ ¬fM) U fD]

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 13: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

DefinitionA norm n is a tuple n = 〈fA, fM , fδ, fD, fw ,w〉, where

fA, fM , fδ, fD, fw ∈ wff (LO), w ∈ R,fA, fM , fD respectively represent the activation,maintenance, and deactivation conditions of the norm,fδ, fw are the explicit representation of the deadline andtarget of the norm, andw is the subject of the norm.

ExampleA person driving on a street is not allowed to break a traffic convention:

n1 := 〈enacts(X ,Driver) ∧ is driving(X), fA¬traffic violation(X), fM

⊥, fδ¬is driving(X), fD

is driving(X) ∧ ¬traffic violation(X), fwDriver〉 w

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 14: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Definition of institution

DefinitionAn institution I is a tuple of norms, roles, participants, counts-asrules, and an ontology:

I = 〈N,R,P,C,O〉

ExampleN :={〈enacts(X ,Driver) ∧ is driving(X),¬traffic violation(X),⊥,¬is driving(X),is driving(X) ∧ ¬traffic violation(X),Driver〉,〈enacts(X ,Driver) ∧ is driving(X) ∧ traffic violation(X),>,paid fine(X),Driver〉}R :={Driver}, P :={Person1}C :={〈exceeds(D, 50), traffic violation(D), is in city(D)〉}O :={role, enacts, is driving, is in city,exceeds, traffic violation, is driving, paid fine,Person1, role(Driver), enacts(Person1,Driver)}

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 15: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Norm Lifecycle

DefinitionLet ni = 〈n,Θ〉 be a norm instance, where n = 〈fA, fM , fD,w〉,and a state of the world s with an expansion F (s). The lifecyclefor norm instance ni is defined by the following normative statepredicates:

activated(ni)⇔ ∃f ∈ F (s),Θ(fA) ≡ f

maintained(ni)⇔ ∃Θ′, ∃f ∈ F (s),Θ′(fM ) ≡ f ∧Θ′ ⊆ Θ

deactivated(ni)⇔ ∃Θ′,∃f ∈ F (s),Θ′(fD) ≡ f ∧Θ′ ⊆ Θ

instantiated(ni)⇔ ni ∈ IS

violated(ni)⇔ ni ∈ VS

fulfilled(ni)⇔ ni ∈ FS

where IS is the instantiation set, FS is the fulfillment set, andVS is the violation set, as defined above.

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 16: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Example of Norm Lifecycle

A person driving on a street is not allowed to break a trafficconvention:

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 17: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Normative Monitor

DefinitionA Normative Monitor MI for an institution I is a tupleMI = 〈I,S, IS,VS,FS〉.

DefinitionAn event e is a tuple e = 〈α,p〉, where α ∈ P, and p ∈ wff (LO).

DefinitionThe Labelled Transition System for a Normative Monitor MI isdefined by 〈Γ,E ,�〉.

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 18: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

DefinitionEvent processed:

ei = 〈α, p〉〈〈〈i, s, is, vs, fs〉, ei 〉, ei+1〉� 〈〈i, s ∪ {p}, is, vs, fs〉, ei+1〉

(1)

Counts-as rule activation:

∃Θ, ∃f ∈ F (s), ∃〈γ1, γ2, si 〉 ∈ C, si ⊆ s ∧ Θ(γ1) ≡ f ∧ Θ(γ2) /∈ s

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s ∪ {Θ(γ2)}, is, vs, fs〉, e〉(2)

Counts-as rule deactivation:

∃Θ, ∃f ∈ F (s), ∃〈γ1, γ2, si 〉 ∈ C, si 6⊆ s ∧ Θ(γ1) ≡ f ∧ Θ(γ2) ∈ s

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s − {Θ(γ2)}, is, vs, fs〉, e〉(3)

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 19: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

DefinitionNorm instantiation:

∃n = 〈fA, fM , fD ,w〉 ∈ N ∧ ¬∃n′ ∈ N, n′ ; n ∧ 〈n,Θ〉 /∈ is ∧ ∃Θ, ∃f ′ ∈ F (s), f ′ ≡ Θ(fA)

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, is ∪ {〈n,Θ〉}, vs, fs〉, e〉(4)

Norm instance violation:

∃n = 〈fA, fM , fD ,w〉 ∈ N ∧ 〈n,Θ′〉 ∈ is ∧ 〈n,Θ′〉 /∈ vs∧¬(∃Θ, ∃f ′ ∈ F (s), f ′ ≡ Θ(fM ) ∧ Θ ⊆ Θ′) ∧ NR =

⋃n;n′ 〈n′,Θ′〉

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, (is − {〈n, Theta′〉}) ∪ NR,

vs ∪ {〈n,Θ′〉}, fs〉, e〉

(5)

Norm instance fulfilled:

∃n = 〈fA, fM , fD ,w〉 ∈ N ∧ 〈n,Θ′〉 ∈ is ∧ ∃Θ, ∃f ′ ∈ F (s), f ′ ≡ Θ(fD) ∧ Θ ⊆ Θ′

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, is − {〈n,Θ′〉}, vs, fs ∪ 〈n,Θ′〉〉, e〉(6)

Norm instance violation repaired:

∃n, n′ ∈ N ∧ n ; n′ ∧ 〈n,Θ〉 ∈ vs ∧ 〈n′,Θ〉 ∈ fs

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, is, vs − {〈n,Θ〉}, fs〉, e〉(7)

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 20: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

DefinitionNorm instantiation:

∃n = 〈fA, fM , fD ,w〉 ∈ N ∧ ¬∃n′ ∈ N, n′ ; n ∧ ∃Θ, (activated(〈n,Θ〉) ∧ ¬instantiated(〈n,Θ〉))

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, is ∪ {〈n,Θ〉}, vs, fs〉, e〉(8)

Norm instance violation:

∃n = 〈fA, fM , fD ,w〉 ∈ N ∧ ∃Θ′, instantiated(〈n,Θ′〉) ∧ ¬violated(〈n,Θ′〉)∧¬maintained(〈n,Θ′〉) ∧ NR =

⋃n;n′ 〈n′,Θ′〉

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, (is − {〈n, Theta′〉}) ∪ NR,

vs ∪ {〈n,Θ′〉}, fs〉, e〉

(9)

Norm instance fulfilled:

∃n = 〈fA, fM , fD ,w〉 ∈ N ∧ instantiated(〈n,Θ′〉) ∧ fulfilled(n,Θ′)

〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, is − {〈n,Θ′〉}, vs, fs ∪ 〈n,Θ′〉〉, e〉(10)

Norm instance violation repaired:

∃n, n′ ∈ N ∧ n ; n′ ∧ ∃Θ, violated(〈n,Θ〉) ∧ fulfilled(〈n′,Θ〉)〈〈〈N,R, P,C,O〉, s, is, vs, fs〉, e〉� 〈〈〈N,R, P,C,O〉, s, is, vs − {〈n,Θ〉}, fs〉, e〉

(11)

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 21: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Semantics of production systems

DefinitionA production rule is denoted if p, c remove r add a, or

patterns, constraints ⇒ remove, add

DefinitionA general production system PS is defined asPS = 〈P,WM0,R〉, where:

P is a set of predicate symbols,WM is the working memory, a set of facts, andR is a set of production rules.

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 22: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Reduction to production systems

In order to represent our semantics to a production system, wehave to define the translation of P,WM0, and R for a certaininstitution I = 〈N,R,P,C,O〉. We assume all formulas are inDNF.

DefinitionThe set of predicates for our production system is:PI := O ∪ {activated ,maintained ,deactivated , violated ,instantiated , fulfilled ,event , repair ,holds,has clause, countsas}

WMI will include each formula found in every norm conditionand counts-as rule, as well as the relationship between eachformula and norms or counts-as rule.

Example

has clause(f , f0),has clause(f , f1),activation(n1, f )

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 23: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Reduction to production systems

The set of rules of the production system will include:

For each formula in a norm or counts-as rule, when theyhold true:

rh := has clause(f , f ′) ∧ holds(f ′,Θ)⇒ ∅, {holds(f ,Θ)}A translation of each rule from the Normative Monitortransition system:

rnf = deactivation(n, f ) ∧ instantiated(n,Θ) ∧subseteq(Θ′,Θ) ∧ holds(f ,Θ′),Θ′ ⊆ Θ⇒ {instantiated(n,Θ)}, {fulfilled(n,Θ)}

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 24: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Architecture

A prototype has been implemented as a DROOLS program.

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 25: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Rules in DROOLS

The base rules have been directly translated:

rule ” norm ins tance f u l f i l l m e n t ”when

Deac t i va t i on ( n : norm , f : formula )n i : I n s t a n t i a t e d ( norm == n , the ta : s u b s t i t u t i o n )SubsetEQ ( theta2 : subset , superset == the ta )Holds ( formula == f , s u b s t i t u t i o n == theta2 )

thenre t rac t ( n i ) ;inser t (new F u l f i l l e d ( n , the ta ) ) ;

end

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 26: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Rules in DROOLS

The norms and counts-as rules are parsed into rules atrun-time:

rule ” N1 ac t i va t i on 0 ”when

n : Norm( i d == ”N1 ” )A c t i v a t i o n ( norm == n , f : formula )Enacts (X : p0 , p1 == ” Dr i ve r ” )I s D r i v i n g ( p0 == X)

thenSet<Value> t he ta = new Set<Value > ( ) ;t he ta . add (new Value ( ” X” , X ) ) ;inser t (new Holds ( f . getClause ( 0 ) , the ta ) ) ;

end

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 27: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Rules in DROOLS

The parser fills the working memory:

ksession . i n s e r t ( norm1 ) ;ksession . i n s e r t ( norm2 ) ;ksession . i n s e r t (new Repair ( norm1 , norm2 ) ) ;ksession . i n s e r t (new A c t i v a t i o n ( norm1 , fn1a ) ) ;ksession . i n s e r t (new Maintenance ( norm1 , fn1m ) ) ;ksession . i n s e r t (new Deac t i va t i on ( norm1 , fn1d ) ) ;ksession . i n s e r t (new HasClause ( fn1a , fn1a1 ) ) ;ksession . i n s e r t (new HasClause ( fn1m , fn1m1 ) ) ;ksession . i n s e r t (new HasClause ( fn1d , fn1d1 ) ) ;/∗ . . . same f o r norm2 . . . ∗ /ksession . i n s e r t (new CountsAs ( c1g1 , c1g2 , c1s ) ) ;ksession . i n s e r t (new HasClause ( c1g1 , c1g11 ) ) ;ksession . i n s e r t (new HasClause ( c1g2 , c1g21 ) ) ;ksession . i n s e r t (new HasClause ( c1s , c1s1 ) ) ;

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 28: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Conclusions

Practical reasoner for detecting event-driven normativestates

Not intended to be a general purpose reasoner (e.g.planner)But can be used as a decoupled component

Supporting both regulative norms and constitutive rulesReduction to general production systems

Based on very abstract semantics of production systemsWide range of implementation-level rule languagesavailableAllowing for dynamic normative specifications

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation

Page 29: Normative Monitoring: Semantics and Implementation

Introduction Related Work Preliminary definitions Semantics Reduction Implementation Conclusions

Thank You!

S.Alvarez-Napagao, H.Aldewereld, J.Vazquez-Salceda, F.Dignum Normative Monitoring: Semantics and Implementation