Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighten up management of specifier IDs #197

Closed
3 tasks done
bocchino opened this issue Nov 15, 2022 · 1 comment
Closed
3 tasks done

Tighten up management of specifier IDs #197

bocchino opened this issue Nov 15, 2022 · 1 comment
Assignees
Labels
bug Something isn't working semantics Issues related to semantics spec Issues related to the FPP language specification
Milestone

Comments

@bocchino
Copy link
Collaborator

bocchino commented Nov 15, 2022

IDs and opcodes have two issues:

  1. The spec says they can't be negative, but sometimes the implementation lets negative numbers through. E.g.:
[I] bocchino@MT-306179 ~> cat test.fpp
module Fw {
  port Log
  port LogText
  port Time
}

passive component C {
  event port eventOut
  time get port timeGetOut
  text event port textEventOut
  event E severity activity high id -1 format "Event E happened"
}
[I] bocchino@MT-306179 ~> fpp-check test.fpp
[I] bocchino@MT-306179 ~> 
  1. Per FPP Integer Limitations #198 we should use BigInt instead of Int to represent integer values that don't have specified bounds.

There are other miscellaneous issues involving integer bounds. E.g., parsing a large integer in a floating-point format shouldn't cause a crash.

  • Revise implementation
  • Add unit tests
  • Revise spec to bound integers that are implemented as Int, e.g., port numbers
@bocchino bocchino added the bug Something isn't working label Nov 15, 2022
@bocchino bocchino added this to the C++ Ports milestone Nov 15, 2022
@bocchino bocchino self-assigned this Nov 15, 2022
@bocchino bocchino added semantics Issues related to semantics spec Issues related to the FPP language specification labels Dec 4, 2022
@bocchino
Copy link
Collaborator Author

bocchino commented Dec 5, 2022

Done in commit 2970af4.

@LeStarch FYI. This fix will go into the v1.2.0 release that includes C++ port generation. Tiffany has completed FPP development for that release and is working on the F Prime functional unit tests.

@bocchino bocchino closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semantics Issues related to semantics spec Issues related to the FPP language specification
Projects
None yet
Development

No branches or pull requests

1 participant