* guile unify further improvements.
@ 2011-05-25 20:58 Stefan Israelsson Tampe
0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2011-05-25 20:58 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]
Coding has been gong on many levels.
1. A macro validator and error reporting mechanism similar but simpler then
syntax-parse has been tested
2. A macro framework to generate c-code form scheme forms using fmt and
scheme macros has been developed
this macro system has good error reporting and uses 1 to output errors in
macro formations (check out language/clambda
in the guile unify repo if you want to see examples of how it is used. Also
line numbers is emmited to the output c-code
so that the errors reported by the c compiler can be traced.
3. type checker developments.
4. investigation of adding type information to tree-il
5. The guile unify system uses stacks in various ways and a development to
make a c library to handle stacks in various ways.
To test out using the scheme forms to c code generation framework a system
to easy usage of the SCM environment under C
is tried. Here we try to make simple match macros and macros to create lists
almost like creating lists in scheme together with
constant collection in order to collect say floating point constants symbols
strings etc. then declare those constants associated
with a SCM variable and init those in a init function. That way we can use
the SCM variables (constants) inside the c-code. I don't know if such a
system is in place already but it's kind of cool to try it out. This way
there is some tools that eases c-code generation. Not to replace the
longtime goal of a scheme only solution. It's all a play with the tools at
hand and have fun at the same time.
The syntax parse like code is really really small if one uses a nice match
tool. It's located under parse/. directory in the guile unify repo. It's all
about introducing checks in a schematic that makes it obvious what is
checked and what is not checked in a macro form.
I've been playing with typechecking recursive types and have an algorithm
that I think avoids infinite recursions for non recursive
fuctions. To be done is to make it possible to typecheck the map function.
The main difficulty with that is that it has a type
signature that depends on the number of arguments in a non trivial way. and
to solve this one need to handle a type parameter
of the form B ... , e.g.
map:
(lambda ((lambda (B ...) -> A) (list B) ...)) -> (list A))
which is cool form of recursion.
/Stefan
[-- Attachment #2: Type: text/html, Size: 2511 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-25 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 20:58 guile unify further improvements Stefan Israelsson Tampe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).