ucsd-progsys / ucsd-progsys/liquidhaskell
Decide which is the correct default refinement for GHC.Num and GHC.Real./
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 164
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
According to this piece of code in findAndParseSpecFiles, the Real.spec is loaded by default, unless the --linear flag is explicitly set (the default is linear = False, though):
patSpec <- liftIO $ getPatSpec modGraph paths $ totalityCheck cfg
rlSpec <- liftIO $ getRealSpec modGraph paths $ not (linear cfg)
-- and later on
...
getRealSpec :: ModuleGraph -> S.HashSet FilePath -> Bool -> IO [FilePath]
getRealSpec modGraph paths freal
| freal = moduleFiles modGraph Spec paths [realSpecName]
| otherwise = moduleFiles modGraph Spec paths [notRealSpecName]
where
realSpecName = "Real"
notRealSpecName = "NotReal"
@nikivazou found this surprising, as she thought the correct default was NotReal instead. We should review what we are doing here to be sure we are doing the right thing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Language/Haskell/Liquid/GHC/Interface.hs at findAndParseSpecFiles and getRealSpec, then inspect how the --linear setting selects Real or NotReal. Compare the two refinement files and existing uses of the default to determine which behavior is correct; done means the default choice is resolved and the issue's requested correction is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100