1 cougaar frameset overview march 2, 2007 rich shapiro, john zinky

26
1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

Upload: garey-bruce

Post on 29-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

1

Cougaar FrameSet Overview

March 2, 2007

Rich Shapiro, John Zinky

Page 2: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

2

FrameSet Knowledge Representation

Host

Process

Object Class

• Java Objects are code generated– Frames and relationships defined using XML– Support multiple Java interfaces

• Cougaar Blackboard, • JESS Shadow Facts, • Java Beans• Applet viewer

• Slot inference (Real-time)– Type (is-a)– Containment (has-a)– Visitor Pattern (composed-of)– Aggregation (summary-of)

• Relationships are also Frames– Benefits from Frame inheritance

• Meta-data tags– Defined at compile-time

• Slots, frames, framesets

– Example Slot meta-data• Type, default-value, units, path, doc,

member, warn, immutable, notify-blackboard, notify-listeners, transient

Thing

Equip

Appl

Frame name value name value name value

Relationship parent-name value child-name value

Containment inheritance

Type inheritance

Page 3: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

3

Runtime (Frame Sets)

• Build indexes to resolve relationship• Queries and iterators over frames• Change Callbacks• Slot Inference (type, containment, visitor, aggregation)

– Recalculation regulated by meta data– Recalculation bundled to handle massive changes

• Hooks into infrastructure (Cougaar, Jess, Beans, GUI)– Persistence– Relays– Subscriptions

• Extended reflective interface on FrameSets, Frames, and Slots

FrameSetFrameSetSpec(XML)

FrameSetInstances(XML)

Indexes

Frames

BlackboardClients

JessClients

Read/Write

Create/Delete

BeansClients

Page 4: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

4

Real Time Inference

• Prototype (on frame)– Use Java Class system– No Dynamic default slot inheritance (future?)

• Containment (on frame)– Detects add, delete, change of slot value– Calculated by Property change

• Visitor (on slot)– Follows a path of relationships to a slot– Update Plugin detects changes to relationships and slots

along path

• Aggregation (on slot)– Follows relationships to children– Update Plugin detects changes slots and add/delete of

relationships– Aggregate calculated by user-defined Java function.

Page 5: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

5

Framesets Code Generator

Cougaar Black BoardPrototypeSpec.xml

PrototypeSpec.xml

CodeGen

InstanceSpec.xml

InstanceSpec.xml

PrototypeSpec.dtdPrototype

Spec.uml

Jess RuleEngine

TableGUI

OpenMapGUI

AppletGUI

PrototypeJava Classes

Java AppletStructs

FrameSetLoader

RDF toFrameSet

ArgoUml

Inter-agentCoordination

JessDefClass

MetricsService

Page 6: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

6

Cougaar Plugins Add/Modify/Delete Frames

Blackboard

SASSIOptimizer

SASSIOptimizerOptimizer

FrameSet Situation Policies

StatusSensor

OptimizerWrapper

GUIEngine

SituationInference

Rules

JessEngine

ControlActuator

Managed System

GUIDisplay

Page 7: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

7

Frames Displayed via Swing GUI

• Table View• X-Y Graphs• Pie Chart• GIS Map

Page 8: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

8

Blackboard Browser

Browser Based Java Applet

• Code Generator creates light-weight projections of Frames– Struct objects are loaded into client-side java program running in a user’s

browser– Struct objects are kept in sync with server-side FrameSet– The applet-runtime libraries are purged of dependencies on other jars.

• Code Generator could use the same architecture to support AJAX – (e.g. Goggle map)

FrameSetIndexes

Frames

PrototypeSpec.xml

PrototypeSpec.xml

CodeGen

Applet

StructUpdatePlugin

Display CodeFilterview

Changerecords HTTP

Page 9: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

9

JESS Rule Engine Processes Frames

Partitioned Blackboard

LHS

Patterns

Real-Time Knowledge Feeds

RHS

TriggerAssertRetract

Domain Processing

Domain RoutinesDomain ObjectsCode Libraries

Agent Domain Processing

Coordination withExternal Systems

Coordination withPhysical Environment

Coordination withPeer Agents

Blackboard Partitions managed by Coordination Artifacts

AgentsConcentrateon domain processing

Procedural codeJess Rule code

Page 10: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

10

FrameSet Definitions Displayed as UML

• FrameSet code generator outputs a subset of the UML exchange file

• ArgoUML can input and display the FrameSet definition graphically

• Useful for debugging and maybe documentation.

Page 11: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

11

FrameSet Servlet can inspect Frames

• Cougaar blackboard holds all the frames.

• Queries can be based on frame kind and slot values

• Frames slot values can be modified.

• Metric values <0.0,0.8> have both a value and a confidence.

Page 12: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

12

Relationships are also frames

• Relationships can change dynamically.

• Slot inheritance is recalculated, when relationships change.

• One changing in a relationship can change multiple slot values (through inheritance)

• Relationship frames are easy to transmit,

Page 13: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

13

Demo Monitors the Cougaar Society Itself

• A model of the Cougaar society is created in a FrameSet.

• The status values are updated in realtime using the Cougaar Metrics service

• Frame Debug GUI shows view of society model.

•TopologyDemo Agents:

•Monitor agent containing a FrameSet on its Cougaar blackboard

•Source1 and Sink1 agents ping each other as fast as they can

•NODE1 and NODE2 are control agents for Java process

•NameServer agent supplies naming for the society

Page 14: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

14

FrameSet Debug GUI can Inspect Frames

• Brown slots are inherited from the container. • White slots are inherited from the frame’s prototype

(IsA relationship)• Containment hierarchy is on the left column• Type hierarchy is in the middle column

Page 15: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

15

FrameSet GUI can Inspect Prototypes

• Yellow Slot show the slots defined by this prototype.

• Default values are defined, which can be over written by the prototype’s children

Page 16: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

16

Focus on Knowledge Sharing Among Agents

• Extensions to Cougaar Agent Infrastructure– Frame Sets to store knowledge– Coordination Artifacts to transfer knowledge– Forward-Chaining Rules detect patterns in knowledge

• Benefits– Exploits meta-data to help:

• Generate efficient Java Classes• Change notification integrated into Blackboard, Jess, Java Beans, • QoS-adaptive Transfer and Translation• Run time debugging via servlet and GUIs

– Separation of Agent Domain processing from Coordination– Range of tradeoffs for Access Time vs Storage Space

KnowledgeRep A

KnowledgeRep B

TrackingTranslation

Transfer“Model” “View”

Page 17: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

17

QoS-Adaptive Translation Changes the Translation Mechanics to Match the Situation

HostProcess

ObjectMethodMethod

Class

Method

Method

capacity

Latency= Load / CapacityLatency= Load / Capacity

Load

Object

Latency

QoS-Adaptive Translation Deltas

Change Reconstruction

• Translation Should take into account– Structure of starting and ending data

structures– Probability and frequency that

structures will change– The constraints of the transfer path

Change Detection

Transfer Constraints

Page 18: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

18

Example: Not One Transfer Algorithm

• Where should the division be done?– What if, Load is fixed and Capacity changes– What if, the Load changes and Capacity is fixed– What if, Capacity is really multiple parameters with

different change rates– What if, network connection slow– What if, destination or source computer is slow

Latency= Load / CapacityLatency= Load / Capacity

Page 19: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

19

Frame: F1 P Relationship:

Frame F1 P Relationship: F1

Frame F1

Relationships Vs Slot Value

• Relationships are bi-directional• Binding attribute, name, id, ref• Relationship binding cache is stored in the FrameSet

not the Frame

Frame F2 C Relationship:

Frame F2 C Relationship:F2

Frame F2

Join

Relationship: R1 Parent: F2 Child: F1

Pointers

Page 20: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

20

Slot Domain Meta Data

• Default Value• Units• Type• Doc• Future

– Value constraints– Formulas (like aggregation, but with multiple

dependant slots, value relative) Like QuO RSS

Page 21: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

21

Slot Systemic Metadata

• Immutable• Member• Warn• notify-blackboard • notify-listeners • inheritable-through

– all – prototype-only

• transient

Page 22: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

22

FrameSet Indexing

• Frame ID – Hash table

• Relationship– Frames relationships– Parent and Child frames

Page 23: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

23

Example: Frame Specification

<prototype name="processingLayerThing" prototype="staticThing"> <slot name="layer" type="String" default-value="Processing” immutable“true”/></prototype>

<prototype name="location" prototype="geoLayerThing"> <slot name="lat" type="float" default-value="0.0f"/> <slot name="lon" type="float" default-value="0.0f"/></prototype>

<prototype name="process" prototype="processingLayerThing” container="location"><slot name="maxQueue" type="float" default-value="200.0f"/></prototype>

<prototype name="link" prototype="processingLayerThing"> <slot name="maxBandwidth" type="float" default-value="10.0f"/> <slot name="srcLat" type="Float" path="linkSrcLat"/> <slot name="color" type="java.awt.Color" default-value="java.awt.Color.BLUE" inheritable-through="prototype-only"> <aggregate-by relation="processCapacityRepresents" aggregator="ColorFromStatus" related-slot="status"/> </slot></prototype>

<relation-prototype name="linkSource" prototype="relationship" parent-prototype="process" child-prototype="link"></relation-prototype>

<relation-prototype name="processAtLocation" prototype="contains" parent-prototype="location" child-prototype="process"></relation-prototype>

<path name="linkSrcLat"> <fork relation="linkSource" role="parent"/> <fork relation="processAtLocation" role="parent"/> <slot-reference name="lat"/></path>

ContainmentInheritance

ContainmentInheritance

TypeInheritance

TypeInheritance

VisitorAccessor

VisitorAccessor

AggregatorAccessor

AggregatorAccessor

RelationshipRelationship

VisitorSpecification

VisitorSpecification

Page 24: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

24

Example: XML Instance Specification

<location id=”greenwich" lat="50.0f" lon="0.5f"/><location id=”paris" lat=”48.9f" lon=”2.3f"/><process id="sensor1" status=“up”/><process id=”analyzer1" status=“down”/><link name=”analyzer1-sensor1"/>

<processAtLocation parentValue=”greenwich" childValue="sensor1"/><processAtLocation parentValue=”paris" childValue=”analyzer1"/><linkSource parentValue=”analyser1" childValue=”analyzer1-sensor1"/><linkDestination parentValue=”sensor1" childValue=”analyzer1-sensor1"/>

Processanalyzer1

Processsensor1

Locationgreenwich

Locationparis

Linkanalyzer1-sensor1

Process At Location Process At Location

LinkSource

LinkDestination

Page 25: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

25

Realtime Knowledge SharingAutomation Architecture

System Resource Constraints

FrameSetIndexes

Instances

SensorInstances/ Changes

CoordinationArtifact

ApplicationChange

Notification

FrameSetIndexes

Instances

KnowledgeRepresentation

Schema

CodeGenerator

TranslationRules

KnowledgeRepresentation

Schema

CodeGenerator

DesignData Structure

Translation

SpecifySemantic

Translation

SemanticMapping

SensorData Structure

Mapping

ApplicationData Structure

Mapping

ApplicationOntology

SensorOntology

ExpectedUsage Patterns

DesignKnowledge Rep

DesignKnowledge Rep

ExpectedUsage Patterns

Page 26: 1 Cougaar FrameSet Overview March 2, 2007 Rich Shapiro, John Zinky

26

When To Use FrameSets

• Real time models of physical world– Containment first class– Change notification

• Several kinds (but not yet “adaptable”)

• Inference Engine (Jess)– Expand raw input– Translation between Knowledge Representations

• Built in Views– GUIs (applets, openmap)– External Tools (Beans, Jess)

• Data Structures for OWL Graphs (FUTURE)– Input Translation– Output Translation