Copilot-Language / copilot

A stream-based runtime-verification framework for generating hard real-time C code.
http://copilot-language.github.io
618 stars 49 forks source link

`copilot-core`: record field `uTypeType` is unnecessary #484

Open ivanperez-keera opened 6 months ago

ivanperez-keera commented 6 months ago

Description

The record field uTypeType, part of Copilot.Core.Type.UType, is never really used within the module or in any other part of Copilot or, as far as we know, by any user of Copilot. As a matter of fact, we cannot use it to obtain the value inside the UType due to the existential it encloses. It also makes the test report lower coverage than they otherwise might, since the record access function is not used by the tests.

This field is not necessary parts of the interface to use Copilot, and not required by Copilot's requirements. Therefore, it would be suitable to remove that definitions from the module.

As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, those definitions should be deprecated.

Type

Additional context

None.

Requester

Method to check presence of bug

The field is mentioned in the record definition, but making it a non-record datatype, or not exporting that field in the module exports, does not change the behavior and does not otherwise affect Copilot.

The code compiles without errors and behaves in the same way:

Expected result

The following elements are deprecated:

Desired result

The following elements are deprecated:

Proposed solution

Deprecate the following functions:

Further notes

None.