-
Notifications
You must be signed in to change notification settings - Fork 4
Home
FURY is a poor-by-blow of reliability concept
- reliability is expression of the consistency-of-a-set-of-measures
- reliability measures successful probability, i.e. 1 - probability-of-failure
- reliability (absence) played a role on the Mars Climate Orbiter disastermco
ergo reliability counts
FURY project started to respond to two questions:
- is a units-consistency-check facility (UCCF) a desirable feature for a programming language?
- is useful? or
- is dangerous?
- how it can be implemented in Fortran?
- is feasible?
These questions are generated by an inspiring Fortran Language Google Group discussion started by W. Van Snyder[rg]. They are really controversial: someone want UCCF to be a built-in feature in Fortran, others claim that such a feature is not useful at all or even dangerous just because it could add more space for errors than it could reduce (thus reducing the reliability).
Starting from an agnostic point of view, the FURY case study conveys us to think that a UCCF is a desirable feature for the next Fortran standards.
Moreover, the large experience borrowed from other programming languages, see references, proves that UCCF like features can be feasible in modern programming languages and they are of proved usefulness. As a consequence, FURY started to begin a fully featured, self-contained project that is presently usable for production-applications, even if the first comprehensive testing phase (of pre v1.0.0 bug-fix one) is still not completed.
FURY is the result of the tentative to respond the above questions:
FURY is a pure Fortran library providing a new set of types (the quantities) having a built-in units-consistency-check facility that is able to improve the reliability of physical computations. Moreover, FURY can perform symbolic math on units symbols.
FURY can do reliable math computations, preserving quantities dimensionality, checking consistency and propagating multiplicative scaling factors. For example, if you want to know how fast is Bolt you can do it with FURY, in a reliable way 😄
use, intrinsic :: iso_fortran_env, only : real64
use fury
type(uom) :: meter
type(uom) :: second
type(qreal) :: distance_to_arrival
type(qreal) :: time_to_arrival
type(qreal) :: mean_velocity
meter = uom('m = meter = metre [length] {meter}')
second = uom('s = sec = second [time] {second}')
distance_to_arrival = qreal(100._real64, meter)
time_to_arrival = qreal(9.58_real64, second)
mean_velocity = distance_to_arrival / time_to_arrival
print "(A)", 'Bolt''s record speed: '//mean_velocity%stringify(with_dimensions=.true.)
! print
! Bolt's record speed: +0.104384133611691E+002 m.s-1 [length.time-1]
FURY is based on a powerful parser of unit-of-measure (UOM) definitions: once a (set of) UOM is defined its scaling factor, symbol and dimensions are consistently checked, preserved and propagated in all computations. For set of UOMs with defined conversion-formulas FURY can check the consistency of all conversions. Eventually, if a quantity has a defined UOM, any tentative to assign it to another quantity with a different UOM will raise an error as well as for all inconsistent computations.
Home | About | Getting Started Guide | Usage | Copyright © 2016 szaghi