Le mardi 26 mai 2020 21:45:21 UTC+2, johnbclements a écrit :
>
> In your case, the type checker would also be “resolving” lightweight 
> expressions like (assign (h1 a) a) into fully-decorated expressions like 
> (assign (port-ref half-adder h1 a) (port-ref full-adder a)) . 
> Does this make sense? 
>

Totally.
I have been browsing the Mini-Java example that was published for the 2016 
Language Workbench Challenge, and this "decoration" phase happens in the 
typechecker module.
https://github.com/dfeltey/lwc2016/tree/master/mini-java

I have added two files to the gist at 
https://gist.github.com/senshu/c6db95615b4b2567f168d6bfbe61655e

   - tiny-hdl-resolver.rkt implements the name resolution phase. It is 
   freely inspired by what I found in the Mini-Java sources.
   - tiny-hdl-example-v2.rkt is an updated example where the redundant 
   information has been removed.

This small language still needs some semantic checking:

   - An output port must be written exactly once in a given architecture.
   - An input port cannot be assigned.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/93ea3922-acfb-46fa-88fd-9eea021c62b3%40googlegroups.com.

Reply via email to