Information Technology Reference
In-Depth Information
Fig. 3. API Semantic Annotation workflow
As illustrated in Fig. 2, the inputs to the procedure are, on one side the
source code to be ported, together with APIs utilized, or directly the APIs; on
the other side the target API, semantically described and annotated with the
Functional Ontology (expressed in OWL language). The output of the procedure
is a mapping between the source API components and source code excerpts, and
target API components which are equivalent (functional equivalence) to the
source elements and code, and which represent the candidates to replace the
source elements during the porting activity.
The input components (source code and APIs) are statically analysed with
use of a static code analyser, and the components of uniform the knowledge
representation, the Program Dependence Graph, the Call Graph and the API
Graph, are produced. On the other hand an OWL parser produces the OWL
graph representation of the functional ontology. The ALCOR module detects,
from the Program Dependence Graph, the algorithmic concepts implemented
within the source code, and produces the Abstract Program Representation,
represented as a graph in the uniform knowledge base, which represents the rec-
ognized concepts and their hierarchical and control/data dependences, and their
grounding (implementation) within the source code. Details on the recognition
procedure and the concepts representation are provided in sec. 4.1.
The API Ontology Builder module, on the other hand, analyzes the APIs used
by the source code, represented by the API graph, and produces the Candidate
API ontology graph, by applying graph transformation rule patterns defined
for the specific programming language or model. This Ontology represents the
semantics of the components of the API under analysis, and their semantic rela-
tionships. Details on the transformation rules and on the module implementation
are provided in sec. 4.3.
Once produced the uniform Knowledge base with the components described,
the Matcher performs the matching between the source and target elements,
 
Search WWH ::




Custom Search