Metasepiプロジェクト進捗報告 2019年11月 (日本Androidの会秋葉原支部ロボット部 第86回勉強会)
idiomaticca(i9a): C言語コードからATS実装を自動生成
- http://metasepi.org/en/posts/2019-07-19-toy-translator-c-to-ats.html
- https://github.com/metasepi/idiomaticca/
function do_network_auto_reconnect { | |
while true; do | |
ping -c1 google.com > /dev/null | |
if [ "$?" != "0" ]; then | |
sudo /etc/init.d/network-manager restart | |
sleep 30; | |
fi | |
sleep 1; | |
done | |
} |
$ vi libs/TARGET_CY8CPROTO-062-4343W/startup/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S | |
--snip-- | |
__StackTop: | |
.size __StackTop, . - __StackTop | |
.section .heap | |
.align 3 | |
.equ Heap_Size, 0x00000100 | |
.globl __HeapBase | |
.globl __HeapLimit |
function do_aws_s3_private_backup { | |
du -sh $HOME/Sounds $HOME/Family | |
aws s3 sync --delete $HOME/Sounds s3://masterq-private/Sounds | |
aws s3 sync $HOME/Family s3://masterq-private/Family | |
} |
$ grep -A 2 "\#include" `find . -name "*.hats"` | |
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats:local #include"./DATS/jsonats.dats" in end | |
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats-// | |
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats-(* ****** ****** *) | |
-- | |
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats:#include | |
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats-"$PATSHOMELOCS\ | |
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats-/atscntrb-hx-threadkit/mylibies.hats" | |
-- | |
./npm-utils/contrib/libats-/hwxi/polyglot/mylibies_link.hats:#include "./DATS/filetype.dats" |
$ gcc -g -I /home/kiwamu/src/ATS-Postiats/ccomp/runtime/ -I /home/kiwamu/src/ATS-Postiats/ main_dats.c | |
$ gdb a.out | |
(gdb) b main.dats:atspre_g0int_add_int | |
Breakpoint 1 at 0x120a: file /home/kiwamu/src/ATS-Postiats/prelude/CATS/integer.cats, line 157. | |
(gdb) run | |
Starting program: /home/kiwamu/src/idiomaticca/regress/noinc/arithmetic_op/a.out | |
Breakpoint 1, atspre_g0int_add_int (x1=1, x2=2) at /home/kiwamu/src/ATS-Postiats/prelude/CATS/integer.cats:157 | |
157 (atstype_int x1, atstype_int x2) { return (x1 + x2) ; } | |
(gdb) bt |
= ValaはどうやってDWARFを吐くのか | |
[2019-05-27 16:20] | |
<<<Vala | |
<<<DWARF | |
== 参考 | |
"Projects/Genie/Developing - GNOME Wiki!" https://wiki.gnome.org/Projects/Genie/Developing | |
"Valaのデバッグ[メモ] | TIPS" http://1204lts.blogspot.com/2014/01/vala.html |
/* $OpenBSD: cat.c,v 1.26 2016/10/19 18:20:25 schwarze Exp $ */ | |
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */ | |
/* | |
* Copyright (c) 1989, 1993 | |
* The Regents of the University of California. All rights reserved. | |
* | |
* This code is derived from software contributed to Berkeley by | |
* Kevin Fall. | |
* |
/* $OpenBSD: cat.c,v 1.26 2016/10/19 18:20:25 schwarze Exp $ */ | |
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */ | |
/* | |
* Copyright (c) 1989, 1993 | |
* The Regents of the University of California. All rights reserved. | |
* | |
* This code is derived from software contributed to Berkeley by | |
* Kevin Fall. | |
* |
= VCCサーベイ | |
[2018-04-15 15:00] | |
<<<VCC | |
<<<サーベイ | |
https://archive.codeplex.com/?p=vcc | |
論文を以下に置いた: |