[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to main content

Polygon Merge: A Geometric Algorithm Verified Using PVS

  • Conference paper
  • First Online:
NASA Formal Methods (NFM 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12673))

Included in the following conference series:

  • 939 Accesses

Abstract

Geometric algorithms can present significant challenges for formal methods. We describe the formalization and verification of an algorithm posing such challenges. Given two overlapping polygons A and B, the Polygon Merge algorithm derives a new polygon whose edges are outermost, partial edges of A and B. The algorithm has been verified to satisfy correctness criteria expressed as two point-set properties. We have constructed a rigorous proof using the PVS interactive theorem prover along with support from the NASA PVS Library. While the algorithm itself is fairly compact, its proof was a moderately complicated undertaking. Owing to the complexity of reasoning about the spatial relationships of two different polygons, the proof required hundreds of supporting lemmas. Most of the definitions and lemmas introduced were needed to build a body of deductive artifacts sufficiently robust for this problem domain. Many of these artifacts will be generally useful for working with polygons, line segments and 2D vectors. Accordingly, we are distilling these products into a reusable PVS library.

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

Access this chapter

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
GBP 19.95
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
GBP 59.99
Price includes VAT (United Kingdom)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
GBP 74.99
Price includes VAT (United Kingdom)
  • 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

Similar content being viewed by others

References

  1. Bertot, Y.: Formal verification of a geometry algorithm: a quest for abstract views and symmetry in Coq proofs. In: Fischer, B., Uustalu, T. (eds.) ICTAC 2018. LNCS, vol. 11187, pp. 3–10. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-02508-3_1

    Chapter  MATH  Google Scholar 

  2. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press and McGraw-Hill, Cambridge (2009)

    Google Scholar 

  3. Graham, R.L.: An efficient algorithm for determining the convex hull of a finite planar set. Inf. Process. Lett. 1(4), 132–133 (1972)

    Article  Google Scholar 

  4. Hocking, A.B., Rowanhill, J.C., Di Vito, B.L.: An analysis of implementing PVS in SPARK Ada. In: 2020 IEEE/AIAA 39th Digital Avionics Systems Conference (DASC). IEEE (2020)

    Google Scholar 

  5. Hormann, K., Agathos, A.: The point in polygon problem for arbitrary polygons. Comput. Geom. 20(3), 131–144 (2001)

    Article  MathSciNet  Google Scholar 

  6. Kong, H., Zhang, H., Song, X., Gu, M., Sun, J.: Proving computational geometry algorithms in TLA+2. In: 5th IEEE International Conference on Theoretical Aspects of Software Engineering (TASE 2011). IEEE (2011)

    Google Scholar 

  7. Margalit, A., Knott, G.D.: An algorithm for computing the union, intersection or difference of two polygons. Comput. Graph. 13(2), 167–183 (1989)

    Article  Google Scholar 

  8. NASA: PolyCARP. https://github.com/nasa/PolyCARP

  9. NASA Langley Research Center: PVS library collection, theories and proofs. http://shemesh.larc.nasa.gov/fm/ftp/larc/PVS-library/

  10. Owre, S., Rushby, J.M., Shankar, N.: PVS: a prototype verification system. In: Kapur, D. (ed.) CADE 1992. LNCS, vol. 607, pp. 748–752. Springer, Heidelberg (1992). https://doi.org/10.1007/3-540-55602-8_217

    Chapter  Google Scholar 

  11. Shimrat, M.: Algorithm 112: position of point relative to polygon. Comm. ACM 5(8), 434 (1962)

    Google Scholar 

  12. Zalik, B.: Merging a set of polygons. Comput. Graph. 25(1), 77–88 (2001)

    Article  Google Scholar 

Download references

Acknowledgments

This work was funded by USAF AFRL/RQQA contract FA8650-17-F-2220. Approved for Public Release: Distribution Unlimited (Case Number: 88ABW-2020-3765).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ben L. Di Vito .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Di Vito, B.L., Hocking, A.B. (2021). Polygon Merge: A Geometric Algorithm Verified Using PVS. In: Dutle, A., Moscato, M.M., Titolo, L., Muñoz, C.A., Perez, I. (eds) NASA Formal Methods. NFM 2021. Lecture Notes in Computer Science(), vol 12673. Springer, Cham. https://doi.org/10.1007/978-3-030-76384-8_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-76384-8_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-76383-1

  • Online ISBN: 978-3-030-76384-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics