The new Icobjs The new Icobjs Framework Framework Christian - - PowerPoint PPT Presentation
The new Icobjs The new Icobjs Framework Framework Christian - - PowerPoint PPT Presentation
The new Icobjs The new Icobjs Framework Framework Christian Brunette Christian Brunette INRIA/ENSMP - MIMOSA INRIA/ENSMP - MIMOSA Icobjs in the past Icobjs in the past Icobjs Icobjs u Means Means Iconic Objects Iconic Objects
Icobjs in the past Icobjs in the past
Icobjs Icobjs
u u Means
Means “ “Iconic Objects Iconic Objects” ”
u u Is a means to build at runtime entity
Is a means to build at runtime entity behaviors by graphical combination behaviors by graphical combination
u u Based on Junior, a Java API
Based on Junior, a Java API
Problems Problems
u u The data structure was totally sealed
The data structure was totally sealed (basically due to OO approach) (basically due to OO approach)
u u There were no clear API of an icobj
There were no clear API of an icobj
Behavior Operator 1 Operator 2 Operator 3 Atomic actions Object
Needs Needs
u u A clear API
A clear API
u u A means to modify icobj behaviors
A means to modify icobj behaviors after graphical construction after graphical construction
u u A means to save created simulations
A means to save created simulations and created icobjs and created icobjs
u u Some new instructions
Some new instructions
u u Some optimizations of the reactive
Some optimizations of the reactive engine engine
Outline Outline
u u The model
The model
u u The reactive engine
The reactive engine
u u The framework
The framework
u u Experimentations
Experimentations
Icobjs model Icobjs model
u u An icobj is a graphical reactive entity
An icobj is a graphical reactive entity composed of: composed of:
– – 2 identifiers: one for the entity and one 2 identifiers: one for the entity and one for its for its “ “container container” ” – – Graphical information: appearance and Graphical information: appearance and space taken in its space taken in its “ “container container” ” – – Behavior information: Cloneable and Behavior information: Cloneable and not-Cloneable not-Cloneable – – A A hash table hash table to store other fields to store other fields
Some advices Some advices
u u Initialize Icobj fields with their
Initialize Icobj fields with their behaviors behaviors
u u Access Icobj fields only through
Access Icobj fields only through atomic actions atomic actions
u u Do not keep states in atomic actions
Do not keep states in atomic actions Ë Ë use Icobj fields use Icobj fields
Workspace Workspace
“ “Workspaces are to icobjs what reactive Workspaces are to icobjs what reactive machines are to reactive instructions machines are to reactive instructions” ”
u u
Is the container of icobj Is the container of icobj
u u Executes icobj behaviors
Executes icobj behaviors
u u Manages the graphical part
Manages the graphical part
u u Deals with interactions with
Deals with interactions with “ “external external world world” ” (end-user, network (end-user, network… …) )
u u Events are local to the Workspace
Events are local to the Workspace
u u
Is an icobj Is an icobj
Migration Migration
u u Migration =
Migration = exiting + transferring + entering exiting + transferring + entering
u u Two kinds of migration:
Two kinds of migration:
– – Local = from a local workspace to Local = from a local workspace to another one (same thread) another one (same thread) – – Through the network (different threads) Through the network (different threads)
u u Need to wait the end of instant
Need to wait the end of instant
u u Take at least one instant
Take at least one instant
Outline Outline
u u The model
The model
u u The reactive engine
The reactive engine
u u The framework
The framework
u u Experimentations
Experimentations
Reactive engine Reactive engine
u u Junior instructions:
Junior instructions:
– – Nothing, Stop, Nothing, Stop, Seq Seq, Par, Loop, Repeat, If , Par, Loop, Repeat, If – – Await, Generate, Until, Control, Await, Generate, Until, Control, Freezable, Local, When Freezable, Local, When – – Link Link
u u Based on the Storm implementation
Based on the Storm implementation
- f Junior (J-F
- f Junior (J-F Susini
Susini) )
– – 4 status: SUSP, TERM, STOP, WAIT 4 status: SUSP, TERM, STOP, WAIT – – “ “zap precursor zap precursor” ” algorithm algorithm
Added Instructions Added Instructions
u u Run
Run: evaluates at runtime and : evaluates at runtime and executes a reactive program executes a reactive program ex: local migration ex: local migration
u u Scanner
Scanner: executes an atomic action : executes an atomic action associated to each occurrence of a associated to each occurrence of a valued event valued event ex: interactions with ex: interactions with “ “external world external world” ” (mouse, keyboard (mouse, keyboard… …) )
Added Instructions Added Instructions
u u Kill
Kill: weak preemption (SL) : weak preemption (SL)
– – More regular/modular than the Until More regular/modular than the Until instruction in Junior instruction in Junior – – Until still exists Until still exists… …
u u IcobjThread
IcobjThread: :
– – add new instructions dynamically to the add new instructions dynamically to the dedicated icobj dedicated icobj – – make the remove/migration of icobj make the remove/migration of icobj behaviors faster behaviors faster
Engine modification Engine modification
u u LONGWAIT
LONGWAIT: :
– – New instruction status New instruction status – – inter-instant waiting inter-instant waiting
u u SeqN/ParN
SeqN/ParN: :
– – one control of sequential/parallel
- ne control of sequential/parallel
instructions instructions – – to clean terminated instructions to clean terminated instructions
Event management Event management
u u An event is added to the environment when:
An event is added to the environment when:
– – It is generated (internally or externally) It is generated (internally or externally) – – An instruction waits for it An instruction waits for it
u u Keep events and values during 2 instants
Keep events and values during 2 instants after their generations after their generations
u u Need a mechanism to remove unused events
Need a mechanism to remove unused events from the environment from the environment
– – Faster event search Faster event search – – Less memory used Less memory used
Outline Outline
u u The model
The model
u u The reactive engine
The reactive engine
u u The frameworks
The frameworks
u u Experimentation
Experimentation
Behavior inspector Behavior inspector
u u To inspect the behaviors of icobj
To inspect the behaviors of icobj
u u No direct access to instructions
No direct access to instructions executed in the reactive engine executed in the reactive engine
u u No modification during a reaction
No modification during a reaction
u u Change behaviors after construction
Change behaviors after construction
– – Changing the behavior fields of icobj Changing the behavior fields of icobj – – Removing the executing behavior from Removing the executing behavior from the reactive engine the reactive engine – – Loading the new behavior Loading the new behavior
Introspection Introspection
u u Allow to modify values of icobjs fields
Allow to modify values of icobjs fields at runtime at runtime
u u Fields are only changed between two
Fields are only changed between two reactions reactions
u u User must implements on each icobjs
User must implements on each icobjs Field class: Field class:
Paremeter Paremeter[] [] getParemeter(Icobj getParemeter(Icobj self) self) Serializable Serializable getValue(String getValue(String fieldName fieldName) ) void void setValue(String setValue(String fieldName fieldName, , Serializable Serializable value) value)
Load/Save Load/Save
u u Load/save
Load/save = = migration migration
u u Saving =
Saving = exiting + serialization in a file exiting + serialization in a file
u u Loading =
Loading = deserialization + entering deserialization + entering
u u These operations are controlled by
These operations are controlled by the Workspace the Workspace
Outline Outline
u u The model
The model
u u The reactive engine
The reactive engine
u u The framework
The framework
u u Experimentations
Experimentations
Experimentation (1) Experimentation (1)
u u Physics (cf. A.
Physics (cf. A. Samarin Samarin) )
– – a physical reaction = 2 engine reactions a physical reaction = 2 engine reactions
u uone instant to gather all physical events
- ne instant to gather all physical events
u uone instant to compute the result
- ne instant to compute the result
– – behaviors synchronized by an event behaviors synchronized by an event – – Remaining problems Remaining problems
u uloss of precision: due to data types
loss of precision: due to data types
u unot very modular: the computation has not
not very modular: the computation has not to exceed one instant to exceed one instant
Experimentation (2) Experimentation (2)
u u Multi-clock simulation
Multi-clock simulation
– – 2 reactive engines in the same Workspace 2 reactive engines in the same Workspace – – Each Workspace reaction consists in: Each Workspace reaction consists in:
u u4 reactions of the physical engine
4 reactions of the physical engine
u u1 reaction of the basic engine
1 reaction of the basic engine
– – Events generated in each reactive engine Events generated in each reactive engine are local to it are local to it – – Events generated in the workspace are Events generated in the workspace are generated in the two reactive engines generated in the two reactive engines
Conclusion Conclusion
u u A new model and dedicated API for
A new model and dedicated API for Icobjs Icobjs
u u New reactive engine with new
New reactive engine with new instructions instructions
u u A framework to create/inspect icobjs
A framework to create/inspect icobjs
u u Some experimentations on physical
Some experimentations on physical and multi-clock simulations and multi-clock simulations
u u Website:
Website: http:// http://www.inria.fr/mimosa/rp/Icobjs www.inria.fr/mimosa/rp/Icobjs/ /
Future works Future works
u u Implements migration through
Implements migration through network network
u u Integrate the distribution in the
Integrate the distribution in the framework framework
u u Interface with a 3D engine