skip to main content
10.1145/3147704.3147715acmotherconferencesArticle/Chapter ViewAbstractPublication PageseuroplopConference Proceedingsconference-collections
research-article

Physical Quantity: Towards a Pattern Language for Quantities and Units in Physical Calculations

Authors Info & Claims
Published:12 July 2017Publication History

ABSTRACT

In this paper an approach is taken towards a pattern language for physical quantities in software applications. The central pattern, Physical Quantity, is described as well as some needed candidate patterns revolving around. The Physical Quantity design pattern is a specialized version of the Quantity analysis pattern, optimized for the SI unit system. It is intended for the physical and mathematical domains where calculations, arithmetic, conversion and simulations are the most used functionalities. Its emphasis is on type safety, dimensional analysis, performance, and convenient syntax. Supporting candidate patterns for handling tolerances, validation, conversion or matrix operations are shortly described. The target audiences are software engineers and practitioners working in the area of physical simulations and calculations.

References

  1. BIPM. 2006. The International System of Units (SI) (8th ed.). 186 pages.Google ScholarGoogle Scholar
  2. Frank Buschmann, Kevlin Henney, and Douglas Schmidt. 2007. Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing. 639 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C2. 2011. Canonical Form. (2011). http://wiki.c2.com/?CanonicalFormGoogle ScholarGoogle Scholar
  4. Darren Dale. 2011. Quantities. (2011). http://pythonhosted.org/quantities/Google ScholarGoogle Scholar
  5. Enthought. 2011. Scimath Documentation. (2011). http://scimath.readthedocs.io/en/latest/Google ScholarGoogle Scholar
  6. Martin Fowler. 1996a. Analysis Patterns: Reusable Object Models. Addison-Wesley Professional. 384 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Martin Fowler. 1996b. Money. (1996). https://www.martinfowler.com/eaaCatalog/money.htmlGoogle ScholarGoogle Scholar
  8. Martin Fowler. 1997. Quantity. (1997).Google ScholarGoogle Scholar
  9. Erich Gamma, Richard Helm, Ralph E. Johnson, and John Vlissides. 1995. Design Patterns - Elements of Reusable Object-Oriented Software (1 ed.). Addison-Wesley, Boston, USA. 395 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. James Geoffrey. 1987. The Tao Of Programming. (1987). http://canonical.org/ Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. David Goldberg. 1991. What every computer scientist should know about floating-point arithmetic. Vol. 23. 5--48 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Stefan Hausberger, Martin Rexeis, Raphael Luz, Christian Kreiner, Michael Krisper, Markus Quaritsch, Philipp Gretzl, and Helmut Eichlseder. 2016. VECTO tool development. (2016).Google ScholarGoogle Scholar
  13. Nicholas J Higham. 2002. Accuracy and Stability of Numerical Algorithms. 1--663 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. ISO. 2009. ISO:80000-1:2009. (2009). https://www.iso.org/obp/ui/\#iso:std:iso:80000:-1:ed-1:v1:enGoogle ScholarGoogle Scholar
  15. JScience. 2011. JScience. (2011). http://jscience.org/Google ScholarGoogle Scholar
  16. William Kahan. 1996. IEEE Standard 754 for Binary Floating-Point Arithmetic. University of California, Berkeley May 1995 (1996), 1--30.Google ScholarGoogle Scholar
  17. William Kahan. 2001. Why do we need a floating-point arithmetic standard? (2001).Google ScholarGoogle Scholar
  18. Werner Keil. 2017. UOMSI. (2017). http://uom.siGoogle ScholarGoogle Scholar
  19. Andrew Kennedy. 2008. Units of Measure in F#. (2008). https://blogs.msdn.microsoft.com/andrewkennedy/2008/08/29/units-of-measure-in-f-part-one-introducing-units/Google ScholarGoogle Scholar
  20. Antonius Kies, Martin Rexeis, Gerard Silberholz, Raphael Luz, and Stefan Hausberger. 2013. Options to consider future advanced fuel- saving technologies in the CO2 test procedure for HDV. Technical Report. Forschungsgesellschaft für Verbrennungskraftmaschinen und Thermodynamik mbH. 108 pages.Google ScholarGoogle Scholar
  21. Andreas Gullberg Larsen. 2017. Units.Net. (2017). https://github.com/anjdreas/UnitsNetGoogle ScholarGoogle Scholar
  22. Chris MacLeod and Pierre Denis. 2013. Units in Python. (2013). https://pypi.python.org/pypi/UnumGoogle ScholarGoogle Scholar
  23. Josh Mafu. 2013. NGenericDimensions™. (2013). http://ngenericdimensions.codeplex.comGoogle ScholarGoogle Scholar
  24. Scott Meyers. 2004. The Most Important Design Guideline? In IEEE Software, Martin Fowler (Ed.). 14--16. http://www.aristeia.com/Papers/IEEE Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Microsoft. 2012. FSPowerPack.Community. (2012). https://www.nuget.org/packages/FSPowerPack.CommunityGoogle ScholarGoogle Scholar
  26. Microsoft. 2014. The Old F# "PowerPack". (2014). http://fsharppowerpack.codeplex.com/Google ScholarGoogle Scholar
  27. Microsoft. 2016. Units of Measure (F#). (2016). https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measureGoogle ScholarGoogle Scholar
  28. Keith Nicewarner. 2013. The Units of Measure Library. (2013). http://tuoml.sourceforge.netGoogle ScholarGoogle Scholar
  29. NIST. 2008. SP811 - Guide for the Use of the International System of Units (SI). Technical Report.Google ScholarGoogle Scholar
  30. NIST. 2009. Derived Units, Outside the SI. (2009). http://physics.nist.gov/cuu/Units/outside.htmlGoogle ScholarGoogle Scholar
  31. Gordon S. Novak. 1995. Conversion of units of measurement. IEEE Transactions on Software Engineering 21, 8 (1995), 651--661. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Steve Pemberton. 2015. F# Units of Measure - A Worked Example. (2015). http://stevenpemberton.net/blog/2015/03/11/FSharp-Units-Of-Measure/Google ScholarGoogle Scholar
  33. Eric S. Raymond. 2004. The art of Unix programming. Addison-Wesley. 525 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. John F. Reiser and Donald E. Knuth. 1975. Evading the drift in floating-point addition. Inform. Process. Lett. 3, 3 (1975), 84--87.Google ScholarGoogle ScholarCross RefCross Ref
  35. Matthias C. Schabel. 2010. Boost.Units 1.1.0. (2010). http://www.boost.org/doc/libs/1_55_0/doc/html/boost_units.htmlGoogle ScholarGoogle Scholar
  36. Gernot Schmoelzer, Christian Kreiner, Zsolt Kovacs, and Michael Thonhauser. 2006. Reflective, Model-Based Data Access with the Type-Safe Entity Container. In 30th Annual International Computer Software and Applications Conference (COMP-SAC'06), Vol. 2. 87--92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Almas Shaikh, Chris Senior, Jean-Marie Dautelle, Karen Legrand, Leonardo Lima, Martin Desruisseaux, Mohamed Taman, Otavio Santana, Rajmahendra Hedge, and Werner Keil. 2016. JSR 363 Units of Measurement. (2016), 1--45.Google ScholarGoogle Scholar
  38. Markus Voelter, Daniel Ratiu, Bernhard Schaetz, and Bernd Kolb. 2012. mbeddr: an Extensible C-based Programming Language and IDE for Embedded Systems. (2012). http://voelter.de/data/pub/wavefront-updatedSubmission2.pdfGoogle ScholarGoogle Scholar
  39. James H. Wilkinson. 1994. Rounding Errors in Algebraic Processes (reprint ed.). Dover Publications. 161 pages. https://www.amazon.com/Rounding-Errors-Algebraic-Processes-Wilkinson/dp/0486679993 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Scott Wlaschin. 2012. Units of measure - Type safety for numerics. (2012). https://fsharpforfunandprofit.com/posts/units-of-measure/Google ScholarGoogle Scholar
  41. J.W. Yoder, F. Balaguer, and Ralph Johnson. 2000. From analysis to design of the observation pattern. (2000), 18. http://www.joeyoder.com/Research/metadata/Observation/ObservationModel.pdfGoogle ScholarGoogle Scholar

Index Terms

  1. Physical Quantity: Towards a Pattern Language for Quantities and Units in Physical Calculations

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        EuroPLoP '17: Proceedings of the 22nd European Conference on Pattern Languages of Programs
        July 2017
        566 pages
        ISBN:9781450348485
        DOI:10.1145/3147704

        Copyright © 2017 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 12 July 2017

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed limited

        Acceptance Rates

        EuroPLoP '17 Paper Acceptance Rate34of53submissions,64%Overall Acceptance Rate216of354submissions,61%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader