-
Notifications
You must be signed in to change notification settings - Fork 4
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
CAST handling of MATLAB conditional logic #613
Merged
Merged
Conversation
This file contains 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
jastier
changed the title
Jastier/cast conditional logic
Jastier/matlab_conditional_logic
Nov 1, 2023
vincentraymond-ua
approved these changes
Nov 1, 2023
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.
@jastier - Looks good!
github-actions bot
added a commit
that referenced
this pull request
Nov 1, 2023
## MATLAB conditional logic added to CAST parser This PR fixes the if statement handler in `matlab_to_cast.py`. We now fully support `if elseif else` conditional logic of arbitrary depth in MATLAB. - One `if` statement is always included - Zero or more `elseif` clauses can be included - Zero or one `else` clause can be included ## Relevant issues Completes issue #593 Partially completes issue #561 --------- Co-authored-by: Joseph Astier <[email protected]> Co-authored-by: Vincent Raymond <[email protected]> a66fba6
Merged
jastier
added a commit
that referenced
this pull request
Nov 1, 2023
## CAST test upgrades This PR includes some test utilities for use when testing CAST output, so common tests such as an assignment or an expression can be done as single function calls. Some debug scripts are now executables. Minor edits and code cleanup ## What's New - Added `skema/program_analysis/CAST/matlab/tests/utils.py` with functions for common testing tasks - Added 3 conditional logic tests: `if` `if else` `if elseif else` ## Relevant issues Related to PR #613 and #583 --------- Co-authored-by: Joseph Astier <[email protected]>
github-actions bot
added a commit
that referenced
this pull request
Nov 1, 2023
## CAST test upgrades This PR includes some test utilities for use when testing CAST output, so common tests such as an assignment or an expression can be done as single function calls. Some debug scripts are now executables. Minor edits and code cleanup ## What's New - Added `skema/program_analysis/CAST/matlab/tests/utils.py` with functions for common testing tasks - Added 3 conditional logic tests: `if` `if else` `if elseif else` ## Relevant issues Related to PR #613 and #583 --------- Co-authored-by: Joseph Astier <[email protected]> 77c96cb
jastier
changed the title
MATLAB conditional logic
CAST handling of MATLAB conditional logic
Nov 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
MATLAB conditional logic added to CAST parser
This PR fixes the if statement handler in
matlab_to_cast.py
. We now fully supportif elseif else
conditional logic of arbitrary depth in MATLAB.if
statement is always includedelseif
clauses can be includedelse
clause can be includedRelevant issues
Completes issue #593
Partially completes issue #561