-
|
Hello, I was reading the docs and came across this
The wording seems to be imply that single-letter identifiers are discouraged and the example suggests the same. What tipped me off is the fact that I've been using single-letters with no problem in my components thus far, just wanted to confirm that this isn't a minor mistake. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Good idea.
On 2023-11-03 08:51, mosfiend wrote:
Hello,
I was reading the docs [1] and came across this
> Single-letter identifiers are strongly discouraged, because they may
> clash with reserved keywords of some tools used internally by FRET
> (e.g., NuSMV).
The wording seems to be imply that single-letter identifiers are
discouraged while the example suggests that it's single-word
identifiers. I've been using single words with no problem thus far,
just wanted to confirm that this isn't a minor typo.
If it is, would you like me to open a PR?
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @mosfiend, Thank you for catching this! You are right. Single letter identifiers do not matter for component names, as component names don't end up in the produced formalizations. We are going to update the component.md documentation to remove this. However, we still discourage the use of upper case single-letter variable names in the mode, condition or response fields. In particular, uppercase single letters, like A, B, E, F, G, H, O, S, T, U, V ,X, Y, Z (as well as some multiletter reserved words like AG, EF); are reserved words in NuSMV and should be avoided. Lower case single letter variable names can be used. We have a new FRET release coming soon, in which we provide detailed documentation on this and have updated the FRET requirement parser to signal error if reserved word is used as a variable name. Thanks again! |
Beta Was this translation helpful? Give feedback.
Hi @mosfiend,
Thank you for catching this!
You are right. Single letter identifiers do not matter for component names, as component names don't end up in the produced formalizations. We are going to update the component.md documentation to remove this.
However, we still discourage the use of upper case single-letter variable names in the mode, condition or response fields. In particular, uppercase single letters, like A, B, E, F, G, H, O, S, T, U, V ,X, Y, Z (as well as some multiletter reserved words like AG, EF); are reserved words in NuSMV and should be avoided. Lower case single letter variable names can be used.
We have a new FRET release coming soon, in which we provide detailed doc…