You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add non standard EDG floating point types [GH #357] - #461
Reviewing files that changed from the base of the PR and between cc40804 and a921864.
Files selected for processing: 12
dev_tools/pylibs/edgifc/spec_files/0.44.json
src/ifc_map.h
src/ifc_map_functions.c
src/ifc_map_functions.h
src/ifc_map_functions_acc.c
src/ifc_map_functions_dbg.c
src/ifc_map_functions_mut.c
src/ifc_map_functions_val.c
src/ifc_modules_inst.h
src/ifc_modules_read.c
src/ifc_modules_spec.h
src/ifc_modules_write.c
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
IFC 0.44 adds an EDG floating-point type sort and node for seven extended floating-point kinds. The compiler maps these kinds to the new node when writing IFC and resolves the node to front-end float types when reading IFC.
Changes: EDG floating-point type support
Layer / File(s)
Summary
IFC 0.44 float type contracts dev_tools/pylibs/edgifc/spec_files/0.44.json, src/ifc_map.h, src/ifc_map_functions.h, src/ifc_modules_inst.h, src/ifc_modules_spec.h
The IFC 0.44 spec and map declarations add the float sort, type index, node, and partition, with storage and helper declarations.
IFC encoding and node access src/ifc_map_functions.c, src/ifc_map_functions_acc.c, src/ifc_map_functions_mut.c
Conversion and node helpers handle the 0.44 float sort and index, partition sizing, and node kind access and mutation. Extension values use 0.44 representations for module files at version 0.44 or later and retain 0.43 representations for older files.
IFC validation and diagnostics src/ifc_map_functions_val.c, src/ifc_map_functions_dbg.c
Validation checks the new sorts, indices, and node kind. Diagnostic dispatch prints the float node.
EDG float type reading src/ifc_modules_read.c
The reader resolves float extensions to front-end float types and updates placeholder and type-cache handling for these extensions.
EDG float type writing src/ifc_modules_write.c
The writer maps seven extended float kinds to EDG extension sorts and writes them as EdgTypeFloat nodes.
sequenceDiagram
participant ILFloatKind
participant an_ifc_il_map
participant EdgTypeFloatPartition
ILFloatKind->>an_ifc_il_map: enter_float_type(kind)
an_ifc_il_map->>an_ifc_il_map: float_kind_to_edg_float_type(kind)
an_ifc_il_map->>EdgTypeFloatPartition: allocate node and store sort
Loading
Possibly related issues
[E-IFC] Complete Floating Point Type Support #357: Requests support for EDG IL float types through a new IFC EdgFloatType extension type; this change adds the corresponding float sort and extension node.
Possibly related PRs
edgcpp/compiler#315: Adds IFC support for standard extended floating-point kinds and identifies non-standard kinds as requiring an EDG extension type; this change implements that extension path.
Suggested reviewers:wchilders-nvidia, darkarc
Merge Risk: Minimal · up to a9218
No actionable issue remains identified for the new floating-point type support. The PR is mergeable after normal checks.
Security architecture risk: Low · up to a9218
The new floating-point representation follows the existing module validation path, and the inspected reader and writer preserve the seven type identities. No security regression was demonstrated. Compatibility and interrupted-output recovery were not fully established.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — If an attacker can supply an imported IFC file, the inspected exposure is its interpretation into types within the consuming compiler process. This path does not demonstrate a new authority transfer; deployment-wide or multi-tenant consequences were not established.
Trust Boundaries and Controls
observed — The new direct float dispatch retains the existing import boundary: construct_node checks the expected partition, validates node contents and withholds invalid results. Float resolution does not receive an accepted node when this construction fails.
Resilience and Maintainability Implications
observed — The reader caches validation state, marks invalid nodes and invalidates the token cache when extended-type resolution returns no type. These mechanisms contain ordinary malformed-reference failures rather than reusing them as valid float types.
observed — The writer registers the allocated type index before initializing its kind through an explicit conversion and field copy. This establishes an intermediate in-memory state, but the inspected evidence does not show concurrent publication or recoverable reuse of that state after interruption.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly describes the main change: adding non-standard EDG floating-point types. It is concise and specific.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit