Skip to content

Conversation

yutaro-sakamoto
Copy link
Contributor

This pull request implements system routine C$SLEEP`.

@yutaro-sakamoto yutaro-sakamoto marked this pull request as ready for review June 19, 2025 02:24
@Copilot Copilot AI review requested due to automatic review settings June 19, 2025 02:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the system routine C$SLEEP to add a delay feature in the COBOL runtime. Key changes include:

  • Adding test cases for prog1 and prog2 that verify C$SLEEP delays program execution.
  • Implementing C$SLEEP in the Java runtime and updating system definitions.
  • Updating Makefiles and test include files to register the new system routine.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/run.src/system-routines.at New test cases for verifying the C$SLEEP behavior in COBOL programs.
tests/run.at Inclusion of the system-routines test file.
tests/Makefile.in Updated Makefile dependency list to include system-routines.
tests/Makefile.am Updated Makefile dependency list to include system-routines.
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java Added implementation of C$SLEEP in the runtime.
cobj/typeck.c Removed the obsolete handling for C$SLEEP to route it to the new implementation.
cobj/system.def Updated system routine mapping to register the new C$SLEEP implementation.
Comments suppressed due to low confidence (2)

tests/run.src/system-routines.at:21

  • The sleep duration is set to 4 seconds in the test but the check only requires a delay of at least 2 seconds. Consider updating the check to better align with the expected delay for more accurate test coverage.
test $duration -ge 2], [0],

libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java:146

  • Verify that the hardcoded parameter value '3' is correct for C$SLEEP, given that only the first parameter is used. Clarifying this may help maintain future modifications.
        CobolUtil.COB_CHK_PARMS("C$SLEEP", 3);

@yutaro-sakamoto yutaro-sakamoto merged commit b420a19 into opensourcecobol:develop Jun 20, 2025
139 checks passed
@yutaro-sakamoto yutaro-sakamoto mentioned this pull request Jun 30, 2025
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.

2 participants