Download presentation
Presentation is loading. Please wait.
1
Visualizing Type Error Messages Allison Thompson CSCI 5535 Spring 2010
2
Motivation This expression has type int but is here used with type float This expression has type my_type but is here used with type my_type
3
Outline Motivation Tools: Processing and S EMINAL ViSeR Conclusion
4
Outline Motivation Tools: Processing and S EMINAL ViSeR Conclusion
5
Pros and Cons of Processing Easy Didn’t require learning new language Free Based on Java 1.4.2 (limited) Does not always run very fast Visualization can take 4-5 sec to load; then 4-5 for each refresh
6
S EMINAL : Searching for Error Messages IN Advanced Languages Enumerate local changes to abstract syntax tree that may remove type errors Search for places to try changes Use type checker to evaluate changes Rank changes and present to user
7
S EMINAL Results: ------------------------------------------------------------------ File "test1.ml", line 1, characters 4-7: This expression has type float but is here used with type int Relevant code: 2.5 ------------------------------------------------------------------ File "test1.ml", line 1, characters 4-7: Try replacing 2.5 with 2.5; [[...]] of type int within context 1 + (2.5; [[...]]);; ============================== File "test1.ml", line 1, characters 2-3: Try replacing + with +; [[...]] of type int -> float -> 'a within context (1 +; [[...]] 2.5);; ============================== 1 + 2.5;; File "test1.ml", line 1, characters 4-7: Try replacing 2.5 with 2.5; [[...]] of type int within context 1 + (2.5; [[...]]);; wildcard replacement with type int
8
Outline Motivation Tools: Processing and S EMINAL ViSeR Conclusion
9
ViSeR: Visualization for Seminal Results Goals: Put Seminal suggestions in context with some form of helpful visualization Minimize need for user to learn new symbols/etc – improve usability and understandability Avoid re-introducing confusion: This expression has type int but is here used with type float
10
ViSeR: Examples and Screenshots 1 + 2.5;; This expression has type int but is here used with type float File "test1.ml", line 1, characters 4-7: Try replacing 2.5 with 2.5; [[...]] of type int within context 1 + (2.5; [[...]]);; wildcard replacement with type int
11
ViSeR: Examples and Screenshots This expression has type my_type but it used with type my_type Multiple definition of the type name my_type. Names must be unique in a given structure or signature. ocamlc
12
ViSeR: Examples and Screenshots actual error error location according to OCaml This expression has type int but is here used with type float
13
Outline Motivation Tools: S EMINAL and Processing ViSeR Conclusion
14
Conclusion Success? Put S EMINAL results in context Provide improvement in usability Remaining Issues/Future Work ViSeR as a tool is limited/slow Several situations doesn’t cover; doesn’t gracefully handle proper compilation 4-5 seconds for some visualizations is too slow ✓ ✗
15
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.