1、2018/7/19,史忠植 AOSE,1,2004年全国软件与应用学术会议,面向主体的软件工程史忠植 S中国科学院计算技术研究所,2018/7/19,史忠植 AOSE,2,内容提要,引言面向主体程序设计(AOP)面向主体软件工程(AOSE) 多主体系统MAGE自主语义网格结束语,2018/7/19,史忠植 AOSE,3,在20世纪60年代中期Simula-67的设计者Dahl和Nygaard 提出对象(object)的概念从20世纪70年代起Xerox公司的Palo Alto 研究中心经过对Smalltak7274几经连续不断地研究改革后,在1980年推出了Smalltalk-80。它在系统设
2、计中强调对象概念的统一,引入对象、对象类、方法、实例等概念及术语,采用了动态联编及单继承机制,体现了面向对象方法的许多重要概念,对面向对象方法学的形成和发展起了重大作用,面向对象方法,2018/7/19,史忠植 AOSE,4,Coad和Yourdon给出了一个定义: 面向对象=对象+类+继承+通信,面向对象方法,2018/7/19,史忠植 AOSE,5,面向对象方法,面向对象的程序设计方法(Object Oriented Programming)简称为OOP,它的基本元素是类(Class)和对象(Object)。,使用对象模拟自然的或抽象的实体,对用户掩盖了实现的复杂性(封装),并且能使程序员
3、付出尽可能小的代价,获得尽可能大收益(继承),提高软件的开发效率。,2018/7/19,史忠植 AOSE,6,OMG CORBA 的历史,1991 CORBA version 1.1 1994 CORBA 2.0 1994 - 1996 CORBAservices : 基本服务1995 - CORBAfacilities : 应用级1999 CORBA 3 Internet 集成,2018/7/19,史忠植 AOSE,7,CORBA系统结构,2018/7/19,史忠植 AOSE,8,CORBA和WS技术目标,CORBA实现异构环境下的分布系统集成与互操作,WebService一种新型的应用间(
4、Application 2 Application)的通讯平台和系统集成平台,2018/7/19,史忠植 AOSE,9,面向主体程序设计,1993年Shoham提出 agent oriented programming (AOP)概念AOP 是一种关于计算群体的新的程序设计风范,2018/7/19,史忠植 AOSE,10,主体基本结构,环境,主体,感知,作用,黑箱软件主体,2018/7/19,史忠植 AOSE,11,智能主体的工作过程,环境,交互,信息融合,信息处理,作用,交互,感知,作用,2018/7/19,史忠植 AOSE,12,反应主体,环境,当前世界,传感器,动 作,效应器,条件-动作
5、规则,主体,2018/7/19,史忠植 AOSE,13,认知主体,环境,信息融合,传感器,动 作,效应器,主体,规 划,知识库,目标,内部状态,2018/7/19,史忠植 AOSE,14,BDI结构,知识,信念,规划,意 图,目 标,愿 望,2018/7/19,史忠植 AOSE,15,主体社会协调,agent,agent,data,control,communication,coordination,infrastructure,2018/7/19,史忠植 AOSE,16,AGENT0,Shoham 建议 AOP系统由3部分构成:逻辑解释的可编程语言 agentification 处理,201
6、8/7/19,史忠植 AOSE,17,AGENT0,AGENT0 用 LISP 实现AGENT0中主体有 4 部分构成:能力初始信念初始承诺承诺规则承诺规则是关键部分,2018/7/19,史忠植 AOSE,18,AGENT0,每个承诺规则包括消息条件心智条件动作主体周期(agent cycle)主体接收的消息中匹配消息条件心智条件匹配主体信念如格规则点火, 则I主体承诺动作,2018/7/19,史忠植 AOSE,19,AGENT0,2018/7/19,史忠植 AOSE,20,AGENT0,承诺规则:COMMIT( agent, REQUEST, DO(time, action), ; msg
7、condition( B,now, Friend agent ANDCAN(self, action) ANDNOT time, CMT(self, anyaction), ; mental conditionself,DO(time, action),2018/7/19,史忠植 AOSE,21,面向主体的软件工程,2018/7/19,史忠植 AOSE,22,面向主体的软件工程,复杂系统面向主体分解面向主体分析和设计AOSE形式化方法,2018/7/19,史忠植 AOSE,23,面向主体分析和设计,基于主体发展The Australian AI Institute (AAII) methodo
8、logyThe Gaia methodologyAgent UML基于知识工程Cassiopeia,2018/7/19,史忠植 AOSE,24,Gaia 概念,抽象概念 分析时系统概念化RolesPermissionsResponsibilitiesProtocolsActivities具体概念 用在设计和实现阶段Agent Types ServicesAcquaintances,2018/7/19,史忠植 AOSE,25,Gaia 抽象概念,系统看成彼此交互的角色的集合 例如: roles in the School of Engineering Head of the school, de
9、partments leaders, research director, etc. The relationship between roles and individuals many-to-many每个角色有4种属性 Responsibilities PermissionsActivitiesProtocols,2018/7/19,史忠植 AOSE,26,Gaia 角色,责任 define the functionality and key attributesTwo types liveness properties “something good happens” the agent
10、 should bring the system into that statesafety properties “nothing bad happens” the agent maintains a particular state允许The rights associated with a roleInformation resources available to the role in order to realize its responsibilities,2018/7/19,史忠植 AOSE,27,Gaia 角色,活动Actions that may be carried ou
11、t by the agent without interaction with other agents also called agents private actions协议 Define the ways each role can interact with other roles,2018/7/19,史忠植 AOSE,28,Agent UML,Modified UML notation for modeling agent systems2 UML extensions Support for concurrent interactions thus enabling UML to
12、model agent protocolsExtend the notion of a role to allow modeling of agents that play many roles,2018/7/19,史忠植 AOSE,29,Cassiopeia,Cassiopeia 采用自底向上, Gaia and AAII 自顶向下Cassiopeia Brooks 行为模型,Gaia and AAII 是 BDI 模型Cassiopeia 是从执行任务底行为开始, Gaia and AAII 从角色开始,2018/7/19,史忠植 AOSE,30,AOSE形式化方法,AO 系统规范说明 A
13、O 系统实现RefinementDirect execution of agent specificationsCompiling agent specifications形式验证,2018/7/19,史忠植 AOSE,31,形式化规范方法,形式定义主体系统需求主体系统是一个意图系统,2018/7/19,史忠植 AOSE,32,形式化规范方法,信念(Beliefs) the information an agent has about the environment 目标(Goals) an agent tries to achieve动作(Actions) an agent performs
14、 and their effects on the environment准备交互 how agents interact with each other and with the environment,2018/7/19,史忠植 AOSE,33,形式化规范方法,逻辑 时序模态逻辑 2 种模型:Coehn-Levesque 意图理论 Two primitive attributes beliefs and goalsSecondary attribute intentionRao-Georgeff BDI 模型 Three primitive attributes beliefs, goal
15、s and intentions,2018/7/19,史忠植 AOSE,34,面向主体软件风范,情景Situated sense the environment and perform actions that change the environment自动Autonomous have control over their own actions and internal statescan act without direct intervention from humans灵活Flexibleresponsive to changes in environment, goal-orie
16、nted, opportunistic, take initiatives群体Socialinteract with other artificial agents and humans to complete their tasks and help others,2018/7/19,史忠植 AOSE,35,Multiagent Environment MAGE,Requirement Analysis,System Design,System Development,Behaviour Library,Agent Library,Agent Society,System Deploymen
17、t,AUMP,VAStudio,MAGE Running Support,2018/7/19,史忠植 AOSE,36,AUML,ModelElement,Classifier,Feature,StructuralFeature,BehavioralFeature,Attribute,Operation,Method,Class,Relationship,Generalization,Association,AssociationEnd,AgentClass,Organizational Relationship,Expand Core Package,Goal,2018/7/19,史忠植 AO
18、SE,37,AUMP,Step 1,Step 2,Step 3,Step 4,2018/7/19,史忠植 AOSE,38,AUMP,2018/7/19,史忠植 AOSE,39,AUMP-ontology,2018/7/19,史忠植 AOSE,40,AUMP-organization,2018/7/19,史忠植 AOSE,41,AUMP-Deployment,2018/7/19,史忠植 AOSE,42,FIPA Auction,inform-start-of-auction,X,X,X,cfp-1,not-understand,propose,reject-proposal,accept-pro
19、posal,inform-2,request,X,cfp-2,Initiator,Participant,X,X,2018/7/19,史忠植 AOSE,43,VAStudio Architecture,Agent Society,Agents,Behaviours,Editor,Agent Library,Behaviour Library,2018/7/19,史忠植 AOSE,44,VAStudio,2018/7/19,史忠植 AOSE,45,Screenshot of VAStudio,2018/7/19,史忠植 AOSE,46,Run-Time Platform,2018/7/19,史忠
20、植 AOSE,47,Agent Architecture,Agent kernel,Sensor,FunctionModuleInterface,Resource Database,Engine,Communicator,Scheduling,Function Component,Plug-INs,Reasoning,Negotiation,coOperation,others,Plug-inManager,TaskDatabase,2018/7/19,史忠植 AOSE,48,Agent Life Cycle,Destroy,Quit,Create,Dead,Unknown,2018/7/19
21、,史忠植 AOSE,49,ACL constructing,2018/7/19,史忠植 AOSE,50,AgentCities,2018/7/19,史忠植 AOSE,51,MAGE 比较,2018/7/19,史忠植 AOSE,52,国安会决策者Agent,模型体系结构,完全版,2018/7/19,史忠植 AOSE,53,分布式供电DSS,2018/7/19,史忠植 AOSE,54,Intercultural Collaboration Experiment,Chinese Academy of Science,Kyoto U/Wakayama U,User Agent,User Agent,A
22、MS,DF,Agent Platform,MachineTranslation,MorphologicalAnalysis,Collaboration Platform,RDFDB,UserManagement,SynchronousCollaborationTool,MTS,P2P,Server,Client,Client,AsynchronousCollaborationTool,SynchronousCollaborationTool,AsynchronousCollaborationTool,1,2,3,2018/7/19,史忠植 AOSE,55,Intercultural Colla
23、boration Experiment,Other-initiated RepairUsers tried to understand the original meaning of a translated message by estimation and mutual confirmation when its translation quality is low.,2018/7/19,史忠植 AOSE,56,973 : 语义网格,2018/7/19,史忠植 AOSE,57,The Semantic Web,OntologyLanguages,Knowledge Representati
24、on,XML,Namespaces,URI,Unicode,Rules,Proof,Trust,RDF,RDF Schema,OWL,2018/7/19,史忠植 AOSE,58,动态描述逻辑DDL,Concept name:C1, C2, ;Role name:R1, R2, ;Individual constant:a, b, c, ;Individual variable:x, y, z, ;Concept operation:, , , , ;Axiom operation:, , ;Action:A1, A2, ;Action constraction:;(composition),
25、(alternation),* (repeat),?(test);Action variable:, ;Axiom variable:, , , ;State variable:u, v, w, ;,2018/7/19,史忠植 AOSE,59,Jena,Store a data of RDF and represent RDF graphs and write in N-Triples formatLoad OWL in Java using JenaNavigate an RDF graph within Jena using RDQL,Jena Architecture,RDQL Gram
26、mar,2018/7/19,史忠植 AOSE,60,服务管理,Dynamic Services Matchmaking Services Classification and Query Services Composition based on Process Ontology and Workflow Technology Services Cooperation based on Joint Intention Theory and Shared Plan Theory Services Monitoring,2018/7/19,史忠植 AOSE,61,动态服务匹配, Service d
27、escription language Adapt to multilingual environment Utilize the frame representation Introduce ontology and logic technology Services matchmaking algorithm Approximate matchmaking Exact matchmaking Plug-in matchmaking,2018/7/19,史忠植 AOSE,62,资源管理,(Multi-lingual) Information Space,Knowledge Space,Sem
28、antic link,Interface agent,2018/7/19,史忠植 AOSE,63,自主计算,Self-management computing systems with adaptation Voluntary Evolution,2018/7/19,史忠植 AOSE,64,自主计算,2018/7/19,史忠植 AOSE,65,自主计算,Output,Service,Infrastructure,Sensor,Modeling,System Model,Control Signal,Control,2018/7/19,史忠植 AOSE,66,自主计算,进化计算增强学习范例学习情感计算,2018/7/19,史忠植 AOSE,67,自主语义网格,共享资源 互操作自适应,2018/7/19,史忠植 AOSE,68,结束语,OOP vs AOP SE vs AOSEMAGE自主语义网格,2018/7/19,史忠植 AOSE,69,欢迎参加,智能信息处理国际会议 (IIP2004)时间: 2004年10月20-23日地点: 北京金码大厦A座中国农 大国际会议中心.,2018/7/19,史忠植 AOSE,70,联系,http:/ AOSE,71,THANK YOU!,QUESTIONS!,