Fret to Simulink A/G Contract #58
-
The abstraction level of FRETish language is really interesting and more suitable for engineers that are not familiar with temporal logic formalization. I have a couple of questions regarding FRETish, coupled with CoCoSim. I'm interested in the generation of simulink monitors starting from FRETish.
Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi Steve, Thanks for your interest in the FRET and CoCoSim tools! Here are my answers:
![]() Is this helpful? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Thank You for your quick and clear answer! I finally found everything, but I have still some issues. In particular, I've tried this simple requirement, without any mode or temporal constraint:
I have mapped airspeed as a double with output causality. I exported the mapped req with CocoSpec without coupling any model. I've installed lustrec and put all the executables in the Cocosim specific folder. Anyway, lustrec returns this error:
let Here, you can find the lus file generated by fret. i'm using fret v2.6 on a ubuntu 22.04. Do you have any hint or suggestion? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @StefanoCentomo , This is related to an issue with LustreC not accepting nodes with no inputs. We are currently looking into addressing this in FRET. For the time being, you can avoid this issue by introducing an input variable, either through a FRET requirement (also designating it as input in variable mapping), or by editing the node containing the FRET requirements in the resulting .lus file. For the latter, you'd need to open the .lus file, and change line 138 from
to
Best Regards, Andreas |
Beta Was this translation helpful? Give feedback.
Hi Stefano,
Looking at the new file, there are two issues that we have a fix for in the works. First of all
FTP
is defined as a variable but__FTP
is used in the requirement definitions. You'd need to edit the file so that eitherFTP
or__FTP
is used within the ComponentSpec node.The second issue is again related to LustreC. The first argument of the second call to node
OT
in guarantee 3 appears to be5-1
. This is not properly parsed by LustreC. To resolve it, either replace the expression by the resulting value (in this case the number 4) or by adding spaces before and after the subraction (i.e. change the expression to5 - 1
).Best Regards,
Andreas