ABSTRACT
The LEGv8 architecture is a restricted representation of the ARMv8 architecture. In this paper, we present a formalisation of the LEGv8 architecture in Agda. We have modelled machine words, the processor state, and the semantics of the instruction set; we also include an assembler and disassembler with round-trip correctness. We explain how dependent types allow us to abstract away some repetitive definitions and drive the correctness proof of the assembler.
- Jade Alglave, Anthony C. J. Fox, Samin Ishtiaq, Magnus O. Myreen, Susmit Sarkar, Peter Sewell, and Francesco Zappa Nardelli. 2009. The semantics of power and ARM multiprocessor machine code. In Proceedings of the POPL 2009 Workshop on Declarative Aspects of Multicore Programming, DAMP 2009, Savannah, GA, USA, January 20, 2009, Leaf Petersen and Manuel M. T. Chakravarty (Eds.). ACM, 13--24. https://doi.org/10.1145/1481839.1481842 Google ScholarDigital Library
- ARM Ltd. 2017. ARM Architecture Reference Manual (ARMv8, for ARMv8-A architecture profile) (DDI0487). ARM Ltd. https://developer.arm.com/docs/ddi0487/a/arm-architecture- reference- manual- armv8-for-armv8-a-architecture-profileGoogle Scholar
- Patrick Bahr and Graham Hutton. 2015. Calculating Correct Compilers. Journal of Functional Programming 25 (Sept. 2015).Google ScholarCross Ref
- Patrick Bahr and Graham Hutton. 2020. Calculating Correct Compilers II: Return of the Register Machines. Journal of Functional Programming (2020). To appear.Google Scholar
- Gergö Barany. 2018. A more precise, more correct stack and register model for CompCert. In LOLA 2018 - Syntax and Semantics of Low-Level Languages 2018. Oxford, United Kingdom. https://hal.inria.fr/hal-01799629Google Scholar
- H.G. Cragon. 1980. The Elements of Single-Chip Microcomputer Architecture. Computer 13 (1980), 27--41. Issue 10. https://doi.org/10.1109/mc.1980.1653373 Google ScholarDigital Library
- Nils Anders Danielsson. 2010. Total parser combinators. In Proceeding of the 15th ACM SIGPLAN international conference on Functional programming, ICFP 2010, Baltimore, Maryland, USA, September 27--29, 2010, Paul Hudak and Stephanie Weirich (Eds.). ACM, 285--296. https://doi.org/10.1145/1863543.1863585 Google ScholarDigital Library
- Xavier Leroy. 2009. Formal verification of a realistic compiler. Commun. ACM 52, 7 (July 2009), 107--115. https://doi.org/10.1145/1538788.1538814 Google ScholarDigital Library
- Alberto Pardo, Emmanuel Gunther, Marcos Viera, and Miguel Pagano. 2018. An Internalist Approach to Correct-by-Construction Compilers. In PPDP. ACM. Google ScholarDigital Library
- David A. Patterson and John L. Hennessy. 2016. Computer Organization and Design: The Hardware/Software Interface. Morgan Kaufmann. Google ScholarDigital Library
- Mitchell Pickard and Graham Hutton. 2020. Dependently-typed compilers don't go wrong. (2020). http://www.cs.nott.ac.uk/~pszgmh/well-typed.pdf In preparation.Google Scholar
- Christopher Pulte, Shaked Flur, Will Deacon, Jon French, Susmit Sarkar, and Peter Sewell. 2018. Simplifying ARM concurrency: multicopy-atomic axiomatic and operational models for ARMv8. PACMPL 2, POPL (2018), 19:1--19:29. https://doi.org/10.1145/3158107 Google ScholarDigital Library
- Alastair Reid. 2016. Trustworthy specifications of ARM® v8-A and v8-M system level architecture. In 2016 Formal Methods in Computer-Aided Design, FMCAD 2016, Mountain View, CA, USA, October 3--6, 2016, Ruzica Piskac and Muralidhar Talupur (Eds.). IEEE, 161--168. https://doi.org/10.1109/FMCAD.2016.7886675 Google ScholarDigital Library
- Alastair Reid. 2017. Who guards the guards? formal validation of the Arm v8-m architecture specification. PACMPL 1, OOPSLA (2017), 88:1--88:24. https://doi.org/10.1145/3133912 Google ScholarDigital Library
- Yong Kiam Tan, Magnus O. Myreen, Ramana Kumar, Anthony Fox, Scott Owens, and Michael Norrish. 2016. A New Verified Compiler Backend for CakeML. In ICFP '16: Proceedings of the 21th ACM SIGPLAN International Conference on Functional Programming. ACM Press, 60--73. https://doi.org/10.1145/2951913.2951924 Google ScholarDigital Library
- Agda Development Team. 2020. Agda. https://agda.readthedocs.io/en/latest/Google Scholar
- Paul van der Walt and Wouter Swierstra. 2012. Engineering Proof by Reflection in Agda. In Implementation and Application of Functional Languages - 24th International Symposium, IFL 2012, Oxford, UK, August 30 - September 1, 2012, Revised Selected Papers (Lecture Notes in Computer Science), Ralf Hinze (Ed.), Vol. 8241. Springer, 157--173. https://doi.org/10.1007/978-3-642-41582-1_10Google Scholar
- Marcell van Geest and Wouter Swierstra. 2017. Generic packet descriptions: verified parsing and pretty printing of low-level data. In Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development, TyDe@ICFP 2017, Oxford, UK, September 3, 2017, Sam Lindley and Brent A. Yorgey (Eds.). ACM, 30--40. https://doi.org/10.1145/3122975.3122979 Google ScholarDigital Library
Index Terms
- A formalisation of LEGv8 in Agda
Recommendations
Formalisation and Analysis of Objects as CSP Processes
Formal Methods: Foundations and ApplicationsCSP-OZ is a formal specification language. It is a formal combination of the process algebra CSP and Object-Z, an object-oriented version of the model-based Z language. CSP-OZ lacks tool support, having only a type checker and a model-checking strategy. ...
A formalisation of parameterised reference attribute grammars
SLE 2017: Proceedings of the 10th ACM SIGPLAN International Conference on Software Language EngineeringThe similarities and differences between attribute grammar systems are obscured by their implementations. A formalism that captures the essence of such systems would allow for equivalence, correctness, and other analyses to be formally framed and ...
Formalization of Protocol Engineering Concepts
Special issue on protocol engineeringA vast variety of design principles and formal description techniques (FDTs) have been advocated to help contend with the ever-increasing complexity of communication system development. However, the relationship between these principles and FDTs is ...
Comments