core.typed

automatic pre- and post-conditions for unchecked code

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Currently it is fairly difficult to use core.typed to achieve/ensure production quality code. Often it happens that part of your own code does not pass the core.typed checker. Of course you can add the :no-check to your function, but in that case all type-checking is bypassed for this function and it can inject arbitrary data into the rest of your program (the type-signature is not enforced anymore.

It would be possible to prevent this issue if core.typed offered the opportunity to derive pre- and post-conditions based on the type-signature. This way unchecked code would use run-time checking as a fall-back scenario to prevent unchecked code could inject arbitrary data into the rest of your program (like the schema-library by prismatic, but using the core.typed annotations instead of schemas).
One step beyond would be to:
1. Use dynalint for the unchecked code (if this is possible)
2. Generate wrappers with pre- and post-conditions for external libaries.

Activity

Ambrose Bonnaire-Sergeant made changes -
Field Original Value New Value
Priority Major [ 3 ] Minor [ 4 ]
Ambrose Bonnaire-Sergeant made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Ambrose Bonnaire-Sergeant made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: