ontologies reasoning components agents simulations model-driven engineering of intelligent agents...
TRANSCRIPT
OntologiesReasoningComponentsAgentsSimulations
Model-Driven Engineering Model-Driven Engineering of Intelligent Agentsof Intelligent Agents
Jacques Robin
OutlineOutline
Model-driven engineering Model-driven software components Model-driven components for intelligent agents The ORCAS project: automated reasoning components The IATE project: agent environment product line
Model-Driven EngineeringModel-Driven Engineering
AbstractionScale
ExecutabilityScale
UML + NL Requirements
UML Model
SourceCode
VirtualMachine
Code
BinaryCode
Current Standard Practice:Object-Oriented Development
Model-Driven EngineeringModel-Driven Engineering
AbstractionScale
ExecutabilityScale
VirtualMachine
Code
BinaryCode
UML/OCLRequirements
UML/OCL Specification
PIM
UML/OCL Realization
PIM
ProfiledUML/OCL
Realization PSM
SourceCode
Today’s MDD:Extreme Modeling
Model-Driven EngineeringModel-Driven Engineering
AbstractionScale
ExecutabilityScale
VirtualMachine
Code
BinaryCode
UML/OCLRequirements
UML/OCL Specification
PIM
SourceCode
ProfiledUML/OCL
Realization PSM
UML/OCL Realization
PIM
ModelTranslation
Patterns
ModelRefinement
Patterns
Tomorrow’s MDD:UML Programming
Model-Driven Software Components: Model-Driven Software Components: the KobrA methodthe KobrA method
Comprehensive, prescriptive methodology Coherently integrates most software reuse concepts
+ Aspect-Oriented Development+ Built-in Component Contract Test Generator
Model-Driven Software Components: Model-Driven Software Components: the KobrA methodthe KobrA method
Full Life-CycleComponents
Intra and inter-diagram consistency and completeness rules
Recursive decomposition of components in sub-components
Realization models fully refined, code generation through pure translation
IATE
ORCAS
Agent 1 Component
Component-BasedComponent-BasedMulti-Agent Simulation EngineeringMulti-Agent Simulation Engineering
EnvironmentSimulator
Component
Agent N Component
DomainKnowledge
Base
Inference Engine Component Inference Engine Component
DomainKnowledge
Base
InferenceEngine
ComponentDomain
KnowledgeBase
InferenceEngine
Component
DomainIndependentKnowledge
Base
InferenceEngine
Component
DomainIndependentKnowledge
Base
Perceptions, Actions
Perceptions, Actions
SimulationIndependent
DomainModel
EnvironmentCharacteristics’
Model
KnowledgeBase
Generator
ORCAS motivation: why automated ORCAS motivation: why automated reasoning still so rarely used today?reasoning still so rarely used today?
Too costly to develop AR services from scratch for specific applications: AR services are large, conceptually very complex software They require hard to find software engineers with strong AI
background
Too costly to integrate available AR software in larger systems: Rarely based on mainstream IT standards (e.g., exotic Prolog
extensions) Rarely comes with adequate middleware, (e.g., only API to C) Single software rarely provides all AR services required by
application
Too costly to customize or extend available AR software for specific applications: Never comes with models or test suite (at best with source code) Often comes without reasoning explanation GUI Never integrated with standard CASE tool or IDE
ChallengingTestbed
ORCAS: long-term goal ORCAS: long-term goal and methodologyand methodology
Automated Reasoning:Automated Reasoning:• Adaptive Constraint Handling Rules
• Transaction Frame Logic
Reusable Reasoning ComponentReusable Reasoning Componentss::• w/ Full Artw/ Full Artiifact Suite: UML Requirement, Analysis and Design Models,fact Suite: UML Requirement, Analysis and Design Models, AspectJ Code, AspectJ Code, Test Suite Test Suite
• For Deduction, Abduction, Induction, Belief Revision, Constraint Solving, Optimization
• In Logical, Probabilistic, Decision-Theoretic Settings
• w/ Object-Oriented, First-Order Rewrite Rules Automatically Generated from UML modelsAutomatically Generated from UML models
UsabilityExtensibility
Software Engineering:Software Engineering:• Model-Driven Development
• Component-Based Development
• Aspect-Oriented Development
• Built-in Contract Testing
KobrA MethodKobrA Method:• Customized for Automated Reasoning• Upgraded to Latest OMG Standards
KnowledgeLevel
ImplementationLevel
DeploymentLevel
ORCAS: 4-layer ORCAS: 4-layer model-driven developmentmodel-driven development
FormalizationLevel
CHORDBase
KobrAUML/OCL/QVT
Model
AspectJ/Javaor Aspect#/C#Source Code
.Jar or DLLComponent
AspectJ Weaver& Java Compiler
or Aspect# Weaver& C# Compiler
CHORD toAspectJ/Java
or Aspect#/C#Compiler
UML/OCL/QVT to CHORDCompiler
Applies to both: Domain-dependent application knowledge base development Domain-independent inference engine development
CHORD: MotivationCHORD: Motivation
ORCAS’s middle-tier knowledge representation formalism: Object-Oriented Rule-Based Constraint Programming
Why constraint programming? Showed to subsume most other reasoning tasks:
Deduction, Abduction [Abdennadher & Schutz], Belief Revision [Wolf], and Optimization [Dechter]
In Logical [Abdennadher & Schutz], Probabilistic [Angelopoulos] and Decision-Theoretic [Dechter] settings
Why rule-based? Rules easier to specify and revise than algorithms for non-programmers
domain experts Declarative semantics in formal logic allows model checking Declarativeness allows fast prototyping (i.e., agile development)
Why object-oriented? Easier compilation from object-oriented UML/OCL upper-tier Easier compilation to object-oriented Java, C# or C++ lower-tier Reuse through inheritance
Integrating two versatile formal Integrating two versatile formal knowledge representation languagesknowledge representation languages
CHRDConstraint Handling Rules w/ Disjunction
Subsumes:• Prolog, Deductive DB• Production Systems• Term Rewriting Systems• Concurrent Constraint Logic Programs• Truth-Maintenance Systems• Abductive Logic Programs• (Semantic Web) Description Logics
Available Implementations: Prolog, Java
Logic-Based Formal Semantics
Transaction Frame LogicSubsumes:
• Prolog, Deductive DB• Tabled Logic Programs• High-Order Logic Programs• Object-Oriented Logic Programs• Transactional, Relational DB• Object-Oriented, Object-Relational DB• Semi-Structured XML DB• Semantic Web RDF DB
Available Implementations:
• Prolog, Java, C++
Logic-Based Formal Semantics
CHORD = CHRD Rules + Frame Logic Objects = CHRD Rules + Frame Logic Objects
CHRDCHRD in a nutshellin a nutshell
Knowledge representation language for theorem proving integrating term rewriting, forward chaining and backtracking
Based on subset of first-order predicate logic Distinguishes between two classes of predicate symbols:
Locally defined predicates (in subject CHR component) Externally defined predicates (in server CHR components)
Extends CHR that was created for declarative programming of constraint solvers
CHRD program: logical conjunction of rewrite rules (clauses) Two types of rules:
Constraint simplification rules (logical equivalences, rewrite rules) Constraint propagation rules (logical implications, production rules)
CHRD: simplification rulesCHRD: simplification rules
head guard | body l10(…,U,…) … ln0
(…,V,…) e1(…,W,…) em(…,X,…) |(p1
1(…,Yi,…) … p1p(…, Yj,…)) … (pk
1(…,Yk,…) … pkq(…,Yl,
…)) Example:
min(X,Y,Z) int(Z) int(Y) int(Y) X Y | Z = X. Logical declarative semantics:
…,U,…,V,…,W,…X,… (e1(…,W,…) em(…,X,…)) (l10(…,U, …) … ln0
(…,V, …) ( …,Yi,…,Yj,… p1
1(…,Yi,…) … p1p(…, Yj,…))
… …,Yk,… Yj,… pk
1(…,Yk,…) … pkq(…,Yl,…))))
Operational semantics: If external solver component query returns true on guard
then substitutesubstitute constraints matching head in local constraint store with constraints in rule body modulo variable substitution
Otherwise try other rules
CHRD: propagation rulesCHRD: propagation rules
head guard | body l10(…,U,…) … ln0
(…,V,…) e1(…,W,…) em(…,X,…) |(p1
1(…,Yi,…) … p1p(…, Yj,…)) … (pk
1(…,Yk,…) … pkq(…,Yl,
…)) Example:
min(X,Y,Z) int(Z) int(Y) int(Y) | Z X Z X. Logical declarative semantics:
…,U,…,V,…,W,…X,… (e1(…,W,…) em(…,X,…)) (l10(…,U, …) … ln0
(…,V, …) ( …,Yi,…,Yj,… p1
1(…,Yi,…) … p1p(…, Yj,…))
… …,Yk,… Yj,… pk
1(…,Yk,…) … pkq(…,Yl,…))))
Operational semantics: If external solver component query returns true on guard
then addadd to local constraint store constraints in rule body modulo variable substitution needed to match rule head with constraints already in the store
Otherwise try other rules
Extends Prolog with object-oriented terms: Class definition (hierarchy + signature):
c1::c2[..., ai *=> ti ,..., mj(tj1,...,tjk) *=>> til ,...]. e.g.: person[name => string, children(person) *=>> person]. man::person[sex -> male].
Transaction Frame Logic: Transaction Frame Logic: object-oriented termsobject-oriented terms
• c1 subclass of c2
• ti type of attribute ai of class c1
• til return type of method mj of c1
• tj1,...,tjk parameter types of method mj of c1
• o object instance of class of c• vi value of attribute ai of o• vil return value of method mj of o wheninvoked with input parameter values vj1,...,vjk
FLOOM:Frame Logic
Object-OrientedMolecules Object creation:
o:c[..., ai -> vi ,..., mj(vj1,...,vjk) -> vil ,...]. e.g.: al:man[name -> “Al”, children(ann) -> dan].
Transaction Frame Logic: high-order Transaction Frame Logic: high-order OO syntax and update predicatesOO syntax and update predicates
Allows logical variable in any position: ?- person[name -> N, children(P1) *->> P2]. ?- Object:Class[Attibute -> john, Method(Parameter) *->> terry].
Allows path expressions, similar to OCL navigation expressions: ?- person.name = N, person.children(P1) = P2.
Extends Prolog w/ new, backtrackable update predicates: P:person[setAge(A)] :- btdelete{P.age}, btinsert{P[age -> A]}.
Aspect Java Component for OBNFL:
Object-Oriented
Bayesian Network Full Learning
ORCAS: component assembly ORCAS: component assembly as rule base compositionas rule base composition
CHRD(OO(FL))
Rule Base
Object-Oriented
Bayesian Network
Full Learning:
Structure &
ParametersAspect J CHRD
Reasoning Explanation GUI
Aspect Java Contract Test
Generator Companion
Component for OBNFL
Generic Java
CHRD Base
Compiler
Generic Java
CHRD Base
Verifier
CHORD(RLEI)
Rule Bases
CHORD(BNI)
Rule Bases
CHORD(BNPL)
Rule Bases
CHORD(BILP)
Rule Bases
CHORD(BNFL)
Rule Bases
ORCAS: partnershipsORCAS: partnerships
CT-Info CNPq Partners
Profa. Patrícia Tedesco, CIn-UFPE Prof. Luis Menezes, UPE Prof. Jones Albuquerque, UFRPE
Focus Application case studies to intelligent agent tutoring system
(intersection with IATE), and marine ecology simulation (Simulare project)
ORCAS: partnershipsORCAS: partnerships
CT-Info FINEP Partners
Profa. Patrícia Machado, Prof. Jorge Figuereido, Prof. Franklin Ramalho, DSC-UFCG
Prof. Luis Menezes, UPE Jynx Playware (soccer and business simulation game company) CESAR
Focus Generation of built-in contract testing components from functional
component Automated generation of Transaction Frame Logic programs from
UML and OCL models (as a preliminary step towards generation of CHORD programs)
Application case studies to simulation games
ORCAS: partnershipsORCAS: partnerships
CAPES/DAAD PROBRAL Partners:
Prof. Silvio Meira, CIn-UFPE Prof. Luis Menezes, UPE Prof. Thom Frühwirth and PhD. student Marc Meister, Ulm Universität Prof. Colin Atkinson and PhD. student Matthias Guthiel, Mannheim
Universität Dr. Armin Wolf, Fraunhofer Gesellschaft Institute FIRST, Berlin
Focus Design of CHORD (syntax and formal semantics) Upgrade of KobrA process to latest OMG standards (UML2, OCL2, MOF2) Extension of KobrA process to specify GUIs Adaptation and extension of KobrA process for ORCAS components CASE tool for KobrA with model checking facilities First adaptive implementation of CHRD engine (compiled to Aspect J) Application case study on cost-saving surgery scheduling and allocation in
large hospital
ORCAS: current status and next ORCAS: current status and next stepssteps
Direct collaborators: PhD. candidate Jairson Vitorino, CIn-UFPE Undergraduate research assistant Marcos Aurelio Silva, CIn-UFPE Prof. Luis Menezes, UPE
Current status: KobrA model of preliminary, non-adaptive CHRD engine version Aspect J / Java implementation of the model Reasoning trace implemented as aspect First implementation as compiler to Java Novel, more efficient operational semantics
Next steps: Improve reasoning trace GUI Switch from chronological backtracking to conflict-directed
backjumping for disjunctive rule and finite domain labeling search
IATE: GoalsIATE: Goals
Build an extensible, fully parametric, multi-agent environment that can serve as reusable kernel for: Multi-Agent System (MAS) and Artificial Intelligence (AI) tutoring
environments; MAS and AI controlled experiments environments; MAS and AI based team ball sport computer games.
The environment: Simulates a single base domain, a futuristic fusion team ball sport
(rollerslam) In all its possible variations in terms of: observability, determinism,
dynamicity, physics modeling granularity, agent communication, as well as the size and diversity of agent action, agent perception, object and location sets.
Evaluate and extend MDA PIM transformation techniques to automatically generate product line of such environment
Motivation: AI and MAS teachingMotivation: AI and MAS teaching
Observable environment
Deterministic environment
Continuous environment
Real-time environment
Cooperative environment
Relational environment
MAS EnvironmentMAS Environment
Ontological commitment
Epistemological commitment
Variable domains
Knowledge RepresentationKnowledge Representation
Reflex agent
Past environment model agent
Goal agent Utility agent
Learning agent
Future environment model agent
Internal Agent ArchitectureInternal Agent Architecture
Deduction Abduction
Constraint solving
InductionAnalogy
Reasoning ParadigmReasoning Paradigm
Belief revision Inheritance
Motivation: AI and MAS educationMotivation: AI and MAS education
Didactic value of single domain illustrative example problems in multiple versions at progressive sophistication levels
Most existing problems: Fixed characteristics relevant to illustrate only a few techniques
Examples:
Partially observablePartially observable DiscreteDeterministicSequentialMono-agentOntologically poorOntologically poor
Partially observablePartially observable
ContinousNon-deterministicReal-TimeMulti-agentOntologically poorOntologically poor
IATE Motivation: AI and MAS IATE Motivation: AI and MAS experiments and competitionsexperiments and competitions
Fully parametric environment ideal benchmark generator to: Compare architectures, reasoning paradigms and knowledge
representation languages Pin-point which environment characteristics requires switching
technique What are the scalability phase transitions
Current competitions: Planning: restricted to very narrow technique and problem sets RoboCup: comparing “Cadillacs vs. Dinosaurs”, everything all at
once, no general scientific insight
IATE current status and next stepsIATE current status and next steps
Direct collaborators: PhD. candidate Fábio Moura, CIn-UFPE New undergraduate research assistant
Current status: Preliminary versions of:
MAS environment MOF metamodel and UML Profile Simplest rollerslam simulation UML model (instance of metamodel)
Next steps: More complex rollerslam simulation UML models Environment characteristics’ UML models Simulation independent rollerslam UML model Transformation rules to generate:
Simplest and more complex rollerslam simulation models from simulation independent rollerslam models and environment characteristics’ model
Repeat iteration for soccer simulations