You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for debugging the space/time behaviour I want to know, for each case, how often it was happening on known data, and how often on unknown data. Of course "known" is better since it does not require encoding and merging.
logging: collect this information (while the abstract program is running) and print it in a suitable form
checking: I want to put some annotation in the source that says "this case should ONLY be executed on known data"
as long as we don't have the "modes" system, if such an annotation is present, CO4 does not generate code for matching unknown data and merging the results, but instead emits code that will throw an exception.
The text was updated successfully, but these errors were encountered:
instead of case x of ... allow to write case known x of where
semantically known = id
but for compiling: only generate the code for the case that the constructor is statically known (will throw an exception if this is not the case, exception should contain line number or similar)
come to think of it - this known x could be put anywhere (not just under the case) and it will just check (at runtime) that the top constructor indeed is known.
148c8a6 provides assertKnown and assertDefined with the given semantics (the name known is already taken by the allocators). Both functions require import CO4.Prelude.
for debugging the space/time behaviour I want to know, for each
case
, how often it was happening on known data, and how often on unknown data. Of course "known" is better since it does not require encoding and merging.case
should ONLY be executed on known data"as long as we don't have the "modes" system, if such an annotation is present, CO4 does not generate code for matching unknown data and merging the results, but instead emits code that will throw an exception.
The text was updated successfully, but these errors were encountered: