ATS for kernel programming

232 views
Skip to first unread message

gmhwxi

unread,
Apr 5, 2014, 12:02:31 PM4/5/14
to ats-lan...@googlegroups.com
I am currently setting up some infrastructure to support kernel programming in ATS:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/MEDIUM/BuildOS

I have just got started.

I really want to people to see that this is not just possible; it is actually quite straightforward,
and it can be a lot of fun.

Cheers!

--Hongwei

gmhwxi

unread,
Apr 6, 2014, 2:18:38 PM4/6/14
to ats-lan...@googlegroups.com

Raoul Duke

unread,
Apr 7, 2014, 1:02:29 AM4/7/14
to ats-lang-users
i'm confused. i skimmed things expecting to see dependent types or
some such :-) but it looked like plain C style code w/out any thing
extra helpful and extra safe? maybe i skimmed too fast and am too
clueless. :-)

gmhwxi

unread,
Apr 7, 2014, 1:26:07 AM4/7/14
to ats-lan...@googlegroups.com
My first priority here is to set things up. In particular, I want to
make sure that templates in ATS would not cause any serious problems.
For instance, I am actually quite happy with the following use of a template:

extern
fun
bwputs
(string): void = "mac#"
implement
bwputs
(str) = let
//
val str
= g1ofg0 (str)
//
implement
(env)
string_foreach$fwork
<env> (c, env) =
  let val
() = UART_wait () in output (c) end
//
in
  ignoret
(string_foreach<> (str))
end // end of [bwputs]


This is kind of like using a higher-order function, which is not very common in kernel-programming.
By the way, the implementation of string_foreach makes use of dependent types.


On Saturday, April 5, 2014 12:02:31 PM UTC-4, gmhwxi wrote:
Message has been deleted

gmhwxi

unread,
Apr 7, 2014, 9:27:15 PM4/7/14
to ats-lan...@googlegroups.com

Brandon Barker

unread,
Apr 9, 2014, 2:14:30 PM4/9/14
to Hongwei Xi, ats-lang-users

It will be nice to do a short article on the completed work at osnews.com; there should be at least a few interested readers.

On Apr 7, 2014 9:27 PM, "gmhwxi" <gmh...@gmail.com> wrote:
I renamed the link as follows:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/MEDIUM/KernelBuilding

On Sunday, April 6, 2014 2:18:38 PM UTC-4, gmhwxi wrote:
I renamed the link as follows:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/MEDIUM/KernelBuild


On Saturday, April 5, 2014 12:02:31 PM UTC-4, gmhwxi wrote:
I am currently setting up some infrastructure to support kernel programming in ATS:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/MEDIUM/BuildOS

I have just got started.

I really want to people to see that this is not just possible; it is actually quite straightforward,
and it can be a lot of fun.

Cheers!

--Hongwei

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/3f9ac149-2771-449c-8521-b5a44e69cf36%40googlegroups.com.

gmhwxi

unread,
Apr 14, 2014, 4:57:37 PM4/14/14
to ats-lan...@googlegroups.com
I managed to add another piece:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/MEDIUM/KernelBuilding/singpolyma-kernel/Part4-1

This time I introduced some simple abstract types.
Message has been deleted

gmhwxi

unread,
Apr 16, 2014, 12:55:14 PM4/16/14
to ats-lan...@googlegroups.com
I managed to add another piece:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/MEDIUM/KernelBuilding/singpolyma-kernel/Part4-2

Basically, the kernel can now do a simplistic version of 'fork'.

Before I move ahead, I probably need to tidy thing up a bit. Much more importantly, I need to think about how to use
abstract types to properly organize the kernel.

Lots of challenges and lots of fun as well!
Message has been deleted

gmhwxi

unread,
Oct 31, 2014, 1:29:47 AM10/31/14
to ats-lan...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages