Skip to main content

Formal Derivation and Verification of Critical Path Algorithm for Directed Acyclic Graph

  • Conference paper
  • First Online:
Structured Object-Oriented Formal Language and Method (SOFL+MSVL 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13854))

  • 133 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Michael, J.B., Dinolt, G.W., Drusinsky, D.: Open questions in formal methods. Computer 53(5), 81–84 (2020)

    Article  Google Scholar 

  2. Malde, K., Giegerich, R.: Calculating PSSM probabilities with lazy dynamic programming. J. Funct. Program. 16(1), 75–81 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  3. Derrick, G. Bruce, W.: The Correctness-by-Construction Approach to Programming. Springer, Berlin, Heidelberg (2012)

    Google Scholar 

  4. Xue, J.: A unified approach for developing efficient algorithm of programs. J. Comput. Sci. Technol. 12(4), 314–329 (1997)

    Article  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Jinyun, X.: PAR method: abstract programming language apla. Technical report. Key Laboratory of high performance computing technology. Jiangxi Normal University (in Chinese) (2001)

    Google Scholar 

  9. Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)

    MATH  Google Scholar 

  10. Dijkstra, E.W., Scholten, C.S.: Predicate Calculus and Program Semantics. Springer, New York (1989)

    MATH  Google Scholar 

  11. Jinyun, X.: Two new strategies for developing loop invariants and their applications. J. Comput. Sci. Technol. 8(2), 147–154 (1993). (in Chinese)

    Article  MathSciNet  Google Scholar 

  12. 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

  13. Si, X. Dai, H., Raghothaman, M.: Learning loop invariants for program verification. Neural Inf. Process. Syst. (2018)

    Google Scholar 

  14. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Xinwu Yi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics