Hi Hongwei,

On Mon, Aug 22, 2016 at 2:28 PM, Hongwei Xi <[email protected]> wrote:
> Basically, I think that every struct in C should be first mapped to an
> abstract type.

I used mutual struct in your style:

https://github.com/jats-ug/practice-ats/blob/4af1b892edc700d33312b9289ff7a72861b9a4a1/template_struct/main.dats#L134

However, following code at line 134 causes error...

```
  val foo_ptr = takeout_struct_foo_ptr (addr@foo)
  val () = foo_ptr.b := 9 // error(3): the type
[S2Eapp(S2Ecst(struct_foo_ptr); S2Evar(foo(8452)))] is expected to be
a tyrec(record).
```

> Also, there is no need to start with C syntax. You can (and probably should)
> start
> with some syntax of your design and then later find a way to translate C
> syntax into
> your designed syntax. I call this doing-things-in-stages. Trying to do a
> complex thing
> in one step usually ends up with a failure and some frustration.

Yes. You know that I already made some code for kernel.

https://github.com/metasepi/linux-bohai-s2/blob/bohai-s2/metasepi/include/linux/SATS/statfs.sats#L10

Now, I need some semi-automatically-generate tool to try rewriting
such kernel widely.
Such kernel has many many interfaces written by C language!!!

Best regards,
-- 
Kiwamu Okabe at METASEPI DESIGN

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dmpHgNTiFkutOT2xCJ4NG6Jzke0rLt8sOk%3Dp72gU4jbtg%40mail.gmail.com.

Reply via email to