Skip to content

Adds lower and upper bound function blocks#2046

Merged
azoitl merged 1 commit intoeclipse-4diac:developfrom
franz-hoepfinger-4diac:d2
Jan 30, 2026
Merged

Adds lower and upper bound function blocks#2046
azoitl merged 1 commit intoeclipse-4diac:developfrom
franz-hoepfinger-4diac:d2

Conversation

@franz-hoepfinger-4diac
Copy link
Copy Markdown
Contributor

Introduces F_LOWER_BOUND and F_UPPER_BOUND XML configurations
to compute the lower and upper bounds of array dimensions.
Includes event inputs/outputs and variable declarations
for precise functionality.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 23, 2026

Test Results

  110 files  ±0    110 suites  ±0   1m 6s ⏱️ -4s
6 108 tests ±0  6 108 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 109 runs  ±0  6 109 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ae9abcf. ± Comparison against base commit 0f31d38.

This pull request removes 29 and adds 11 tests. Note that renamed tests count towards both.

 
  *
  Multi-line comment
 Multi-line comment
 comment *)->
 comment */->
(*
*)
*/
…
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 10: (*
 Multi-line comment
*)
s := "Hello   World!";
->s:="Hello   World!";
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 11: /*
 Multi-line comment
*/
s := "Hello   World!";
->s:="Hello   World!";
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 15: whitespace at the end 
->whitespace at the end
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 22: test unclosed multine comment
(*
  Multi-line comment
  *
->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 23: test unclosed multine comment
(*
  Multi-line comment

->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 24: test unclosed multine comment
/*
  Multi-line comment
  *
->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 25: test unclosed multine comment
/*
  Multi-line comment

->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 5: (* This is a multi-line 
 
 comment *)->
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 6: /* This is a multi-line 
 
 comment */->
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 8: // This is a single-line  
test->test
…

♻️ This comment has been updated with latest results.

@franz-hoepfinger-4diac
Copy link
Copy Markdown
Contributor Author

ANY_INT as OUT seems unwise here. Better UINT ? right ?

@MartinMelikMerkumians
Copy link
Copy Markdown
Member

As upper and lower array bounds could be either positive or negative and in general larger than the range of UINT, ANY_INT is the correct choice

@diplfranzhoepfinger
Copy link
Copy Markdown
Contributor

As upper and lower array bounds could be either positive or negative and in general larger than the range of UINT, ANY_INT is the correct choice

I agree. now i have to learn, how do we handle a ANY_INT on the FORTE Level.

@azoitl azoitl requested a review from mx990 January 26, 2026 19:30
Copy link
Copy Markdown
Member

@mx990 mx990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these should be part of the iec61131-3 standard library, since both are defined in the IEC 61131-3 standard. I am not sure in which folder/package, however, since they are defined separately in section 6.5.3. Maybe selection would be a good fit?

Comment thread data/typelibrary/convert-3.0.0/typelib/F_LOWER_BOUND.fbt Outdated
Comment thread data/typelibrary/convert-3.0.0/typelib/F_UPPER_BOUND.fbt Outdated
Copy link
Copy Markdown
Member

@mx990 mx990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase your branch to remove the unrelated commit.

Comment thread data/typelibrary/iec61131-3-3.0.0/typelib/selection/F_LOWER_BOUND.fbt Outdated
Comment thread data/typelibrary/iec61131-3-3.0.0/typelib/selection/F_UPPER_BOUND.fbt Outdated
Introduces F_LOWER_BOUND and F_UPPER_BOUND XML configurations
to compute the lower and upper bounds of array dimensions.
Includes event inputs/outputs and variable declarations
for precise functionality.

v

.
@mx990 mx990 requested a review from azoitl January 30, 2026 08:12
@azoitl azoitl merged commit 1ba5714 into eclipse-4diac:develop Jan 30, 2026
4 checks passed
@franz-hoepfinger-4diac
Copy link
Copy Markdown
Contributor Author

@MartinMelikMerkumians should this stay in "selection" or move to "Array" ?

@MartinMelikMerkumians
Copy link
Copy Markdown
Member

@MartinMelikMerkumians should this stay in "selection" or move to "Array" ?

I didn't want to challenge an already merged PR. If it was already agreed that it is selection, then it's ok for me. If its open for discussion, I would move it to a dedicated array functions package.

Any opinions @azoitl @mx990 ?

@diplfranzhoepfinger
Copy link
Copy Markdown
Contributor

as we need to touch it anyhow, we could move it ! ?

@mx990
Copy link
Copy Markdown
Member

mx990 commented Apr 9, 2026

After thinking some more on this, I also believe we should move it to a dedicated array package, since it does not really fit well in any existing one.

@azoitl
Copy link
Copy Markdown
Contributor

azoitl commented Apr 9, 2026

I was a bit reluctant to change this but as the two blocks where anyhow not usable as the 4diac FORTE implementation is missing I also agree to move to the array package.

@franz-hoepfinger-4diac
Copy link
Copy Markdown
Contributor Author

I was a bit reluctant to change this but as the two blocks where anyhow not usable as the 4diac FORTE implementation is missing I also agree to move to the array package.

Here you go:
#2373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants