Skip to content
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

Add GroMEt iterator to MATLAB CAST Loop #725

Open
jastier opened this issue Dec 8, 2023 · 1 comment
Open

Add GroMEt iterator to MATLAB CAST Loop #725

jastier opened this issue Dec 8, 2023 · 1 comment
Assignees
Labels
lang/MATLAB Used for work related to MATLAB frontend

Comments

@jastier
Copy link
Contributor

jastier commented Dec 8, 2023

Add GroMEt iterator to MATLAB CAST Loop

When composing CAST Loops from MATLAB, create the loop iterator using GroMEt function nodes for:

  • iterator
  • start
  • stop
  • step
@jastier jastier added the lang/MATLAB Used for work related to MATLAB frontend label Dec 8, 2023
@jastier jastier added this to the [DARPA] Milestone 11 milestone Dec 8, 2023
@jastier jastier self-assigned this Dec 8, 2023
@jastier jastier changed the title Add GroMEt calls for MATLAB CAST objects Add GroMEt iterator to MATLAB CAST Loop Dec 14, 2023
@jastier
Copy link
Contributor Author

jastier commented Jan 19, 2024

Current status: In development
Source file: skema/skema/program_analysis/CAST/matlab/matlab_to_cast.py
Test file: skema/skema/program_analysis/CAST/matlab/tests/test_loop.py
Method: visit_iterator()
Notes: This still needs GroMEt-specific iterator calls, but is otherwise completed. There are three pytest cases, these are turned off.

@myedibleenso myedibleenso removed this from the [DARPA] Milestone 11 milestone Feb 6, 2024
titomeister added a commit that referenced this issue Feb 12, 2024
## MATLAB to GroMEt testing
This PR adds GroMEt translation to all pytest cases in the Tree-Sitter
MATLAB translator. This was done as part of the fix for a bug that was
happening when generating Model Coverage Reports. The CAST to GroMEt
converter was reporting correctly that the "list" type is not supported,
switching to the corresponding enumeration fixed that issue.

## Relavant Features:
- Each pytest case now includes GroMEt translation.
- Got rid of some outdated static method typing calls.
- `LiteralValue `data types are now CAST enumerations instead of
hard-coded strings.
- Removed the handler for `Range `Tree-sitter syntax nodes, these nodes
are managed by iterator routines
- Turned off the pytest series related to loops temporarily

Related to issue #725 
Partially resolves issue #764

---------

Co-authored-by: Joseph Astier <[email protected]>
Co-authored-by: Tito Ferra <[email protected]>
Co-authored-by: titomeister <[email protected]>
github-actions bot added a commit that referenced this issue Feb 12, 2024
## MATLAB to GroMEt testing
This PR adds GroMEt translation to all pytest cases in the Tree-Sitter
MATLAB translator. This was done as part of the fix for a bug that was
happening when generating Model Coverage Reports. The CAST to GroMEt
converter was reporting correctly that the "list" type is not supported,
switching to the corresponding enumeration fixed that issue.

## Relavant Features:
- Each pytest case now includes GroMEt translation.
- Got rid of some outdated static method typing calls.
- `LiteralValue `data types are now CAST enumerations instead of
hard-coded strings.
- Removed the handler for `Range `Tree-sitter syntax nodes, these nodes
are managed by iterator routines
- Turned off the pytest series related to loops temporarily

Related to issue #725
Partially resolves issue #764

---------

Co-authored-by: Joseph Astier <[email protected]>
Co-authored-by: Tito Ferra <[email protected]>
Co-authored-by: titomeister <[email protected]> 159d40e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/MATLAB Used for work related to MATLAB frontend
Projects
None yet
Development

No branches or pull requests

2 participants