run OCL on models programmatically [message #1835192] |
Thu, 26 November 2020 12:28  |
Eclipse User |
|
|
|
Hi,
I am working on a DSL for writing test scenarios which will be executed on models conforming to different DSLs (e.g., FSM, BPMN, ...).
I want to add an OCL functionality to my test DSL in order to enable the tester to evaluate OCL queries on a model under test.
For instance, I want to simply validate the following OCL query on a Pertinent model:
petrinet.places -> select (p | p.tokens = '0')
and I expect to receive the following answer:
p1, p2, p3, p4
Using my test DSL, the test scenario will look like this:
Test Description petrinetTestUsingOCL uses configuration oclConfiguration{
tester.oclTestGate sends oclquery (query = "petrinet.places -> select (p | p.tokens = '0')")
to petrinet.oclMUTGate;
alternatively{
petrinet.oclMUTGate sends "p1, p2, p3, p4" to tester.oclTestGate;
set verdict to PASS;
} or{
set verdict to FAIL;
}
}
I've implemented an interpreter for my test DSL and for interpreting the above code, I need to programmatically run the OCL query on the intended Petrinet model, in fact, it is required that my interpreter be able to validate and execute OCL queries and check the answer.
I suppose this functionality can be possible using OCL Eclipse (using its provided APIs) but I don't know how and where to start.
Could anyone guide me please?
Bests,
Faezeh
|
|
|
|
|
Re: run OCL on models programmatically [message #1835209 is a reply to message #1835194] |
Fri, 27 November 2020 03:14  |
Eclipse User |
|
|
|
thank you for your quick response.
I will try it for sure, but the link you sent doesn't work (error 404).
could you please give me the right link, and also the references to the libraries (e.g., their documentation) that I will need for the implementation?
|
|
|
Powered by
FUDForum. Page generated in 0.02894 seconds