Abstract
Graph structure is widely used in network design, path planning, relational processing, electronic circuit design, and power grid tide management. However, the complexity and variety of relationships between different data objects create difficulties in the derivation of graph algorithms, the correctness of algorithms cannot be easily guaranteed in some complex problems. In this paper, we formally derive the loop invariant of critical path by using the new definition and new strategies of loop invariant in PAR method. Furthermore, the Apla abstraction algorithm program is designed, and the executable code is generated by the PAR platform. Finally, the correctness of the algorithm is proved by using the Dijkstra’s weakest precondition method. The critical path is a typical dynamic programming problem. The recursive relation of the critical path can be automatically detected when the loop invariant is derived by using the PAR method, and the reliability of the Apla algorithm program is ensured by using the formal verification technique. The formal derivation and verification of the critical path algorithm in this paper can be extended to solve other dynamic programming type problems.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Michael, J.B., Dinolt, G.W., Drusinsky, D.: Open questions in formal methods. Computer 53(5), 81–84 (2020)
Malde, K., Giegerich, R.: Calculating PSSM probabilities with lazy dynamic programming. J. Funct. Program. 16(1), 75–81 (2006)
Derrick, G. Bruce, W.: The Correctness-by-Construction Approach to Programming. Springer, Berlin, Heidelberg (2012)
Xue, J.: A unified approach for developing efficient algorithm of programs. J. Comput. Sci. Technol. 12(4), 314–329 (1997)
You, Z., Xue, J., Zuo, Z.: Unified formal derivation and automatic verification of three binary-tree traversal non-recursive algorithms. Cluster Comput. 19(4), 2145–2156 (2016)
Zhen, Y., et al.: A multiplayer virtual intelligent system based on distributed virtual reality. Int. J. Pattern Recogn. Artif. Intell. 35(14), 2159050, 1–21 (2021)
Xue, J., Cheng, Z., Yang, Q.: Methodology and platform of IS code generation. In: ICBDM 2020: 2020 International Conference on Big Data in Management, pp. 49–57 (2020)
Jinyun, X.: PAR method: abstract programming language apla. Technical report. Key Laboratory of high performance computing technology. Jiangxi Normal University (in Chinese) (2001)
Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)
Dijkstra, E.W., Scholten, C.S.: Predicate Calculus and Program Semantics. Springer, New York (1989)
Jinyun, X.: Two new strategies for developing loop invariants and their applications. J. Comput. Sci. Technol. 8(2), 147–154 (1993). (in Chinese)
Durán, J.E.: Transformational derivation of greedy network algorithms from descriptive specifications. In: Boiten, E.A., Möller, B. (eds.) Mathematics of Program Construction. MPC 2002. Lecture Notes in Computer Science, vol. 2386, pp. 40–67. Springer, Berlin, Heidelberg (2002). https://doi.org/10.1007/3-540-45442-X_5
Si, X. Dai, H., Raghothaman, M.: Learning loop invariants for program verification. Neural Inf. Process. Syst. (2018)
Fowler, M., Kraemer, E., Sitaraman, M.: Tool-aided loop invariant development: insights into student conceptions and difficulties. In: ITiCSE 2021: 26th ACM Conference on Innovation and Technology in Computer Science Education, pp. 387–393. ACM (2021)
Acknowledgement
This work was funded by Projects of Jiangxi Provincial Nature Science Foundation (Grant No.20212BAB202018), Provincial Virtual Simulation Experiment Education Project of Jiangxi Education Department (Grant No.2020–2-0048) and the Science and Technology Research Project of Jiangxi Province Educational Department (Grant No. GJJ210333).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
You, Z., Yi, X., Xue, J., Hu, H., Huang, J., Cheng, Z. (2023). Formal Derivation and Verification of Critical Path Algorithm for Directed Acyclic Graph. In: Liu, S., Duan, Z., Liu, A. (eds) Structured Object-Oriented Formal Language and Method. SOFL+MSVL 2022. Lecture Notes in Computer Science, vol 13854. Springer, Cham. https://doi.org/10.1007/978-3-031-29476-1_1
Download citation
DOI: https://doi.org/10.1007/978-3-031-29476-1_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-29475-4
Online ISBN: 978-3-031-29476-1
eBook Packages: Computer ScienceComputer Science (R0)