skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Emulating multiple inheritance in Fortran 2003/2008

Abstract

Although the high-performance computing (HPC) community increasingly embraces object-oriented programming (OOP), most HPC OOP projects employ the C++ programming language. Until recently, Fortran programmers interested in mining the benefits of OOP had to emulate OOP in Fortran 90/95. The advent of widespread compiler support for Fortran 2003 now facilitates explicitly constructing object-oriented class hierarchies via inheritance and leveraging related class behaviors such as dynamic polymorphism. Although C++ allows a class to inherit from multiple parent classes, Fortran and several other OOP languages restrict or prohibit explicit multiple inheritance relationships in order to circumvent several pitfalls associated with them. Nonetheless, what appears as an intrinsic feature in one language can be modeled as a user-constructed design pattern in another language. The present paper demonstrates how to apply the facade structural design pattern to support a multiple inheritance class relationship in Fortran 2003. As a result, the design unleashes the power of the associated class relationships for modeling complicated data structures yet avoids the ambiguities that plague some multiple inheritance scenarios.

Authors:
 [1]
  1. Sandia National Lab. (SNL-CA), Livermore, CA (United States)
Publication Date:
Research Org.:
Sandia National Laboratories (SNL), Albuquerque, NM, and Livermore, CA (United States); Sandia National Lab. (SNL-CA), Livermore, CA (United States)
Sponsoring Org.:
USDOE National Nuclear Security Administration (NNSA)
OSTI Identifier:
1197680
Alternate Identifier(s):
OSTI ID: 1214234; OSTI ID: 1320516
Report Number(s):
SAND2016-8334J
Journal ID: ISSN 1058-9244; PII: 126069; 126069
Grant/Contract Number:  
AC04-94AL85000
Resource Type:
Journal Article: Published Article
Journal Name:
Scientific Programming
Additional Journal Information:
Journal Volume: 2015; Journal ID: ISSN 1058-9244
Publisher:
Hindawi
Country of Publication:
United States
Language:
English
Subject:
97 MATHEMATICS AND COMPUTING

Citation Formats

Morris, Karla. Emulating multiple inheritance in Fortran 2003/2008. United States: N. p., 2015. Web. doi:10.1155/2015/126069.
Morris, Karla. Emulating multiple inheritance in Fortran 2003/2008. United States. doi:10.1155/2015/126069.
Morris, Karla. Sat . "Emulating multiple inheritance in Fortran 2003/2008". United States. doi:10.1155/2015/126069.
@article{osti_1197680,
title = {Emulating multiple inheritance in Fortran 2003/2008},
author = {Morris, Karla},
abstractNote = {Although the high-performance computing (HPC) community increasingly embraces object-oriented programming (OOP), most HPC OOP projects employ the C++ programming language. Until recently, Fortran programmers interested in mining the benefits of OOP had to emulate OOP in Fortran 90/95. The advent of widespread compiler support for Fortran 2003 now facilitates explicitly constructing object-oriented class hierarchies via inheritance and leveraging related class behaviors such as dynamic polymorphism. Although C++ allows a class to inherit from multiple parent classes, Fortran and several other OOP languages restrict or prohibit explicit multiple inheritance relationships in order to circumvent several pitfalls associated with them. Nonetheless, what appears as an intrinsic feature in one language can be modeled as a user-constructed design pattern in another language. The present paper demonstrates how to apply the facade structural design pattern to support a multiple inheritance class relationship in Fortran 2003. As a result, the design unleashes the power of the associated class relationships for modeling complicated data structures yet avoids the ambiguities that plague some multiple inheritance scenarios.},
doi = {10.1155/2015/126069},
journal = {Scientific Programming},
number = ,
volume = 2015,
place = {United States},
year = {Sat Jan 24 00:00:00 EST 2015},
month = {Sat Jan 24 00:00:00 EST 2015}
}

Journal Article:
Free Publicly Available Full Text
Publisher's Version of Record at 10.1155/2015/126069

Save / Share: