CROSSmeeting UM, Fev. 2010 1 T5: Slicing Techniques T5: Slicing Techniques Applied to OSS Applied to OSS Pedro Rangel Henriques Daniela da Cruz Dep. de Informática/CCTC, Universidade do Minho, Braga-Portugal UM Fevereiro de 2010
Mar 28, 2015
CROSSmeeting UM, Fev. 2010 1
T5: Slicing Techniques T5: Slicing Techniques Applied to OSSApplied to OSS
Pedro Rangel HenriquesDaniela da Cruz
Dep. de Informática/CCTC, Universidade do Minho,
Braga-Portugal
UMFevereiro de 2010
CROSSmeeting UM, Fev. 2010 2
ContextContext
CROSS (an infrastructure for Certification and Re-engineering of Open-Source Sw) ;
Code Analysis for software comprehension (quality assessment, re-use, re-engineering, transformation)
CROSSmeeting UM, Fev. 2010 3
MotivationMotivation
To contribute to the portfolio of analysis tools –that will be made available through the OSS Certification Portal (task T7)
improving Code Analysis via Slicing Techniques
CROSSmeeting UM, Fev. 2010 4
Code AnalysisCode Analysis
Code Analysis is concerned with ◦the extraction of data from Programs◦the storage of information, and ◦the visualization of knowledge
SWSystem,
aiming at its comprehension.
CROSSmeeting UM, Fev. 2010 5
Code AnalysisCode Analysis
To face the growing complexity of software systems, a promising approach for CA is the restriction of the analysis to a program slice.
CROSSmeeting UM, Fev. 2010 6
Our main ProposalOur main Proposal
Semantic slicing applied intra and inter program components increases component understanding/reusing
Semantic slicing is based on contracts (pre, post-conditions and invariants)
CROSSmeeting UM, Fev. 2010 7
ObjectivesObjectives
We planned 5 subtasks1. Test-bed. 2. Semantic Slicing3. Labeled Control Graph4. Slicing Specific Software Facets5. Dynamic slicing techniques
CROSSmeeting UM, Fev. 2010 8
Objectives – substask1Objectives – substask1
Test-bed. Development of a platform (web
environment) to support the pragmatic validation of the semantic slicing variants under study.
CROSSmeeting UM, Fev. 2010 9
Objectives – substask2Objectives – substask2
Development of new slicing techniques for annotated programs
(programs whose code is commented with constraints, typically logical expressions capturing
pre/post conditions and invariants). Different perspectives can be
considered: ……..
CROSSmeeting UM, Fev. 2010 10
Objectives – substask2Objectives – substask2 a) Given a traditional slicing criterion,
perform backward slicing in order to identify all the pre/post conditions involving that variable;
b) Given a pre/post condition of a method, perform forward slicing in order to identify all the program statements that depends on that condition;
CROSSmeeting UM, Fev. 2010 11
Objectives – substask2Objectives – substask2 c) Given an annotated procedure,
identify all its statements that do not contribute to the verification of the post-condition;
d) Given an annotated procedure and set of procedure-calls remove from the procedure all the statements that do not contribute to calling needs;
CROSSmeeting UM, Fev. 2010 12
Objectives – substask2Objectives – substask2 e) Given an annotated procedure,
extract and display the annotation in order to aid in its reuse;
f) Given an annotated procedure verify the precondition satisfiability at each calling point;
g) Given a procedure, infer its annotation
CROSSmeeting UM, Fev. 2010 13
Objectives – substask3Objectives – substask3
Development of new instrument for visualization and manipulation of annotated procedures :
Labeled Control Flow Graph Labeled System Dependency Graph
CROSSmeeting UM, Fev. 2010 14
Objectives – substask4Objectives – substask4
Application of slicing techniques to reverse engineering of specific software facets
--business logic, user interfaces, architectural issue, etc.-- to assess a given SwSystem.
(verify its compliance with the problem requirements)
CROSSmeeting UM, Fev. 2010 15
Objectives – substask4Objectives – substask4
To attain this objective, it is required to change the traditional definition of slicing criterion in order to deal with the vocabulary of each specific facet.
CROSSmeeting UM, Fev. 2010 16
Objectives – substask5Objectives – substask5
Dynamic slicing techniques to extract specific behavior, dealing with
strong dynamic characteristics.
CROSSmeeting UM, Fev. 2010 17
ConclusionConclusion
Present Status:Tasks 1, 2, 3 under-development(Ph.D. work + BI / M.Sc.)
Future:2nd BI