Gradual Liquid Type Inference

Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires top-level annotations, making it unsuitable for inference of modular code components and prohibiting its applicability to library code, and (2) i...

Full description

Saved in:
Bibliographic Details
Published inarXiv.org
Main Authors Vazou, Niki, Tanter, Éric, David Van Horn
Format Paper Journal Article
LanguageEnglish
Published Ithaca Cornell University Library, arXiv.org 30.10.2019
Subjects
Online AccessGet full text
ISSN2331-8422
DOI10.48550/arxiv.1807.02132

Cover

Abstract Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires top-level annotations, making it unsuitable for inference of modular code components and prohibiting its applicability to library code, and (2) inference failure results in obscure error messages. These difficulties seriously hamper the migration of existing code to use refinements. This paper shows that gradual liquid type inference---a novel combination of liquid inference and gradual refinement types---addresses both issues. Gradual refinement types, which support imprecise predicates that are optimistically interpreted, can be used in argument positions to constrain liquid inference so that the global inference process e effectively infers modular specifications usable for library components. Dually, when gradual refinements appear as the result of inference, they signal an inconsistency in the use of static refinements. Because liquid refinements are drawn from a nite set of predicates, in gradual liquid type inference we can enumerate the safe concretizations of each imprecise refinement, i.e. the static refinements that justify why a program is gradually well-typed. This enumeration is useful for static liquid type error explanation, since the safe concretizations exhibit all the potential inconsistencies that lead to static type errors. We develop the theory of gradual liquid type inference and explore its pragmatics in the setting of Liquid Haskell.
AbstractList Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires top-level annotations, making it unsuitable for inference of modular code components and prohibiting its applicability to library code, and (2) inference failure results in obscure error messages. These difficulties seriously hamper the migration of existing code to use refinements. This paper shows that gradual liquid type inference---a novel combination of liquid inference and gradual refinement types---addresses both issues. Gradual refinement types, which support imprecise predicates that are optimistically interpreted, can be used in argument positions to constrain liquid inference so that the global inference process e effectively infers modular specifications usable for library components. Dually, when gradual refinements appear as the result of inference, they signal an inconsistency in the use of static refinements. Because liquid refinements are drawn from a nite set of predicates, in gradual liquid type inference we can enumerate the safe concretizations of each imprecise refinement, i.e. the static refinements that justify why a program is gradually well-typed. This enumeration is useful for static liquid type error explanation, since the safe concretizations exhibit all the potential inconsistencies that lead to static type errors. We develop the theory of gradual liquid type inference and explore its pragmatics in the setting of Liquid Haskell.
Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires top-level annotations, making it unsuitable for inference of modular code components and prohibiting its applicability to library code, and (2) inference failure results in obscure error messages. These difficulties seriously hamper the migration of existing code to use refinements. This paper shows that gradual liquid type inference---a novel combination of liquid inference and gradual refinement types---addresses both issues. Gradual refinement types, which support imprecise predicates that are optimistically interpreted, can be used in argument positions to constrain liquid inference so that the global inference process e effectively infers modular specifications usable for library components. Dually, when gradual refinements appear as the result of inference, they signal an inconsistency in the use of static refinements. Because liquid refinements are drawn from a nite set of predicates, in gradual liquid type inference we can enumerate the safe concretizations of each imprecise refinement, i.e. the static refinements that justify why a program is gradually well-typed. This enumeration is useful for static liquid type error explanation, since the safe concretizations exhibit all the potential inconsistencies that lead to static type errors. We develop the theory of gradual liquid type inference and explore its pragmatics in the setting of Liquid Haskell.
Author David Van Horn
Tanter, Éric
Vazou, Niki
Author_xml – sequence: 1
  givenname: Niki
  surname: Vazou
  fullname: Vazou, Niki
– sequence: 2
  givenname: Éric
  surname: Tanter
  fullname: Tanter, Éric
– sequence: 3
  fullname: David Van Horn
BackLink https://doi.org/10.1145/3276502$$DView published paper (Access to full text may be restricted)
https://doi.org/10.48550/arXiv.1807.02132$$DView paper in arXiv
BookMark eNotj0FLwzAYhoMoOOd-gAex4Ln1y_clTXqU4eag4KX3kiwJdMy0S624f-_cPL2Xh5fnuWPXsY-esQcOhdBSwotJP913wTWoApATXrEZEvFcC8RbthjHHQBgqVBKmrHHdTJuMvus7g5T57LmOPhsE4NPPm79PbsJZj_6xf_OWbN6a5bvef2x3ixf69xIVLkMFZcmVMYKoOAElEE4zkMw2im0yCtX-mCtJpBktShN5QxthdVgpZKe5uzpcnt2b4fUfZp0bP8a2nPDiXi-EEPqD5Mfv9pdP6V4cmoRFCkgoRT9ArpsSXw
ContentType Paper
Journal Article
Copyright 2019. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
http://arxiv.org/licenses/nonexclusive-distrib/1.0
Copyright_xml – notice: 2019. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
– notice: http://arxiv.org/licenses/nonexclusive-distrib/1.0
DBID 8FE
8FG
ABJCF
ABUWG
AFKRA
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
HCIFZ
L6V
M7S
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
AKY
GOX
DOI 10.48550/arxiv.1807.02132
DatabaseName ProQuest SciTech Collection
ProQuest Technology Collection
Materials Science & Engineering Collection
ProQuest Central (Alumni)
ProQuest Central UK/Ireland
ProQuest Central Essentials - QC
ProQuest Central
Technology Collection
ProQuest One Community College
ProQuest Central
SciTech Premium Collection
ProQuest Engineering Collection
Engineering Database
ProQuest Central Premium
ProQuest One Academic
Publicly Available Content Database
ProQuest One Academic Middle East (New)
ProQuest One Academic Eastern Edition (DO NOT USE)
ProQuest One Applied & Life Sciences
ProQuest One Academic
ProQuest One Academic UKI Edition
ProQuest Central China
Engineering Collection
arXiv Computer Science
arXiv.org
DatabaseTitle Publicly Available Content Database
Engineering Database
Technology Collection
ProQuest One Academic Middle East (New)
ProQuest Central Essentials
ProQuest One Academic Eastern Edition
ProQuest Central (Alumni Edition)
SciTech Premium Collection
ProQuest One Community College
ProQuest Technology Collection
ProQuest SciTech Collection
ProQuest Central China
ProQuest Central
ProQuest One Applied & Life Sciences
ProQuest Engineering Collection
ProQuest One Academic UKI Edition
ProQuest Central Korea
Materials Science & Engineering Collection
ProQuest Central (New)
ProQuest One Academic
ProQuest One Academic (New)
Engineering Collection
DatabaseTitleList
Publicly Available Content Database
Database_xml – sequence: 1
  dbid: GOX
  name: arXiv.org
  url: http://arxiv.org/find
  sourceTypes: Open Access Repository
– sequence: 2
  dbid: 8FG
  name: ProQuest Technology Collection
  url: https://search.proquest.com/technologycollection1
  sourceTypes: Aggregation Database
DeliveryMethod fulltext_linktorsrc
Discipline Physics
EISSN 2331-8422
ExternalDocumentID 1807_02132
Genre Working Paper/Pre-Print
GroupedDBID 8FE
8FG
ABJCF
ABUWG
AFKRA
ALMA_UNASSIGNED_HOLDINGS
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
FRJ
HCIFZ
L6V
M7S
M~E
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
AKY
GOX
ID FETCH-LOGICAL-a527-5f915af9ab403fd406f4d11ffa8d72b219d6efbb83053b846a9da3c4b80b575e3
IEDL.DBID BENPR
IngestDate Wed Jul 23 01:58:22 EDT 2025
Mon Jun 30 09:29:35 EDT 2025
IsDoiOpenAccess true
IsOpenAccess true
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a527-5f915af9ab403fd406f4d11ffa8d72b219d6efbb83053b846a9da3c4b80b575e3
Notes SourceType-Working Papers-1
ObjectType-Working Paper/Pre-Print-1
content type line 50
OpenAccessLink https://www.proquest.com/docview/2073703477?pq-origsite=%requestingapplication%&accountid=15518
PQID 2073703477
PQPubID 2050157
ParticipantIDs arxiv_primary_1807_02132
proquest_journals_2073703477
PublicationCentury 2000
PublicationDate 20191030
PublicationDateYYYYMMDD 2019-10-30
PublicationDate_xml – month: 10
  year: 2019
  text: 20191030
  day: 30
PublicationDecade 2010
PublicationPlace Ithaca
PublicationPlace_xml – name: Ithaca
PublicationTitle arXiv.org
PublicationYear 2019
Publisher Cornell University Library, arXiv.org
Publisher_xml – name: Cornell University Library, arXiv.org
SSID ssj0002672553
Score 1.7064573
SecondaryResourceType preprint
Snippet Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires...
Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires...
SourceID arxiv
proquest
SourceType Open Access Repository
Aggregation Database
SubjectTerms Annotations
Computer Science - Programming Languages
Enumeration
Inference
Migration
SummonAdditionalLinks – databaseName: arXiv.org
  dbid: GOX
  link: http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwdV09T8MwED21nVgQCFALLcrAahEnTuKMCFEK4mMpUrbIl7OlLAjSFvHzOTupGBCrdR6e7bt3J-veAVw1SlKpcxRMho1QVFj2OdcImSSlsylhHIb2Pb_kqzf1WGXVCKJ9L4zpvtuvXh8YN9dSe4XBhCumMYw5UfDNvK9V_zkZpLgG-187zjHD0p_QGvhieQSHQ6IX3fQ3cwwj-34Ci_vO-Oan6Kn93LUU-Sowetj33J3Cenm3vl2JYUCBMFlSiMyVMjOuNKji1BFTo1MkpXNGU5EgxwLKrUPU7FMpMtGbkkzaKNQxcpZk0zOYcI1vpxARepEdgygLUpZIK6Im5qrX5EY1Ss9gGmDVH70GRe0R1wHxDOZ7pPXw_jZ1wp7LvqyK4vz_nRdwwPRfhkgcz2Gy7XZ2wRS7xctwzj9R6HrN
  priority: 102
  providerName: Cornell University
Title Gradual Liquid Type Inference
URI https://www.proquest.com/docview/2073703477
https://arxiv.org/abs/1807.02132
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwfV07T8MwED6VRkhsPNVCW3VgDcSJkzgDQgL1AaKlQkXqFtk-W-rSR9oiJn47tpvAgMRiKc50fnx3Pvu-D-BaUoIZS4RvnKH0KabK7DktfRKGmVYRisCJ9o3GyfCdPs_iWQ3GVS2MfVZZYaIDalxKmyO3mZDIrE6apvertW9Vo-ztaiWhwUtpBbxzFGMH4IWWGasO3kNvPHn7ybqESWpi6Gh_venIvG558Tn_uCHMchmGxMqQeK7rDzg7j9M_Bm_CV6o4gZpanMKhe6gpN2fQHhTclk91X-br3Ry79hzZfaqq9s5h2u9NH4d-KXHg8zhM_VhnJOY644IGkUbjXDVFQrTmDNNQGDTBRGkhmNmVkTChAs-QR5IKFggTZ6noAuqL5UI1oIvC0vRwIUiKVCEyiigDc27mCaeSsiY0nFn5as9ikVuLc2dxE1qVpXm5gjf573hf_v_7Co5MEJE5PA9aUN8WO9U2jnorOnDA-oNOOQfma_A6M-3oq_cNKIaVKQ
linkProvider ProQuest
linkToHtml http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV3JTsMwEB2VRghurGqhhRzgGMjibIcKCWhp6aIKFam3yM7YUi9d0pbl4_g3bDeBAxK3XmMp0tN4_GbGnnkAVylxMI4CZkkyTC2CIZc-J1LLcd1YcA-ZrUX7-oOg_Uqex_64BF9FL4x6VlmcifqgxlmqauSqEuLJ3UnC8G6-sJRqlLpdLSQ0aC6tgA09Yixv7Ojyz3eZwi0bnUdp72vXbTVHD20rVxmwqO-Gli9ix6cipozYnkDJb4Kg4whBIwxdJh0aAy4Yi6RjeEyyNY2Reilhkc1kqMM9-dsdMIhHYpn7GffNwfDlp8jjBqEM2b3NbaqeHXZLs4_J240TqdGJrqNUTwz96Q8XaIJrHYAxpHOeHUKJT49gV78LTZfHUH_KqOrWMnuTxXqCpkpbzU7RJHgCo21gPYXydDblFTCRqalAlDEnRMIRI4KY2jJNpwElKYmqUNGwkvlmaEaiECcacRVqBdIkd5hl8mves_-XL2GvPer3kl5n0D2HfRm_xJpK7BqUV9ma12WMsGIXuSVMSLZs-29hBs7z
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Gradual+Liquid+Type+Inference&rft.jtitle=arXiv.org&rft.au=Vazou%2C+Niki&rft.au=Tanter%2C+%C3%89ric&rft.au=David+Van+Horn&rft.date=2019-10-30&rft.pub=Cornell+University+Library%2C+arXiv.org&rft.eissn=2331-8422&rft_id=info:doi/10.48550%2Farxiv.1807.02132