FORMAL DESIGN OF SMIL DOCUMENTS
Abdelkader Belkhir and Samia Bouyakoub-Smail
Department of Computer Science, Faculty of Electronics and Computer Science, USTHB University, BP 32 El-Alia ,
Algiers, ALGERIA
Keywords: Multimedia presentations, modelling and verification, formal techniques, Petri nets, SMIL.
Abstract: This article introduces a new formal technique based on extended timed Petri nets, called SMIL-Net for the
modelling and the verification of SMIL presentations. We also propose a technique for the temporal and
hyper-temporal consistency checking of the document based on the SMIL-Net model.
1 INTRODUCTION
Synchronized Multimedia Integration Language
(SMIL) (Hoschka,1998) (Ayars,2001) was
developed by the World Wide Web Consortium
(W3C) to address the lack of HTML for multimedia
over the Web. It provides an easy way to compose
multimedia presentations. This paper thus focuses on
the SMIL-based presentations.
The complexity of SMIL documents can lead
authors, in certain cases, to specify synchronization
relations which could not be satisfied during the
presentation of the document, thus characterizing the
occurrence of inconsistencies, making it necessary to
use formal techniques for their specification and for
verifying their logical and temporal properties
(Sampaio,2003) (Huiqun,2002) (Yang,2000). This
article introduces a new formal technique based on
extended timed Petri nets, called SMIL-Net (which
means SMIL - Petri Net) for the modelling and the
verification of SMIL presentations (Smail,2004).
The major innovation of the SMIL-Net model is the
modelling of the hyper-temporal dimension of SMIL
documents, and the verification of temporal and
hyper-temporal consistency within the same model.
The paper is organized as follows: First of all, we
present the SMIL-Net model in section 2. The
conversion techniques from SMIL to SMIL-Net are
presented in section 3. The methods for detecting
temporal and hyper-temporal inconsistencies are
explained in section 4. Finally, section 5 concludes
this paper.
2 SMIL-NET
The elements in SMIL-Net include places, tokens,
transitions and arcs.
we define three kinds of places to model the
different time-dependant elements of SMIL: The
regular place represents a media element and its
associated duration.
The link place represents a
linking element (a and area elements of SMIL)
and its activation interval. Finally, the virtual place
represents a synchronization attribute (begin, end,
dur).
The model defines two types of tokens: State tokens
that define the state of the place, and Control tokens
that act on the state of the place. These tokens are
transported by different types of arcs: The simple arc
is used to transport state tokens. The virtual arc is
used to transport control tokens. The dynamic arc is
used to model hyperlink firing. The master arc
controls the firing of master transitions.
To model the different semantics of SMIL, three
types of transitions are defined (subset of the
transition semantics defined in TSPN model
(Senac,1995) (Senac,1996-a) (Senac,1996-b)): The
simple transition fires if all its input places are active
and have unlocked tokens. The Master transition
fires if the place having a master arc is active and
has an unlocked token. The First transition fires if
one of its input places is active and has an unlocked
token.
The next section will illustrate the use of these
different elements in the modelling of SMIL
elements.
396
Belkhir A. and Bouyakoub-Smail S. (2007).
FORMAL DESIGN OF SMIL DOCUMENTS.
In Proceedings of the Third International Conference on Web Information Systems and Technologies - Web Interfaces and Applications, pages 396-399
DOI: 10.5220/0001271403960399
Copyright
c
SciTePress
3 CONVERTING SMIL
DOCUMENT TO SMIL-NET
In this section, the synchronization and hypermedia
elements of SMIL are examined, and the
mechanisms that convert these elements to SMIL-
Net are presented.
We assume that the syntax of the input SMIL
script has been checked before starting the
transformation.
3.1 Converting a Media Object
Figure 1: Converting a media object.
A media object is represented by a regular place and
a pair of ordinary transitions (Ts, Te).
However, the attributes associated with the
element require some more conversion. Since the
“begin” attribute specifies the time for the explicit
begin of an element, one virtual place representing
the begin time with the specified duration is added in
front of the element. The “end” attribute specifies
the explicit end of an element, so one virtual place
with the end value is added between the original
start transition and the end transition. A master
transition is added at the end to force the object to
end with the value specified in the end attribute. The
“dur” attribute specifies the explicit duration of an
element, thus a virtual place between the actual start
transition and the end transition is added. The end
transition is also a master transition .
3.2 Converting the <seq> Element
The <seq> element defines a sequence of elements
in which elements play one after the other. Since the
children of a <seq> element form a temporal
sequence, we concatenate each child of <seq> one
by one in SMIL-Net,
Figure 2: Converting a <seq> element.
3.3 Converting the <par> Element
The <par> element defines a simple parallel time
grouping in which multiple elements can play back
at the same time. Thus, all children of <par> should
be within the same pair of transition (Ts, Te).
There are three variations for <par> according to
the value of the "endsync" attribute. The “endsync”
attribute controls the end of the <par> element, as a
function of children end time. Legal values for the
attribute are “last”, “first”, and “id-ref’.
Figure 3: Converting the <par> element.
The value of “last” requires <par> to end with
the last end of all the child elements, so Te is
modelled by a simple transition. The value of “id-
ref’ requires <par> to end with the specified child.
So we change the end transition Te to a Master
transition, and the arc between the specified child
and transition to a master arc. The value of “first”
requires <par> to end with the earliest end of all the
child elements. Therefore, we should change the end
transition Te to a First transition so that the child
that ends first will fire the transition. Other
synchronization attributes, such as “begin”, “end”,
and “dur”, could also be associated with <seq> and
<par> elements, but the conversion is similar to that
in the media object elements.
3.4 Converting the <a> Element
The functionality of the <a> element is very similar
to the functionality of the <a> element in HTML, it
defines a link which can be activated by one of its
child elements without influencing their
synchronization.
The link <a> is active during all the interval of
activation of the source element, thus its interval of
activation is [0,*,source-duration].
The <a> element is modelled by a link place and
a dynamic arc to fire the link. When the active
duration of the source element begins, the link place
receives a pause token and waits for user interaction.
If an interaction happens during the activation
interval of the link (which is, in this case the same as
the active interval of the source element), the
Elt2
Elt 1
elt 1
[
X
1
,N
1
,
Y
1
]
elt 1
elt 2
Te
Ts
FORMAL DESIGN OF SMIL DOCUMENTS
397
dynamic arc is transformed to a simple arc and the
following transition (the link) fires.
There are three variations for <a> element
according to the "show" attribute. The “show”
attribute specifies how to handle the current state of
the presentation at the time in which the link is
activated. Legal values for the attribute are “new”,
“pause”, and “replace”. The “pause” value
requires the source to be paused while playing the
destination element, so we use virtual arcs with
pause/resume tokens to pause and resume the source
element. The “replace” value require the destination
element to replace the source element and to play in
the same context, so the firing of the transition
retrieves a token to the source place in order to
disable it. The “new” value requires the destination
element to play in a new context without affecting
the source element.
3.5 Converting the <area> Element
The functionality of the <a> element is restricted in
that it only allows associating a link with a complete
media object. The <area> element allows associating
a link with spatial and/or temporal portions of an
object.
When the <area> element is associated with a
spatial portion of an object, it has the same temporal
behavior as the <a> element since it stills active
during all the duration of the source object.
When the <area> element is associated with a
temporal portion of an object using attributes such as
begin and end attributes, the interval of activation
associated to the link place is restricted to
[begin,*,end].
The <area> element also accepts the ‘show
attribute, the SMIL-Net associated with the <area>
element with the different values of the ‘show’
attribute is the same as in the <a> element with a
different activation interval for the link place.
4 TEMPORAL AND
HYPER-TEMPORAL
VERIFICATION
The complexity of SMIL documents can lead
authors, in certain cases, to specify synchronization
relations which could not be satisfied during the
presentation of the document, thus characterizing the
occurrence of temporal inconsistencies. For this
reason, we associate verification techniques to
SMIL-Net to detect temporal inconsistencies.
The hyper-temporal inconsistencies resulting of
the definition of inconsistent temporal links are also
an important aspect of the verification process, and
are detected by SMIL-Net.
4.1 Temporal Verification
The time conflict is defined in (Yang,2000) as the
case of conflicting values of attributes in the SMIL
script.
There are two types of time conflicts for SMIL
presentations, the intra-element time conflict and the
inter-elements time conflict.
4.1.1 The Intra-element Time Conflict
The intra-element time conflict is the case of
conflicting attributes associated with a single
element. Therefore, to detect the intra-element time
conflict, we only need to examine the values of
attributes associated with a single element.
The intra-element time conflict is detected in
SMIL-Net when a master transition has two master
arcs coming from its input places.
4.1.2 The Inter-elements Time Conflict
The inter-elements time conflict is the case of
conflicting attributes among different elements.
In SMIL-Net, the firing time of transition should
be earlier than that of the following transition. It
implies that if the values of attributes set by the
author make the firing time of a transition later than
the firing time of some following transition, it results
in the inter-elements time conflict.
The inter-element time conflict could be detected
by comparing the computed firing times of
transitions.
Thus, it is necessary to calculate the firing time
for all the transitions in the SMIL-Net.
To compute the firing time for each transition,
we have to reduce the SMIL-Net by removing all
non-temporal elements.
Then, the firing time for each transition is
computed by traversing the reduced SMIL-Net
transition by transition from the initial state. The
computation rule for calculating the firing time of a
transition depends on its type: For simple transitions,
the firing time of the transition is the maximum
value of the “firing time of the preceding transition”
plus “the nominal duration of the following place of
the preceding transition”. For First transitions, the
firing time of the transition is the minimum value of
the “firing time of the preceding transition” plus “the
nominal duration of the following place of the
WEBIST 2007 - International Conference on Web Information Systems and Technologies
398
preceding transition”. For Master transitions, the
firing time of the transition is the value of the “firing
time of the preceding transition” plus “the nominal
duration of the place associated with a master arc”.
When the firing time of each transition is computed,
we traverse the SMIL-Net again from the initial
place and locate the pair of transitions at which the
conflicting firing times occur. The corresponding
pair of elements with the conflicting transitions is
therefore the source of the inter-elements time
conflict.
4.2 The Hyper-Temporal Verification
The hyper-temporal inconsistency is concerned with
the definition of temporal links pointing on a non-
active object. This case of inconsistency is detected
when the activation interval of the link place is not
included in the duration interval of the source place.
In the case of local links, we should ensure that
the link firing may not lead to temporal
inconsistency. Thus, we assume that the link fires,
we replace the dynamic arc by a simple arc, and we
apply the temporal verification techniques seen
above on the obtained SMIL-Net.
5 CONCLUSION
This paper introduces a new forma model, based on
the temporal extensions of Petri nets for modelling
and verifying temporal and hyper-temporal
consistency of SMIL documents, called SMIL-Net.
The main contributions of this work are:
The definition of a formal model covering both
of the temporal and the hyper-temporal
aspects of SMIL documents.
The definition of an approach to automatically
translate SMIL documents into SMIL-Net
specification.
The temporal and hyper-temporal consistency
checking based on the same model.
REFERENCES
Ayars,J. World Wide Web Consortium Recommendation.
"Synchronized Multimedia Integration Language
(SMIL2.0)", online at
"http://www.w3.org/TR/2001/REC-smil20-
20010807/", August 2001.
P.Hoschka, W3C Recommendation, "Synchronized
Multimedia Integration Language (SMIL) 1.0". Online
at :http://www.w3.org/TR/REC-smil, June 1998.
Huiqun.Y, Xudong.H, Shu.G, Yi.D, "Modeling and
analyzing SMIL Documents in SAM ", Proceeding of
IEEE Fourth International Symposium on multimedia
software engineering (MSE’02), 2002.
Sampaio, P.N.M., "Conception formelle de documents
multimédias interactifs: une approche s'appuyant sur
RT-LOTOS", PHD thesis, Paul Sabatier University,
Toulouse,France, April 2003.
Smail.S "Système d'édition multimédia", Master thesis,
Houari Boumediene University, Bab Ezzouar, Algeria,
December 2004.
Sénac, P., de Saqui-Sannes, P., Willrich, W. “Hierarchical
Time Stream Petri Net: A Model for Hypermedia
Systems”, proceedings of the International Conference
On application and Theory of Petri Nets. Torino, Italy,
June 1995.
Sénac, P. "Contribution à la modélisation des systèmes
multimédias et hypermédias", PHD thesis, Paul
Sabatier University, Toulouse, France. June 1996.
Sénac P. et all. "Modelling logical and temporal
synchronization in Hypermedia Systems", IEEE
journal on selected areas in communications, January
1996.
Yang C.C., "Detection of the Time Conflicts for SMIL-
based Multimedia Presentations", Proceeding of 2000
International Computer Symposium (ICS2000)-
Workshop on Computer Networks, Internet, and
Multimedia, Chiayi, Taiwan, 2000.
FORMAL DESIGN OF SMIL DOCUMENTS
399