Assignment 2 Sample Solution
Assignment 2 Sample Solution
Assignment 2 Sample Solution
Question #1
Given is the following statement, while version control systems have advanced in the last couple
of years, fully automated merging remains a challenge and is typically not recommended.
Is the above statement correct – briefly justify your answer (max 50 words)
Yes.
While fully automated merging might be able to check for syntactical correctness it cannot
check for semantical correctness. Also if we have conflicting code regions (meaning
statements which were modified in parallel), fully automated merging might overrride
changes made by another users.
Question #2
You are attending a workshop and one of the presenters makes the following statements. 1.)
Dependency management systems such as Maven will help managing build dependencies and
the automation of the build process. 2.) Such build management system will also remove
technical debt, by eliminating all built errors.
Clearly indicate, if you agree / disagree with the above statement. Briefly justify your answer (1-
2 sentences).
1.) This is correct. Build management tools allow for the automation of the build process
and mange the dependency needed to build a system.
2.) This is incorrect. Build errors are not technical debt. Technical debt is not related to
system faults or errors. And buildmangement tools do not address issues of technical
debt. They are typically bad coding practices which will make the comprehension and
longterm maintenance of software systems more difficult.
Question #3
Verify the above static PDG for correctness – Note: In situation where you have a transitive
control dependency you can ignore it => A is control dependent on B and B is control dependent
on C then you do not have to include the control dependency between A and C.
PLEASE COORECT THE PDG BY ADDING MISSING DEPENDENCIES, REMOVING WRONG DEPENDENCIES IN THE TABLE BELOW
WRONG DEPENDENCIES – FILL THE BOX ; ADDING A MISSING DEPENDENCIES USE A CIRCLE SEE EXAMPLE BELOW
ORIGINAL CORRECTED
Node
3. Y=Y+1;
2 X 2 X
3 X 3
;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1
2
3
4 x x x x
5 x x x x
6
7
Node
8 x x x
9 x x
10
11 x x x x x
12 x x
13 x x
14 x x x
15 x
Data Dependencies
Control Dependencies
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1
2
3
4
5 x
6 x
7 x
Node
8 x x
9 x
10 x
11
12 x x
13
14
15
Question #4