Formal specification of ATS2 abstract syntax tree (Template ATS2?)

Hi all,

I was wondering, would it be possible to model the ATS2 abstract syntax
tree as ATS2 types, and use that to implement the ATS2 version of
Template Haskell? What would be involved in that kind of project, where
would I start?

Cheers,
Shea

I am very glad that you brought up the issue.

Note that the keywords “`(” and “,(” and “%(” are still kept
in ATS2 in the hope of supporting TH-style of meta-programming :slight_smile:

I co-authored the following paper about 10 years ago:

http://www.cs.bu.edu/~hwxi/academic/papers/JFPmp.pdf

I actually implemented in ATSproto, the first released version of
ATS, the system formalized in the above paper, which is more
ambitious than Template Haskell (TH) in terms of type-checking.

By the way, ATSproto also supported OOP; it was really messy and bulky :slight_smile:

If you are interested, I would suggest that you target only the functional
core of
ATS at first. There may be complications due to the support for flat data
representation
in ATS2.

Static typechecking is wonderful, but it is often too complicated for such
a template
system. So trying to support run-time typechecking on generated syntax
trees seems
to be sensible way to control complexity.

Lastly, I would like to point out the following paper:

http://www.cs.bu.edu/~hwxi/academic/papers/gpce06.pdf

which is about distributed meta-programming. It is a quite interesting idea.On Thu, Oct 23, 2014 at 8:28 PM, Shea Levy sh...@shealevy.com wrote:

Hi all,

I was wondering, would it be possible to model the ATS2 abstract syntax
tree as ATS2 types, and use that to implement the ATS2 version of
Template Haskell? What would be involved in that kind of project, where
would I start?

Cheers,
Shea


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/20141024002825.GB2093%40nixos.hsd1.nh.comcast.net
.

Hello Shea,

Hi all,

I was wondering, would it be possible to model the ATS2 abstract syntax
tree as ATS2 types, and use that to implement the ATS2 version of
Template Haskell? What would be involved in that kind of project, where
would I start?

I don’t know. Just wanted to chime in and wish you good luck. :slight_smile:

I was recently thinking of using metaprogramming together with external
constraint solving to allow for type-safe database queries in ATS, in the
style of Ur/Web. Basically, add new external sorts “row” and “field label”,
and a few external static functions for constructing row sorts, and then
implement some data structures that would be indexed by these sorts. The
disjointness proofs of record field labels would be handled externally.

At first, I was thinking of using some form of a preprocessor for this. But
TH-style metaprogramming would be much easier to deal with, I assume.

Today, I located ATS0-proto. It is now available on-line:

The interpreter for ATS0 is contained in the following file:
https://sourceforge.net/p/ats-first/code/ci/master/tree/atsInterp.ml
https://sourceforge.net/p/ats-first/code/ci/master/tree/atsInterp.ml

It does handle the kind of meta-programming we talked about above.On Monday, October 27, 2014 8:23:00 PM UTC-4, gmhwxi wrote:

Essentially, the core consists of

lambda-calculus + datatypes + references.

On Monday, October 27, 2014 7:07:10 PM UTC-4, Shea Levy wrote:

On Thu, Oct 23, 2014 at 09:17:11PM -0400, Hongwei Xi wrote:

I am very glad that you brought up the issue.

Note that the keywords “`(” and “,(” and “%(” are still kept
in ATS2 in the hope of supporting TH-style of meta-programming :slight_smile:

I co-authored the following paper about 10 years ago:

http://www.cs.bu.edu/~hwxi/academic/papers/JFPmp.pdf

I actually implemented in ATSproto, the first released version of
ATS, the system formalized in the above paper, which is more
ambitious than Template Haskell (TH) in terms of type-checking.

By the way, ATSproto also supported OOP; it was really messy and bulky
:slight_smile:

If you are interested, I would suggest that you target only the
functional
core of
ATS at first. There may be complications due to the support for flat
data
representation
in ATS2.

What consists of the ‘core’ here?

Static typechecking is wonderful, but it is often too complicated for
such
a template
system. So trying to support run-time typechecking on generated syntax
trees seems
to be sensible way to control complexity.

Lastly, I would like to point out the following paper:

http://www.cs.bu.edu/~hwxi/academic/papers/gpce06.pdf

which is about distributed meta-programming. It is a quite interesting
idea.

On Thu, Oct 23, 2014 at 8:28 PM, Shea Levy sh...@shealevy.com wrote:

Hi all,

I was wondering, would it be possible to model the ATS2 abstract
syntax
tree as ATS2 types, and use that to implement the ATS2 version of
Template Haskell? What would be involved in that kind of project,
where
would I start?

Cheers,
Shea


You received this message because you are subscribed to the Google
Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it,
send an
email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/ats-lang-users/20141024002825.GB2093%40nixos.hsd1.nh.comcast.net

.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpadySc9iA4FsJ5vsmFvLFEo3GgbpTk5cggMTs43TpUyg%40mail.gmail.com.

I am very glad that you brought up the issue.

Note that the keywords “`(” and “,(” and “%(” are still kept
in ATS2 in the hope of supporting TH-style of meta-programming :slight_smile:

I co-authored the following paper about 10 years ago:

http://www.cs.bu.edu/~hwxi/academic/papers/JFPmp.pdf

I actually implemented in ATSproto, the first released version of
ATS, the system formalized in the above paper, which is more
ambitious than Template Haskell (TH) in terms of type-checking.

By the way, ATSproto also supported OOP; it was really messy and bulky :slight_smile:

If you are interested, I would suggest that you target only the functional
core of
ATS at first. There may be complications due to the support for flat data
representation
in ATS2.

What consists of the ‘core’ here?

Essentially, the core consists of

lambda-calculus + datatypes + references.On Monday, October 27, 2014 7:07:10 PM UTC-4, Shea Levy wrote:

On Thu, Oct 23, 2014 at 09:17:11PM -0400, Hongwei Xi wrote:

I am very glad that you brought up the issue.

Note that the keywords “`(” and “,(” and “%(” are still kept
in ATS2 in the hope of supporting TH-style of meta-programming :slight_smile:

I co-authored the following paper about 10 years ago:

http://www.cs.bu.edu/~hwxi/academic/papers/JFPmp.pdf

I actually implemented in ATSproto, the first released version of
ATS, the system formalized in the above paper, which is more
ambitious than Template Haskell (TH) in terms of type-checking.

By the way, ATSproto also supported OOP; it was really messy and bulky
:slight_smile:

If you are interested, I would suggest that you target only the
functional
core of
ATS at first. There may be complications due to the support for flat
data
representation
in ATS2.

What consists of the ‘core’ here?

Static typechecking is wonderful, but it is often too complicated for
such
a template
system. So trying to support run-time typechecking on generated syntax
trees seems
to be sensible way to control complexity.

Lastly, I would like to point out the following paper:

http://www.cs.bu.edu/~hwxi/academic/papers/gpce06.pdf

which is about distributed meta-programming. It is a quite interesting
idea.

On Thu, Oct 23, 2014 at 8:28 PM, Shea Levy <sh...@shealevy.com <javascript:>> wrote:

Hi all,

I was wondering, would it be possible to model the ATS2 abstract
syntax
tree as ATS2 types, and use that to implement the ATS2 version of
Template Haskell? What would be involved in that kind of project,
where
would I start?

Cheers,
Shea


You received this message because you are subscribed to the Google
Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/ats-lang-users/20141024002825.GB2093%40nixos.hsd1.nh.comcast.net

.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpadySc9iA4FsJ5vsmFvLFEo3GgbpTk5cggMTs43TpUyg%40mail.gmail.com.