LA CONSTRUCCIÓN DEL CONOCIMIENTO EN EL CAMPUS VIRTUAL ANÁLISIS DE UNA EXPERIENCIA
3. VALORACIÓN DE LAS HERRAMIENTAS Y SUS
The CAL dataflow program model describes the basic structure of the program. A specific meta model representation is used in order to extend the interoperability of CAL tools al- ready available. A CAL code compiler infrastructure that wants to make use of the TURNUS framework should wrap its intermediate representation and generate a consistent program model. The basic components of this representation are described in the following section. The formalism that is used is the same as the one illustrated in Section 2.5.
Network
TheNetworkobject is used to model a dataflow program network N (A, B ). As depicted in Figure 6.2, this object is defined by the following elements:
• id:Stringelement that identifies the network under analysis.
• sourceFile:Stringattribute that contains the relative source file path of the network (i.e. the.xdfor.nlfile name).
• version:Versionelement that contains the versioning information of the source file.
• project:Stringattribute that contains the name of the CAL project where the source file is stored.
• classes: list ofActorClasselements contained in the network.
• actors: list ofActorelements contained in the network.
• buffers: list ofBufferelements contained in the network.
Actor-class
TheActorClassobject is used to model an actor-classκ ∈ K . As depicted in Figure 6.3, this object is defined by the following elements:
6.2. High-level models Network + id : String + sourceFile : String + project : String Version ActorClass Actor Buffer classes 1..n buffers 1..n version 1 actors 1..n
Figure 6.2: TheNetworkobject.
• nameSpace:Stringattribute used to represent the level of hierarchy of the source file.
• sourceFile:Stringattribute that contains the relative source file path of the actor- class.
• version:Versionelement that contains the versioning information of the source file.
• Actions: list ofActionelements contained in the actor-class.
• inputPorts: list of inputPortelements contained in the actor-class.
• outputPorts: list of outputPortelements contained in the actor-class.
• variables: list ofVariableelements contained in the actor-class.
• procedures: list ofProcedureelements contained in the actor-class.
It must be noted that the concatenation of the name space and the name cannot be shared among actor-classes defined on the sameNetwork.
Actor
TheActorobject is used to model an actor a ∈ A. As depicted in Figure 6.4, this object is defined by the following elements:
• id:Stringattribute that identifies the actor. It must be noted that the same id cannot be shared among actors of the same network.
ActorClass + name : String + nameSpace : String + sourceFile : String Version Action Port inputPorts 1..n Port outputPorts 1..n Variable Procedure actions 1..n version 1 variables 1..n procedures 1..n
Figure 6.3: TheActorClassobject.
Actor
+ id : String
ActorClass
actorClass 1 Figure 6.4: TheActorobject.
Action
TheActionobject is used to model an actionλ ∈ Λ. As depicted in Figure 6.5, this object is defined by the following elements:
• id:Stringattribute that identifies the action. It must be noted that the same id cannot be shared among actions of the same actor.
• label:Qidelement that contains the qualifier identifier of the action.
• guards: list of theGuardelements used by the action.
• procedure: list ofProcedureelements used by the action.
• variables: list ofVariableselements used by the action.
It must be noted that, even though actions are defined in theActorClass, these are always considered by the framework as a tuple (Actor,Action) when analyses are performed.
6.2. High-level models Action + id : String Quid Guard Procedure Variable label 1 guards 0..n procedures 0..n variables 0..n
Figure 6.5: TheActionobject.
Qid
TheQidobject is used to model a qualifier identifier, which is a sequence of identifiers separated by a dot. As depicted in Figure 6.6, this object is defined by the following elements:
• ids: array ofStringelements that contains the ordered sequences of identifiers.
• size:Integerattribute that defines the size of the identifier in terms of elements in the ids array.
Quid
+ id : String[]
+ size : Integer
Figure 6.6: TheQuidobject.
Procedure
TheProcedureobject is used to model a procedure (or a function) defined in an actor-class and called by an action. As depicted in Figure 6.7, this object is defined by the following elements:
• name:Stringattribute that identifies the procedure. It must be noted that the same name cannot be shared among procedures of the same actor-class.
It must be noted that, even though procedures are defined in theActorClass, these are always considered by the framework as a tuple (Actor,Procedure) when analyses are performed. Procedure + name : String Variable variables 0..n Figure 6.7: TheProcedureobject.
Internal actor variable
TheVariableobject is used to model an internal variable. As depicted in Figure 6.8, this object is defined by the following elements:
• name: Stringattribute that identifies the actor internal variable. It must be noted that the same name cannot be shared among variables of the same actor-class. • type:Typeelement that contains the variable type.
It must be noted that, even though variables are defined in theActorClass, these are always considered by the framework as a tuple (Actor,Variable) when analyses are performed.
Variable
+ name : String
Type
type 1 Figure 6.8: TheVariableobject.
Guard
TheGuardobject is used to model an action guard. As depicted in Figure 6.9, this object is defined by the following elements:
• id:Stringattribute that identifies the guard. It must be noted that the same id cannot be shared among guards of the same action.
• variables: list ofVariableelements used by the guard.
• ports: list of inputPortelements used by the guard.
It must be noted that, even though guards are defined in theAction, these are always con- sidered by the framework as a tuple (Actor,Action,Guard) when analyses are performed.
6.2. High-level models Guard + id : String Port Variable variables 0..n ports 0..n
Figure 6.9: TheGuardobject.
Port
ThePortobject is used to model an input port pii n∈ Pai nor an output port poutj ∈ P out a . As
depicted in Figure 6.10, this object is defined by the following elements:
• name:Stringattribute that identifies the port. It must be noted that the same name cannot be shared among ports of the same kind (i.e. input or output) and of the same actor-class.
• type:Typeelement that contains the port type.
It must be noted that, even though ports are defined in theActorClass, these are always considered by the framework as a tuple (Actor,Port) when analyses are performed.
Port
+ name : String
Type
type 1 Figure 6.10: ThePortobject.
Buffer
TheBufferobject is used to model a buffer b ∈ B. As depicted in Figure 6.11, this object is defined by the following elements:
• sourceActor:Actorelement that contains the source actor.
• sourcePort:Portelement that contains the source output port.
• targetActor:Actorelement that contains the target actor. • targetPort:Portelement that contains the target input port.
Type
A basic type system is modeled using theTypeobject. As depicted in Figure 6.12, this object is defined by the following elements:
Buffer Actor sourceActor 1 Port sourcePort 1 Port targetPort 1 Actor targetActor 1
Figure 6.11: TheBufferobject.
• name:Stringattribute that identifies the type.
• size:Integerattribute that defines the number of elements contained in a complex data type (e.g. elements of a list of elements of the same type).
• bits: Integerattribute that defines the number of bits required to represent the variable of the given data type.
• subType:Typeelement that contains the sub-type of a type, if any. This attribute is used to model complex data types (e.g. elements of a list of elements of the same type).
Type + name : String + size : Integer + bits : Integer subType 1
Figure 6.12: TheTypeobject.
Version
TheVersionobject is used to define a unique identifier of a file. It is used, for example, to track the code modification and refactoring that could be made on a network or in an actor-class. TURNUS supports a Git versioning system [162] and, as depicted in Figure 6.13, for this object defines the following elements:
6.2. High-level models
• revision:Stringattribute that contains the commit hash identifier of the file.
• repository:Stringattribute that contains the Git repository URL of the file.
Version
+ date : String
+ revision : String
+ repository : String
Figure 6.13: TheVersionobject.