CakeML / CakeML/cakeml

Refactor to use extended numerals.

Open
#1,167 1 comment 0 reactions 0 assignees View on GitHub
dev experience good first issue refactoring
Dominant language
Standard ML
Stars
1.2k
Forks
104
Avg merge
2d 21h
Merged PRs (30d)
16

Description

Cakeml currently uses `num option` in various places where an extended numeral is more appropriate.

for example in wordlang stack_size is a num option where NONE means the stack is unbounded.
This result in slightly unintuitive defintions written in ways like
`OPTION_MAP2 $+ a b`
option_le defined with `option_le SOME _ NONE`.
Proof are also harder where many just end up case splitting on the option.

On brief search in the HOL repo there appears to be
xnum developed in examples/HolCheck/ctlScript.sml.
That should probably be refactored out into a separate file + more syntax sugar to allow stuff like `0e` to be a `0 : xnum`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading examples/HolCheck/ctlScript.sml, where xnum is already developed, and inspect CakeML uses of num option such as wordlang stack_size. The issue suggests extracting xnum into a separate file and adding syntax such as 0e, but the required scope and completion criteria need to be settled first.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.