Consider more precise sorts for `IO` hooks

Open
#3,986 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by locating the IO hook declarations and their documentation, then trace both successful and failed return paths. The work is done when successful returns use a specific KUnit sort and each failure value has a documented specific sort instead of K.

Written by the indexing model from the issue text.

Description

A number of the IO hooks are declared with return-sort K and documented as returning .K on success.

This is imprecise, as sort K is the top sort and could refer to any possible term, while in reality we only ever return the .K value. We should instead follow the standard PL convention and return some KUnit sort containing a single constructor.

It appears that some of the IO hooks return other values on failure, but it's not documented what those specific values are. They should also be given a specific sort rather than thrown into K.

Dominant language
Python
Stars
591
Forks
163
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from runtimeverification/k

All issues in runtimeverification/k

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.