Exploring Types and DSL Tools in Lectures

Goals of my lectures
A way of adding types
DSL-making “tools”
Another DSL example
 
Goals of my lectures
A way of adding types
DSL-making “tools”
Another DSL example
 
Last time:
type-of, type=?, assign-type
define-type
check-type
#%datum
add1
This time:
#%app
lambda
Type constructors
Type checking types
Goals of my lectures
A way of adding types
DSL-making “tools”
Another DSL example
 
Last time (basic):
syntax-parse
Syntax objects
Syntax properties
Interposition: 
#%app
, 
#%datum
Today (deep end):
Phasing
Pattern expanders
Id macros
Syntax classes
Definition contexts
Goals of my lectures
A way of adding types
DSL-making “tools”
Another DSL example
Next time
Id macros are tricky!
 
Racket macro expansion algorithm:
For syntax object 
#’(x y z)
:
If 
x
 is macro
Pass 
#’(x y z) 
to syntax transformer registered as macro 
x
Else
Pass 
#’(#%app x y z) 
to 
#%app 
macro
Ambiguity: what if 
x
 = id macro that expands to 
add1
We want to invoke 
x
 macro on just 
x
,
but algorithm doesn’t do that
Slide Note
Embed
Share

Delve into the realm of types and Domain-Specific Language (DSL) tools through various examples and discussions in academic lectures. The journey includes understanding, defining, and checking types to enhance knowledge and skills in DSL-making processes.

  • Types
  • DSL tools
  • Academic lectures
  • Syntax objects
  • Macro expansion

Uploaded on Oct 07, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Goals of my lectures A way of adding types DSL-making tools Another DSL example

  2. Goals of my lectures A way of adding types DSL-making tools Another DSL example Last time: type-of, type=?, assign-type define-type check-type #%datum add1 This time: #%app lambda Type constructors Type checking types

  3. Goals of my lectures A way of adding types DSL-making tools Another DSL example Last time (basic): syntax-parse Syntax objects Syntax properties Interposition: #%app, #%datum Today (deep end): Phasing Pattern expanders Id macros Syntax classes Definition contexts

  4. Goals of my lectures A way of adding types DSL-making tools Another DSL example Next time

  5. Id macros are tricky! Racket macro expansion algorithm: For syntax object # (x y z): If x is macro Pass # (x y z) to syntax transformer registered as macro x Else Pass # (#%app x y z) to #%app macro Ambiguity: what if x = id macro that expands to add1 We want to invoke x macro on just x, but algorithm doesn t do that

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#