UoY-RoboStar / robochart-textual

This repository contains the plugins for the RoboChart textual editor
Eclipse Public License 2.0
0 stars 1 forks source link

Add functions to compute input/output sets accounting for operations #45

Closed jameseb7 closed 2 years ago

jameseb7 commented 2 years ago

This adds functions stmOutputSetInContext() and stmInputSetInContext() to compute the inputs and outputs of a StateMachineBody in the context of its Controller, taking into account operations used by the state machine. It also applies them to the checking of Cn8 and Cn9, which resolves #40.

I added some tests to check that Cn8 and Cn9 catch errors correctly in ill-formed models. I realise there is still some debate over where the tests should go, but this branch currently builds against the operation-event-tests branch of the robochart-tests repository, with the test projects in a separate robochart-fail folder since they are projects that should have errors. Let me know if we want a different test structure. The tests are all run by Maven as part of the build process.

pefribeiro commented 2 years ago

Hi @jameseb7,

Thanks for this. This looks fine as far as I can tell. The only thing is that perhaps the 'System.out.println' debug statements could be omitted. I understand their role for debugging, but when working with Epsilon programs we already get a lot of redundant output from other plug-ins, so minimizing this could be useful in the future.

alvarohm commented 2 years ago

This all seems fine. At some point, we will need to make sure the changes to the tests repository are integrated with Pedro's changes and that the textual editor works with them. As far as I can see, it should not be a problem now. @pefribeiro what do you think?

pefribeiro commented 2 years ago

This all seems fine. At some point, we will need to make sure the changes to the tests repository are integrated with Pedro's changes and that the textual editor works with them. As far as I can see, it should not be a problem now. @pefribeiro what do you think?

I think it will be easy to merge in the future given that these tests are under a new folder 'robochart-fail' in https://github.com/UoY-RoboStar/robochart-tests/tree/operation-event-tests.

jameseb7 commented 2 years ago

The only thing is that perhaps the 'System.out.println' debug statements could be omitted. I understand their role for debugging, but when working with Epsilon programs we already get a lot of redundant output from other plug-ins, so minimizing this could be useful in the future.

Hi @pefribeiro,

Sorry about that, I removed some of the print statements I was using but forgot to remove those. I've added a commit removing that.

@alvarohm, if you're happy to proceed with the tests as they are then feel free to merge once the checks have finished.