![](bg3.png)
teaching and admin responsibilities; (4) The number
of research outputs and their quality are positively
correlated to reputation.
6 SPECIFICATION: AS IS
The LEAP component specifications provide opera-
tions that allow the UoS to be simulated in terms of its
research activities. This section provides an overview
of the UoS LEAP specification as a single component
scabbleshire that contains sub-components and an
operation perform that is used to define the simula-
tion:
component s cr a b bl e s h ir e {
component p er s on n e l { model { class S ta ff { n am e :str } } }
The first component, shown above, is personnel that
maintains a database of all staff employed by the uni-
versity. Currently UoS employs all academic staff on
the same type of contract. The next component is used
to record research activity:
component r e se a r ch _ a c ti v i t y {
model { class A c ti v it y { s ta f f :str; q u al i ty :int; j o ur n al :str}}
port a c ti o ns [in]: interface {
st a r t _r e s ea r c h ( st af f :str, jo u rn a l :str):void;
pe r f o rm _ r e s e a r ch ( s ta f f :str):void;
ab o r t _r e s ea r c h ( st af f :str):void }
port p r od u ce [ o u t ]: interface {
re s ea r c h ( st a f f :str, qu al i ty :int, j ou r na l :str):void }
spec {
ab o r t _r e s ea r c h ( na me :str):void {
pre S ta f f ( n ame , qua li ty , j o ur n al ) ? ( q ua li ty > 0)
post S t af f ( n ame ,0 )
messages p r od u ce < - r e se a rc h ( nam e , q u al it y , jo u rn a l ) }
st a r t _r e s ea r c h ( na me :str, jo u rn a l :str):void {
pre not( St af f ( n ame , _ , _ ) )
post S t af f ( n ame ,0 , j o ur n al ) }
pe r f o rm _ r e s e a r ch ( n am e :str):void {
pre S ta f f ( n ame , a1 , j o ur n al ) ? ( a1 < 3)
post S t af f ( n ame , a2 , j o ur n al ) ?( a 2 = a1 +1) }
pe r f o rm _ r e s e a r ch ( n am e :str):void {
pre not( St af f ( n ame , a1 , j o ur n al ))
post S t af f ( n ame ,0 , j o ur n al ) }
pe r f o rm _ r e s e a r ch ( n am e :str):void {
pre S ta f f ( n ame , 3 , jo ur n al )
post not( S ta f f ( n ame , _ , _ ))
messages p r od u ce < - r e se a rc h ( nam e ,4 , jo u rn a l ) } } }
The research activity component manages a
database that maintains information about staff re-
search activity. An Activity record includes the
quality of the research (on a scale of 0 to 4) and the
Journal to which it will be submitted if completed.
The input interface actions support operations for
starting a research activity, performing research and
aborting the research. After initiating a piece of work,
a member of staff can perform up to 4 increments at
which point the research is ready for submission. At
any time the research can be aborted, at which time it
is assumed to be submitted as-is providing some work
has been undertaken.
A head of department manages a resource
database that allocates each member of staff to teach-
ing, research and administration tasks:
component r e so u r ce _ p l an n i n g {
model {
class St a ff { na me :str; t ea c h in g :int; re s ea r ch :int;
ad mi n :int} }
invariants {
ti m e_ 1 0 0 {
forall S ta ff (_ , te ac hi ng , r es ea rc h , ad m i n )
in state { t ea c hi n g + re s e a r c h + a d mi n = 1 00 } } } }
The UoS uses a centralized room booking system.
The simulation uses the room booking system to de-
termine whether a member of staff can undertake re-
search:
component r oo m _ bo o k in g {
model { class B o ok i ng { s ta f f :str; r oo m :int; t im e :int} } }
The UoS research repository contains a record of re-
search outputs produced by members of staff. We will
assume that all submissions added to the repository
are in print and that the research quality depends on
the length of time spent on the research. The opera-
tion research is used to update the repository:
component r ep o s i t o ry {
model {
class En t ry { st a ff :str; en tr y :int; qu a li t y :int; j o ur n al :str}
}
port d e po s it [in]: interface {
re s ea r c h ( n a me :str, qu a li t y :int, jo u rn a l :str):void }
spec {
re s ea r c h ( n a me :str, qu a li t y :int, jo u rn a l :str):void {
post
En tr y (n ame , ent ry , qua li ty , j o ur n al )
not( En tr y ( _ , e ntr y , _ ) in state@pre) } } }
The UoS web site is the public facing interface for
UoS. It contains many types of entry but for the
purposes of the simulation it is important to know
whether a repository entry is referenced on the web
site:
component web { model { class En tr y { r ep o s it o r y_ i d :int} } }
The scrabbleshire component is completed by
defining the data and operations used for the simu-
lation. The simulation is driven by a collection of
time ordered messages that are delivered to the sub-
component defined above. Each message has a time,
name and some argument data:
model {
class M es s ag e { ti me :int; n am e :str; a rg s : [ V a lu e ] }
class Ti me { t im e :int } }
The simulation is executed by the perform operation
that delivers messages. A message is ready for de-
livery when its time becomes current, if there are no
messages ready then time advances:
spec {
pe r fo r m ():void {
pre T im e ( t ) not( Me s sa g e ( t , m es sa ge , a rg s ))
post T im e ( t t ) ?( tt = t + 1 ) } }
.. . f u rt h er sp e ci f i ca t i on s b e lo w ...
There are three different messages: start that at-
tempts to initiate research by a member of staff;
do research that attempts to make an incremental
research step; transfer that ensures that all reposi-
tory entries for a member of staff are transferred to the
ICSOFT2012-7thInternationalConferenceonSoftwareParadigmTrends
232