Safer IoT using functional language

50 %
50 %
Information about Safer IoT using functional language

Published on January 14, 2016

Author: master_q

Source: slideshare.net

1. Safer IoT using functional languageSafer IoT using functional languageSafer IoT using functional languageSafer IoT using functional languageSafer IoT using functional language Kiwamu Okabe @ RIKEN AICSKiwamu Okabe @ RIKEN AICSKiwamu Okabe @ RIKEN AICSKiwamu Okabe @ RIKEN AICSKiwamu Okabe @ RIKEN AICS

2. Hardware: ESP8266Hardware: ESP8266Hardware: ESP8266Hardware: ESP8266Hardware: ESP8266 ☆ http://espressif.com/en/products/wroom/☆ http://espressif.com/en/products/wroom/☆ http://espressif.com/en/products/wroom/☆ http://espressif.com/en/products/wroom/☆ http://espressif.com/en/products/wroom/ ☆ 32-bit low power MCU Wi-Fi Module☆ 32-bit low power MCU Wi-Fi Module☆ 32-bit low power MCU Wi-Fi Module☆ 32-bit low power MCU Wi-Fi Module☆ 32-bit low power MCU Wi-Fi Module ☆ Having integrated TCP/IP network stacks☆ Having integrated TCP/IP network stacks☆ Having integrated TCP/IP network stacks☆ Having integrated TCP/IP network stacks☆ Having integrated TCP/IP network stacks ☆ Including ADC, SDIO, UART, PWM, I2C ...☆ Including ADC, SDIO, UART, PWM, I2C ...☆ Including ADC, SDIO, UART, PWM, I2C ...☆ Including ADC, SDIO, UART, PWM, I2C ...☆ Including ADC, SDIO, UART, PWM, I2C ... ☆ Small form factor of only 18mm x 20mm☆ Small form factor of only 18mm x 20mm☆ Small form factor of only 18mm x 20mm☆ Small form factor of only 18mm x 20mm☆ Small form factor of only 18mm x 20mm

3. Functional language: ATSFunctional language: ATSFunctional language: ATSFunctional language: ATSFunctional language: ATS ☆ http://www.ats-lang.org/☆ http://www.ats-lang.org/☆ http://www.ats-lang.org/☆ http://www.ats-lang.org/☆ http://www.ats-lang.org/ ☆ Syntax like ML☆ Syntax like ML☆ Syntax like ML☆ Syntax like ML☆ Syntax like ML ☆ DML-style dependent types☆ DML-style dependent types☆ DML-style dependent types☆ DML-style dependent types☆ DML-style dependent types ☆ Linear types☆ Linear types☆ Linear types☆ Linear types☆ Linear types ☆ Optional GC☆ Optional GC☆ Optional GC☆ Optional GC☆ Optional GC ☆ Optional malloc/free☆ Optional malloc/free☆ Optional malloc/free☆ Optional malloc/free☆ Optional malloc/free ☆ Optional run-time☆ Optional run-time☆ Optional run-time☆ Optional run-time☆ Optional run-time

4. DemoDemoDemoDemoDemo The code is found at following:The code is found at following:The code is found at following:The code is found at following:The code is found at following: https://github.com/fpiot/esp8266-atshttps://github.com/fpiot/esp8266-atshttps://github.com/fpiot/esp8266-atshttps://github.com/fpiot/esp8266-atshttps://github.com/fpiot/esp8266-ats

5. Demo environmentDemo environmentDemo environmentDemo environmentDemo environment

6. Software architectureSoftware architectureSoftware architectureSoftware architectureSoftware architecture

7. ATS finds forgetting free memoryATS finds forgetting free memoryATS finds forgetting free memoryATS finds forgetting free memoryATS finds forgetting free memory $�cd�esp8266-ats/ifttt_ats $�vi�user/user_main.dats �39�����val�json_open�=�string0_copy�"{"value1":�"" �40�����val�json_close�=�string0_copy�""�}" �41�����val�temp�=�esp_tostrptr_int�rand �42�����val�json_head�=�strptr_append�(json_open,�temp) �43�����val�json_data�=�strptr_append�(json_head,�json_close) �44�//��val�()�=�(free�json_open;�free�json_close;�free�temp;�free�json_head) �45�����val�()�=�(free�json_open;�free�json_close;�free�temp)�//�Error! $�make ATS�user/user_main.dats /home/kiwamu/src/esp8266-ats/ifttt_ats/user/user_main.dats:�985(line=32,� offs=43)�--�2237(line=55,�offs=4):�error(3):�the�linear�dynamic�variable� [json_head$3823(-1)]�needs�to�be�consumed�but�it�is�preserved�with�the�type� [S2Eapp(S2Ecst(strptr_addr_vtype);�S2EVar(4441))]�instead. $�cd�esp8266-ats/ifttt_ats $�vi�user/user_main.dats �39�����val�json_open�=�string0_copy�"{"value1":�"" �40�����val�json_close�=�string0_copy�""�}" �41�����val�temp�=�esp_tostrptr_int�rand �42�����val�json_head�=�strptr_append�(json_open,�temp) �43�����val�json_data�=�strptr_append�(json_head,�json_close) �44�//��val�()�=�(free�json_open;�free�json_close;�free�temp;�free�json_head) �45�����val�()�=�(free�json_open;�free�json_close;�free�temp)�//�Error! $�make ATS�user/user_main.dats /home/kiwamu/src/esp8266-ats/ifttt_ats/user/user_main.dats:�985(line=32,� offs=43)�--�2237(line=55,�offs=4):�error(3):�the�linear�dynamic�variable� [json_head$3823(-1)]�needs�to�be�consumed�but�it�is�preserved�with�the�type� [S2Eapp(S2Ecst(strptr_addr_vtype);�S2EVar(4441))]�instead. $�cd�esp8266-ats/ifttt_ats $�vi�user/user_main.dats �39�����val�json_open�=�string0_copy�"{"value1":�"" �40�����val�json_close�=�string0_copy�""�}" �41�����val�temp�=�esp_tostrptr_int�rand �42�����val�json_head�=�strptr_append�(json_open,�temp) �43�����val�json_data�=�strptr_append�(json_head,�json_close) �44�//��val�()�=�(free�json_open;�free�json_close;�free�temp;�free�json_head) �45�����val�()�=�(free�json_open;�free�json_close;�free�temp)�//�Error! $�make ATS�user/user_main.dats /home/kiwamu/src/esp8266-ats/ifttt_ats/user/user_main.dats:�985(line=32,� offs=43)�--�2237(line=55,�offs=4):�error(3):�the�linear�dynamic�variable� [json_head$3823(-1)]�needs�to�be�consumed�but�it�is�preserved�with�the�type� [S2Eapp(S2Ecst(strptr_addr_vtype);�S2EVar(4441))]�instead. $�cd�esp8266-ats/ifttt_ats $�vi�user/user_main.dats �39�����val�json_open�=�string0_copy�"{"value1":�"" �40�����val�json_close�=�string0_copy�""�}" �41�����val�temp�=�esp_tostrptr_int�rand �42�����val�json_head�=�strptr_append�(json_open,�temp) �43�����val�json_data�=�strptr_append�(json_head,�json_close) �44�//��val�()�=�(free�json_open;�free�json_close;�free�temp;�free�json_head) �45�����val�()�=�(free�json_open;�free�json_close;�free�temp)�//�Error! $�make ATS�user/user_main.dats /home/kiwamu/src/esp8266-ats/ifttt_ats/user/user_main.dats:�985(line=32,� offs=43)�--�2237(line=55,�offs=4):�error(3):�the�linear�dynamic�variable� [json_head$3823(-1)]�needs�to�be�consumed�but�it�is�preserved�with�the�type� [S2Eapp(S2Ecst(strptr_addr_vtype);�S2EVar(4441))]�instead. $�cd�esp8266-ats/ifttt_ats $�vi�user/user_main.dats �39�����val�json_open�=�string0_copy�"{"value1":�"" �40�����val�json_close�=�string0_copy�""�}" �41�����val�temp�=�esp_tostrptr_int�rand �42�����val�json_head�=�strptr_append�(json_open,�temp) �43�����val�json_data�=�strptr_append�(json_head,�json_close) �44�//��val�()�=�(free�json_open;�free�json_close;�free�temp;�free�json_head) �45�����val�()�=�(free�json_open;�free�json_close;�free�temp)�//�Error! $�make ATS�user/user_main.dats /home/kiwamu/src/esp8266-ats/ifttt_ats/user/user_main.dats:�985(line=32,� offs=43)�--�2237(line=55,�offs=4):�error(3):�the�linear�dynamic�variable� [json_head$3823(-1)]�needs�to�be�consumed�but�it�is�preserved�with�the�type� [S2Eapp(S2Ecst(strptr_addr_vtype);�S2EVar(4441))]�instead.

8. Functional IoT Meetup at January 30Functional IoT Meetup at January 30Functional IoT Meetup at January 30Functional IoT Meetup at January 30Functional IoT Meetup at January 30

9. License of photosLicense of photosLicense of photosLicense of photosLicense of photos *�About�time�I�had�a�whisky�glass!�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/toolmantim/14834817323/ ��Copyright:�Tim�Lucas�/�License:�CC�BY�2.0 *�Japanese�traditional�style�house�design�/�和⾵建築(わふうけんちく)�│� Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/tanaka_juuyoh/10720411936/ ��Copyright:�TANAKA�Juuyoh�(⽥中⼗洋)�/�License:�CC�BY�2.0 *�Undirected�member-get-member�network�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/porternovelli/2587018053/ ��Copyright:�Porter�Novelli�Global�/�License:�CC�BY-SA�2.0 *�JTAG�board�1�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/amagill/2877921712/ ��Copyright:�Andrew�Magill�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�About�time�I�had�a�whisky�glass!�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/toolmantim/14834817323/ ��Copyright:�Tim�Lucas�/�License:�CC�BY�2.0 *�Japanese�traditional�style�house�design�/�和⾵建築(わふうけんちく)�│� Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/tanaka_juuyoh/10720411936/ ��Copyright:�TANAKA�Juuyoh�(⽥中⼗洋)�/�License:�CC�BY�2.0 *�Undirected�member-get-member�network�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/porternovelli/2587018053/ ��Copyright:�Porter�Novelli�Global�/�License:�CC�BY-SA�2.0 *�JTAG�board�1�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/amagill/2877921712/ ��Copyright:�Andrew�Magill�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�About�time�I�had�a�whisky�glass!�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/toolmantim/14834817323/ ��Copyright:�Tim�Lucas�/�License:�CC�BY�2.0 *�Japanese�traditional�style�house�design�/�和⾵建築(わふうけんちく)�│� Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/tanaka_juuyoh/10720411936/ ��Copyright:�TANAKA�Juuyoh�(⽥中⼗洋)�/�License:�CC�BY�2.0 *�Undirected�member-get-member�network�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/porternovelli/2587018053/ ��Copyright:�Porter�Novelli�Global�/�License:�CC�BY-SA�2.0 *�JTAG�board�1�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/amagill/2877921712/ ��Copyright:�Andrew�Magill�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�About�time�I�had�a�whisky�glass!�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/toolmantim/14834817323/ ��Copyright:�Tim�Lucas�/�License:�CC�BY�2.0 *�Japanese�traditional�style�house�design�/�和⾵建築(わふうけんちく)�│� Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/tanaka_juuyoh/10720411936/ ��Copyright:�TANAKA�Juuyoh�(⽥中⼗洋)�/�License:�CC�BY�2.0 *�Undirected�member-get-member�network�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/porternovelli/2587018053/ ��Copyright:�Porter�Novelli�Global�/�License:�CC�BY-SA�2.0 *�JTAG�board�1�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/amagill/2877921712/ ��Copyright:�Andrew�Magill�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�About�time�I�had�a�whisky�glass!�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/toolmantim/14834817323/ ��Copyright:�Tim�Lucas�/�License:�CC�BY�2.0 *�Japanese�traditional�style�house�design�/�和⾵建築(わふうけんちく)�│� Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/tanaka_juuyoh/10720411936/ ��Copyright:�TANAKA�Juuyoh�(⽥中⼗洋)�/�License:�CC�BY�2.0 *�Undirected�member-get-member�network�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/porternovelli/2587018053/ ��Copyright:�Porter�Novelli�Global�/�License:�CC�BY-SA�2.0 *�JTAG�board�1�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/amagill/2877921712/ ��Copyright:�Andrew�Magill�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr�-�Photo�Sharing! ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0

Add a comment

Related pages

IoT縛りの勉強会 ! IoTLT vol.11 @ Microsoft Japan - 資料一覧 - connpass

Safer IoT using functional language 投稿者:masterq. 投稿日:2016年1月14日 23時25分 ...
Read more

IoT縛りの勉強会 ! IoTLT vol.11 @ Microsoft Japan - connpass

Safer IoT using functional language.
Read more

「IoT縛りの勉強会 ! IoTLT vol.11」参加メモ | ネットワークエンジニアを目指して - ブログ

Safer IoT using functional language from Kiwamu Okabe. LT: One More Kanazawa 石崎 ...
Read more

Open-source Functional Language Extensions to C# 6

IoT; HTML5; JavaScript; ... all the while "C# as a language is becoming more and more like a functional language on every ... By using option types that ...
Read more

Manage, monitor, and control all your IoT devices with ...

... and control all your IoT ... use a particular language or library or ... much easier and safer compared to using something ...
Read more

What is the Internet of Things? | SmartBear

SoapUI NG Pro API Functional Testing LoadUI NG Pro ... itself using your ... use a common language. Examples of protocols used for IoT ...
Read more

Agenda - Presentation Abstracts - Iot-Devcon

Resolving the Technical and Business Challenges of Getting ... considerations for IoT and functional security use ... IoT Edge Devices using Real ...
Read more

Functional Language | LinkedIn

View 1776 Functional Language posts, presentations, experts, and more. ... English Language Teacher at University of Trento, ...
Read more