Abstract
There is no universal agreement on the order in which the successive bytes constituting a scalar value are stored. Some machines (so-called big-endian architectures) store the most significant byte first, while others (little-endian architectures) adopt the opposite convention. When porting an application across platforms that use different conventions, programmers need to convert data to the appropriate convention, and this may cause difficulties when exact memory layouts need to be preserved (e.g. for communication with legacy systems).
This paper describes the features of the Ada language that help supporting programmers in these situations, identifies some of their shortcomings, and introduces two novel solutions: a code generation approach based on data representation modeling, and a new representation attribute Scalar_Storage_Order, allowing the byte order convention to be specified for a given composite data structure.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ada Rapporteur Group: Controlling bit ordering. Ada Issue AI95-00133, ISO/IEC JTC1/SC22/WG9 (2004), http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ais/ai-00133.txt?rev=1.17 , adopted amendment to the Ada 95 standard [5]
Andress, R.P.: Wholesale byte reversal of the outermost Ada record object to achieve endian independence for communicated data types. Ada Letters XXV(3), 19–27 (2005)
Cohen, D.: On Holy Wars and a Plea for Peace. IEEE Computer 14(10), 48–54 (1981)
Cohen, N.H.: Endian-independent record representation clauses. Ada Letters XIV(1), 27–29 (1994)
ISO: Information Technology – Programming Languages – Ada. ISO (February 1995), ISO/IEC/ANSI 8652:1995
ITU-T: Information technology — Abstract Syntax Notation One (ASN.1): Specification of basic notation. Recommendation X.680 (November 2008)
ITU-T: Information technology — ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER). Recommendation X.690 (November 2008)
Mardis, M.: Endian-safe record representation clauses for Ada programs. Ada Letters XIX(4), 13–18 (1999)
Protomatics: Transfer Syntax Notation One (TSN.1). Tech. rep., http://www.protomatics.com/tsn1.html
Swift, J.: Travels into Several Remote Nations of the World. By Lemuel Gulliver (1726)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Quinot, T., Botcazou, E. (2013). Lady Ada Mediates Peace Treaty in Endianness War. In: Keller, H.B., Plödereder, E., Dencker, P., Klenk, H. (eds) Reliable Software Technologies – Ada-Europe 2013. Ada-Europe 2013. Lecture Notes in Computer Science, vol 7896. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38601-5_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-38601-5_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-38600-8
Online ISBN: 978-3-642-38601-5
eBook Packages: Computer ScienceComputer Science (R0)