Skip to content

Conversation

@C8R15T14N
Copy link

@C8R15T14N C8R15T14N commented Apr 21, 2025

  • Haskell Syntax Test: Clusters syntax errors of haskell submissions using a regex-based approach.
  • Haskell Runtime Test:
    - Test case generator and editor to create runtime tests for Haskell tasks
    - Clusters haskell submissions based on the runtime test results.

C8R15T14N and others added 16 commits April 21, 2025 14:02
- implementation missing, marked with TODO@CHW and will be similar as in docker test
- view: HaskellRuntimeTestManagerView (based on DockerTestManagerOverView)
- controller: HaskellRuntimeTestManager (based on DockerTestManager)
Conflicts during rebase:
	src/main/java/de/tuclausthal/submissioninterface/persistence/dao/TestDAOIf.java
	src/main/java/de/tuclausthal/submissioninterface/persistence/dao/impl/TestDAO.java
	src/main/java/de/tuclausthal/submissioninterface/servlets/controller/TestManager.java
@csware
Copy link
Owner

csware commented Apr 21, 2025

Wouldn't an extension/property to the DockerTest be a better approach to not duplicate a lot of code?

- DockerTestManager now also handles case of HaskellRuntimeTest (since HaskellRuntimeTest is a specialization of DockerTest)
- HaskellRuntimeTestManager is kept for consistency (it is the corresponding controller servlet of HaskellRuntimeTestManagerView)
@C8R15T14N
Copy link
Author

Wouldn't an extension/property to the DockerTest be a better approach to not duplicate a lot of code?

Regarding the Haskell Runtime Test:

  • The view servlet HaskellRuntimeTestManagerView currently contains duplicated code. I'm already working on automating the test case definition process, which involves rewriting most of this servlet. These changes are not included in this pull request.
  • The duplicated code in the corresponding controller servlet HaskellRuntimeTestManager can indeed be avoided (new commit b9865a1).
  • In all other places (persistence/datamodel/HaskellRuntimeTest and testframework/tests/impl/HaskellRuntimeTest), HaskellRuntimeTest already inherits from DockerTest. I agree, that the Haskell Runtime Test should extend the existing functionality of the Docker Test.

@esat553
Copy link

esat553 commented Apr 24, 2025

Wouldn't an extension/property to the DockerTest be a better approach to not duplicate a lot of code?

Regarding the Haskell Syntax Test:

HaskellSyntaxTest now extends the a modularaized version of DockerTest and thereby uses already defined functions hopefully this will reduce code duplicates.

@csware
Copy link
Owner

csware commented Apr 25, 2025

I was curious whether a new attribute for the dockertest may already solve the issue. Such attribute could later also be used to selected different images.

@C8R15T14N
Copy link
Author

There seems to be an issue (I just have the exception in the logs):

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at de.tuclausthal.submissioninterface.servlets.controller.HaskellRuntimeTestManager.getGhciDefaultTypeSignature(HaskellRuntimeTestManager.java)
    at de.tuclausthal.submissioninterface.servlets.controller.HaskellRuntimeTestManager.browseModelSolutionAndStoreClassifiedIdentifiers(HaskellRuntimeTestManager.java)
    at de.tuclausthal.submissioninterface.servlets.controller.HaskellRuntimeTestManager.doPost(HaskellRuntimeTestManager.java)?

Prof. Kinder also informed me about it, thank you! I'm already working on it.

@C8R15T14N
Copy link
Author

There seems to be an issue (I just have the exception in the logs):

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at de.tuclausthal.submissioninterface.servlets.controller.HaskellRuntimeTestManager.getGhciDefaultTypeSignature(HaskellRuntimeTestManager.java:500)
    at de.tuclausthal.submissioninterface.servlets.controller.HaskellRuntimeTestManager.browseModelSolutionAndStoreClassifiedIdentifiers(HaskellRuntimeTestManager.java:222)
    at de.tuclausthal.submissioninterface.servlets.controller.HaskellRuntimeTestManager.doPost(HaskellRuntimeTestManager.java:108)

This should be fixed now. The error occured since the ghci version on the testserver was slightly newer and produced a different output when browsing the haskell file.

@C8R15T14N
Copy link
Author

@csware The code is ready to be deployed from my side.

@C8R15T14N
Copy link
Author

@csware Now that the institute servers are running again, have all changes up to (at least) commit b1327e7 been deployed? (I'm planning to evaluate the user interface for creating a HaskellRuntimeTest)

@C8R15T14N C8R15T14N changed the title Cluster haskell syntax errors using regex Haskell Syntax Test and Haskell Runtime Test for Common Error Clustering Aug 23, 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.

3 participants