mgr inż. Krzysztof Borowski
dr hab. Bartosz Baliś
dr Tomasz Orzechowski
Maintenance and evolution of complex software programs
Software development tools
Understanding the source code
Guarding code quality
Why available today tools are not sufficient?
Semantic Code Graph as an abstract code representation model
Various Semantic Code Graph applications
Code visualization - Graph Buddy
Monitoring software structure quality
Future plans
January 2020 - GitHub reports over 190 million repositories, 40 million active users (In 2010 - 1 million repositories)
Estimated billions lines of new code produced yearly
"The only constant in code is change"
A big ball of mud is a software system that lacks a perceivable architecture. Although undesirable from a software engineering point of view, such systems are common in practice due to business pressures, developer turnover and code entropy. They are a type of design anti-pattern.
https://en.wikipedia.org/wiki/Big_ball_of_mud
Understanding project semantic structure
Maintaining the project semantic structure
ArchRule myRule = classes()
.that().resideInAPackage("..service..")
.should().onlyBeAccessed().byAnyPackage("..controller..", "..service..")
class A()
object AFactory {
def createA() = {
new A()
}
}
class A()
object AFactory {
def createA() = {
new A()
}
}
hypothesis:
the code structure and dependencies of any program can be represented as a directed graph, precise enough to be valuable in various analyses and visualizations
syntax = "proto3";
message Location {
string uri = 1;
int32 startLine = 2;
int32 startCharacter = 3;
int32 endLine = 4;
int32 endCharacter = 5;
}
message Edge {
string to = 1;
string type = 2;
Location location = 3;
map<string, string> properties = 4;
}
message GraphNode {
string id = 1;
string kind = 2;
Location location = 3;
map<string, string> properties = 4;
string displayName = 5;
repeated Edge edges = 6;
}
message SemanticGraphFile {
string uri = 1;
repeated GraphNode nodes = 2;
}
where \(\sigma_{st}\) is the total number of shortest paths from node \(s\) to node \(t\) and \(\sigma_{st}(v)\) is the number of those paths that pass through .
[1] S. G. Eick, T. L. Graves, A. F. Karr, J. S. Marron, and A. Mockus,“Does code decay? assessing the evidence from change managementdata,”IEEE Transactions on Software Engineering, vol. 27, no. 1, pp.1–12, 2001.
[2] Vinay Arora, Rajesh Bhatia, and Maninder Singh. “Evaluation of FlowGraph and Dependence Graphs for Program Representation”. In:Interna-tional Journal of Computer Applications56 (Oct. 2012), pp. 18–23.doi:10.5120/8959-3161.
[3] J. Bohnet and J. D ̈ollner, “Monitoring code quality and developmentactivity by software maps,”Proceedings - International Conference onSoftware Engineering, 01 2011.
[4] F. Yamaguchi et al. “Modeling and Discovering Vulnerabilities with CodeProperty Graphs”. In:2014 IEEE Symposium on Security and Privacy.2014, pp. 590–604.doi:10.1109/SP.2014.44.
[5] P. Bhattacharya et al. “Graph-based analysis and prediction for softwareevolution”. In:2012 34th International Conference on Software Engineering(ICSE). June 2012, pp. 419–429
[6] . Walunj et al. “GraphEvo: Characterizing and Understanding SoftwareEvolution using Call Graphs”. In:2019 IEEE International Conference onBig Data (Big Data). 2019, pp. 4799–4807.