-
Notifications
You must be signed in to change notification settings - Fork 18
BMIv3: Extensions #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bmi-3-development
Are you sure you want to change the base?
BMIv3: Extensions #187
Changes from all commits
e3b2866
1f2c28f
6c146bb
e71f81d
1d998c9
27576b5
86fb07f
095526d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,63 @@ | ||||||
| (extensions)= | ||||||
|
|
||||||
| # BMI Extensions | ||||||
|
|
||||||
| An extension of BMI is identified by a unique name string. It could | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Describe reserved names and namespacing conventions below |
||||||
| encompass one or several of the following: | ||||||
|
|
||||||
| - Added functions exposed through extension objects that models export | ||||||
| via `get-extension-object` | ||||||
| - Variable sets that callers can expect models to publish | ||||||
| - Shared conventions of calling sequences or protocols around the use | ||||||
| of existing functions in core BMI or other extensions | ||||||
|
|
||||||
| Models implementing BMI are not required to support these extensions, | ||||||
| nor any others. | ||||||
|
|
||||||
|
|
||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Describe versioning practices or conventions in some fashion |
||||||
| ## Added Functions | ||||||
|
|
||||||
| Added functions in an extension must be expressed as members of an | ||||||
| {term}`extension object`. Models expose these extension objects via | ||||||
| `get-extension-object`. The name string should match the name of the | ||||||
| extension itself. If an extension needs to expose multiple distinct | ||||||
| objects, the name used for each should be an elaboration of the | ||||||
| extension's name. | ||||||
|
|
||||||
| The extension must specify the type signature of each extension object | ||||||
| it defines, with all of its members. For interoperability, develoeprs | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| are encouraged to use types and calling conventions that follow the | ||||||
| practices of core BMI. However, this standard also anticipates that | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indexed/numbered variables could help alleviate string ABI interoperability in implementing extensions in various languages. |
||||||
| extensions may be used to explicitly obtain functionality that is | ||||||
| specific to a programming language or platform. | ||||||
|
|
||||||
| ## Published Variable Sets | ||||||
|
|
||||||
| Extensions may define a variable set or sets that models and callers | ||||||
| can use to enrich their interactions. If a single name, it should | ||||||
| match that of the extension. Multiple names should each be an | ||||||
| elaboration of the extension's name. Extensions are free to define the | ||||||
| semantics of these sets as they please. | ||||||
|
|
||||||
| ## Shared Conventions and Protocols | ||||||
|
|
||||||
| Extensions may describe added constraints or enrished semantics for | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| how models and callers will interact using existing function in core | ||||||
| BMI or extensions they otherwise depend on. | ||||||
|
|
||||||
| ## Relationship of Standardized Extensions to developers and the BMI specification process | ||||||
|
|
||||||
| The extensions described here have been designed and adopted by the | ||||||
| BMI council. They are standardized to support a common, interoperable | ||||||
| ecosystem of models and callers. We encourage development of other | ||||||
| extensions, and recommend that they follow the practices of extensions | ||||||
| described here. The BMI council only intends to standardize key | ||||||
| extensions that it expects will be broadly applicable. Extensions that | ||||||
| build on BMI for niche use cases are encouraged, and do not require | ||||||
| the BMI council's endorsement. | ||||||
|
|
||||||
| Nevertheless, the council appreciates being told of substantial | ||||||
| extensions, to better understand BMI usage and inform subsequent | ||||||
| development. The council can potentially provide design guidance and | ||||||
| share related experience. Presentations about extensions can act as | ||||||
| an informal peer-reviewed venue. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per Austin, I need to specify that this is a pointer-to-pointer to a single output object, and not some sort of array.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type erased pointer, callers can reify them through
{static,dynamic,reinterpret}_castin C++, casating syntax in C, Ruststd::transmute, or Fortrantype(c_ptr). Python doesn't actually need anything special, since it's dynamically typed and dispatched anyway, but functions to get specific extensions could carry type hints to specify return of a particular extension object type.