SlideShare a Scribd company logo
Understandable and
Useful Error Messages
for Liquid Types
Alcides Fonseca, Catarina Gamboa, João David,
Guilherme Espada, Paulo Canelas
Funded by FCT projects:

UIDB/00408/2020, UIDP/00408/2020

LISBOA-01-0247-FEDER-045915 and

EXPL/CCI-COM/1306/2021
GOAL
Complaining about how hard it is to produce useful
error messages for:

• LiquidHaskell

• Aeon

• LiquidJava

• MLVP

Suggestions to improve error messages
2
80%
20%
LIQUID TYPES
• Base Types: int, bool,
fl
oat, ...

• Re
fi
nement Types: {x:Int | x > 3}

• Dependent Types: (x:Int) -> {y:Int | y > x}
3
https://ucsd-progsys.github.io/liquidhaskell-blog/
CHALLENGES
4
• Everything in the context may be relevant

• Developers need to select what may
be relevant

• There is a lot of redundancy (e.g., len v >
0 && len v >= 0)
• Developers need to
fi
lter relevant
assertions
• To understand errors, developers need to
simulate the logical implications from the
context.
• Developers are doing the work of the
SMT solver!
CHALLENGES
5
• Liquid Type Checking relies heavily
on rewrites:

• Internal rewrite to ANF

• Re
fi
nements renamed in
function calls
AEON
6
def minimizeGoal(m:Int) -> r:Bool | m > -10 {
fi
b(m) > 30
}
def f(i:Int, j:Int) -> k:Int | k > I+j and minimizeGoal(k) {
??
}
Alcides Fonseca, Paulo Santos, and Sara Silva. "The Usability Argument for Refinement Typed Genetic Programming." International Conference on Parallel Problem
Solving from Nature. Springer, Cham, 2020.
SMT-based Program Synthesis
Fitness Function for
Property-Based Testing
?? :: {k:Int | k > I+j && k > -10}
Another indirection layer!
LIQUIDJAVA
7
@Re
fi
nement("x > 10")
int x = 11;
x = x - 1;
Catarina Gamboa, Paulo Canelas, Christopher Timperley, Alcides Fonseca. "User-driven design and evaluation of Liquid Types in Java." HATRA @ SPLASH 2021
Another indirection layer in the context!
Context:
x_global | x_global > 10
x_local_1 | x_local_1 == 11
x_local_2 | x_local_2 == x_local - 1
x == 11 - 1 → x > 10
MLVP
8
Many indirection layers!
IDEAS FOR IMPROVEMENT
1. Show only relevant context

2. Substitute useless variables

3. Simplify redundant assertions

4. Evidence the minimal failing assertion

5. Allow to interactively expand the context

6. Evidence assertion provenance (colors?)
9
INSPIRATION
10
Lean 4 VSCode Extension
INSPIRATION
11
Tesla Zhang (https://twitter.com/OwoTizusa/status/1424159921172410372)
INSPIRATION
12
Tesla Zhang (https://twitter.com/OwoTizusa/status/1396787442015817730)
Understandable and
Useful Error Messages
for Liquid Types
Alcides Fonseca👨💻 , Catarina Gamboa👩🔬, João David,
Guilherme Espada👨🔬, Paulo Canelas👨💻

More Related Content

Similar to Understandable and Useful Error Messages for Liquid Types

Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...
Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...
Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...
Ambassador Labs
 
Unit 2 Java
Unit 2 JavaUnit 2 Java
Unit 2 Java
arnold 7490
 
Clipper: A Low-Latency Online Prediction Serving System
Clipper: A Low-Latency Online Prediction Serving SystemClipper: A Low-Latency Online Prediction Serving System
Clipper: A Low-Latency Online Prediction Serving System
Databricks
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
Trayan Iliev
 
Swift Parallel Scripting for High-Performance Workflow
Swift Parallel Scripting for High-Performance WorkflowSwift Parallel Scripting for High-Performance Workflow
Swift Parallel Scripting for High-Performance Workflow
Daniel S. Katz
 
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and CascadingBoulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Paco Nathan
 
Python. Finance. Excel. - The Thalesians
Python. Finance. Excel. - The ThalesiansPython. Finance. Excel. - The Thalesians
Python. Finance. Excel. - The Thalesians
xlwings
 
Inria - Software assets - Energy
Inria - Software assets - EnergyInria - Software assets - Energy
Inria - Software assets - Energy
Inria
 
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
HostedbyConfluent
 
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
jsvetter
 
ALM iStack - Application Lifecycle Management using Linked Data
ALM iStack - Application Lifecycle Management using Linked Data ALM iStack - Application Lifecycle Management using Linked Data
ALM iStack - Application Lifecycle Management using Linked Data
Nandana Mihindukulasooriya
 
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
Make Mannan
 
Summer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet EngineeringSummer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet Engineering
Jácome Cunha
 
10 Key Criteria for Mobile Platform Selection
10 Key Criteria for Mobile Platform Selection10 Key Criteria for Mobile Platform Selection
10 Key Criteria for Mobile Platform Selection
Jason Haygood
 
Venkat_Resume_Updated
Venkat_Resume_UpdatedVenkat_Resume_Updated
Venkat_Resume_Updated
Venkatram Reddy Sripathi
 
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, ParisSOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
OW2
 
Venkat_Resume_Updated
Venkat_Resume_UpdatedVenkat_Resume_Updated
Venkat_Resume_Updated
Venkatram Reddy Sripathi
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2
bdemchak
 
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling�Clotho: Saving Programs from Malformed Strings and Incorrect String-handling�
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling
Cybersecurity Education and Research Centre
 
Unevenly Distributed
Unevenly DistributedUnevenly Distributed
Unevenly Distributed
C4Media
 

Similar to Understandable and Useful Error Messages for Liquid Types (20)

Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...
Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...
Microservices Practitioner Summit Jan '15 - Don't Build a Distributed Monolit...
 
Unit 2 Java
Unit 2 JavaUnit 2 Java
Unit 2 Java
 
Clipper: A Low-Latency Online Prediction Serving System
Clipper: A Low-Latency Online Prediction Serving SystemClipper: A Low-Latency Online Prediction Serving System
Clipper: A Low-Latency Online Prediction Serving System
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
 
Swift Parallel Scripting for High-Performance Workflow
Swift Parallel Scripting for High-Performance WorkflowSwift Parallel Scripting for High-Performance Workflow
Swift Parallel Scripting for High-Performance Workflow
 
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and CascadingBoulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
Boulder/Denver BigData: Cluster Computing with Apache Mesos and Cascading
 
Python. Finance. Excel. - The Thalesians
Python. Finance. Excel. - The ThalesiansPython. Finance. Excel. - The Thalesians
Python. Finance. Excel. - The Thalesians
 
Inria - Software assets - Energy
Inria - Software assets - EnergyInria - Software assets - Energy
Inria - Software assets - Energy
 
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
 
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
Exploring Emerging Technologies in the Extreme Scale HPC Co-Design Space with...
 
ALM iStack - Application Lifecycle Management using Linked Data
ALM iStack - Application Lifecycle Management using Linked Data ALM iStack - Application Lifecycle Management using Linked Data
ALM iStack - Application Lifecycle Management using Linked Data
 
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
 
Summer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet EngineeringSummer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet Engineering
 
10 Key Criteria for Mobile Platform Selection
10 Key Criteria for Mobile Platform Selection10 Key Criteria for Mobile Platform Selection
10 Key Criteria for Mobile Platform Selection
 
Venkat_Resume_Updated
Venkat_Resume_UpdatedVenkat_Resume_Updated
Venkat_Resume_Updated
 
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, ParisSOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
 
Venkat_Resume_Updated
Venkat_Resume_UpdatedVenkat_Resume_Updated
Venkat_Resume_Updated
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2
 
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling�Clotho: Saving Programs from Malformed Strings and Incorrect String-handling�
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling
 
Unevenly Distributed
Unevenly DistributedUnevenly Distributed
Unevenly Distributed
 

More from Alcides Fonseca

Programar para GPUs
Programar para GPUsProgramar para GPUs
Programar para GPUs
Alcides Fonseca
 
Future Programming Languages
Future Programming LanguagesFuture Programming Languages
Future Programming Languages
Alcides Fonseca
 
Django
DjangoDjango
Workshop Git
Workshop GitWorkshop Git
Workshop Git
Alcides Fonseca
 
Usabilidade
UsabilidadeUsabilidade
Usabilidade
Alcides Fonseca
 
XMPP - Beyond IM
XMPP - Beyond IMXMPP - Beyond IM
XMPP - Beyond IM
Alcides Fonseca
 
Introdução Web
Introdução WebIntrodução Web
Introdução Web
Alcides Fonseca
 
O Futuro Da Web
O Futuro Da WebO Futuro Da Web
O Futuro Da Web
Alcides Fonseca
 
Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008
Alcides Fonseca
 
Ejaki
EjakiEjaki

More from Alcides Fonseca (10)

Programar para GPUs
Programar para GPUsProgramar para GPUs
Programar para GPUs
 
Future Programming Languages
Future Programming LanguagesFuture Programming Languages
Future Programming Languages
 
Django
DjangoDjango
Django
 
Workshop Git
Workshop GitWorkshop Git
Workshop Git
 
Usabilidade
UsabilidadeUsabilidade
Usabilidade
 
XMPP - Beyond IM
XMPP - Beyond IMXMPP - Beyond IM
XMPP - Beyond IM
 
Introdução Web
Introdução WebIntrodução Web
Introdução Web
 
O Futuro Da Web
O Futuro Da WebO Futuro Da Web
O Futuro Da Web
 
Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008Linguagens Dinamicas - Tech Days 2008
Linguagens Dinamicas - Tech Days 2008
 
Ejaki
EjakiEjaki
Ejaki
 

Recently uploaded

mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốtmô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
HongcNguyn6
 
bordetella pertussis.................................ppt
bordetella pertussis.................................pptbordetella pertussis.................................ppt
bordetella pertussis.................................ppt
kejapriya1
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
pablovgd
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
Gokturk Mehmet Dilci
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx
Sharon Liu
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
Sérgio Sacani
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
yqqaatn0
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
PRIYANKA PATEL
 
Oedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptxOedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptx
muralinath2
 
Medical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptxMedical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptx
terusbelajar5
 
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
David Osipyan
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
by6843629
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
IshaGoswami9
 
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptxThe use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
MAGOTI ERNEST
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
Sérgio Sacani
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
University of Maribor
 

Recently uploaded (20)

mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốtmô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
 
bordetella pertussis.................................ppt
bordetella pertussis.................................pptbordetella pertussis.................................ppt
bordetella pertussis.................................ppt
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
 
Oedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptxOedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptx
 
Medical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptxMedical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptx
 
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
 
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptxThe use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
 

Understandable and Useful Error Messages for Liquid Types

  • 1. Understandable and Useful Error Messages for Liquid Types Alcides Fonseca, Catarina Gamboa, João David, Guilherme Espada, Paulo Canelas Funded by FCT projects: UIDB/00408/2020, UIDP/00408/2020 LISBOA-01-0247-FEDER-045915 and EXPL/CCI-COM/1306/2021
  • 2. GOAL Complaining about how hard it is to produce useful error messages for: • LiquidHaskell • Aeon • LiquidJava • MLVP
 Suggestions to improve error messages 2 80% 20%
  • 3. LIQUID TYPES • Base Types: int, bool, fl oat, ... • Re fi nement Types: {x:Int | x > 3} • Dependent Types: (x:Int) -> {y:Int | y > x} 3 https://ucsd-progsys.github.io/liquidhaskell-blog/
  • 4. CHALLENGES 4 • Everything in the context may be relevant • Developers need to select what may be relevant • There is a lot of redundancy (e.g., len v > 0 && len v >= 0) • Developers need to fi lter relevant assertions • To understand errors, developers need to simulate the logical implications from the context. • Developers are doing the work of the SMT solver!
  • 5. CHALLENGES 5 • Liquid Type Checking relies heavily on rewrites: • Internal rewrite to ANF • Re fi nements renamed in function calls
  • 6. AEON 6 def minimizeGoal(m:Int) -> r:Bool | m > -10 { fi b(m) > 30 } def f(i:Int, j:Int) -> k:Int | k > I+j and minimizeGoal(k) { ?? } Alcides Fonseca, Paulo Santos, and Sara Silva. "The Usability Argument for Refinement Typed Genetic Programming." International Conference on Parallel Problem Solving from Nature. Springer, Cham, 2020. SMT-based Program Synthesis Fitness Function for Property-Based Testing ?? :: {k:Int | k > I+j && k > -10} Another indirection layer!
  • 7. LIQUIDJAVA 7 @Re fi nement("x > 10") int x = 11; x = x - 1; Catarina Gamboa, Paulo Canelas, Christopher Timperley, Alcides Fonseca. "User-driven design and evaluation of Liquid Types in Java." HATRA @ SPLASH 2021 Another indirection layer in the context! Context: x_global | x_global > 10 x_local_1 | x_local_1 == 11 x_local_2 | x_local_2 == x_local - 1 x == 11 - 1 → x > 10
  • 9. IDEAS FOR IMPROVEMENT 1. Show only relevant context 2. Substitute useless variables 3. Simplify redundant assertions 4. Evidence the minimal failing assertion 5. Allow to interactively expand the context 6. Evidence assertion provenance (colors?) 9
  • 13. Understandable and Useful Error Messages for Liquid Types Alcides Fonseca👨💻 , Catarina Gamboa👩🔬, João David, Guilherme Espada👨🔬, Paulo Canelas👨💻