SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
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
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
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
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
Demo environmentDemo environmentDemo environmentDemo environmentDemo environment
Software architectureSoftware architectureSoftware architectureSoftware architectureSoftware architecture
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.
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
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

Weitere ähnliche Inhalte

Ähnlich wie Safer IoT using functional language

Start! ATS programming
Start! ATS programmingStart! ATS programming
Start! ATS programming
Kiwamu Okabe
 
Emebedded Memories from GF pb-emem presentation
Emebedded Memories from GF pb-emem presentationEmebedded Memories from GF pb-emem presentation
Emebedded Memories from GF pb-emem presentation
sampige
 
Ajhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GCAjhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GC
Kiwamu Okabe
 

Ähnlich wie Safer IoT using functional language (20)

ATS programming on ESP8266
ATS programming on ESP8266ATS programming on ESP8266
ATS programming on ESP8266
 
Embedded application designed by ATS language
Embedded application designed by ATS languageEmbedded application designed by ATS language
Embedded application designed by ATS language
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and Platform
 
Smart.js: JavaScript engine running on tiny MCU
Smart.js: JavaScript engine running on tiny MCUSmart.js: JavaScript engine running on tiny MCU
Smart.js: JavaScript engine running on tiny MCU
 
Emacs verilog-mode is coming to Debian, again
Emacs verilog-mode is coming to Debian, againEmacs verilog-mode is coming to Debian, again
Emacs verilog-mode is coming to Debian, again
 
ATS Programming Tutorial
ATS Programming TutorialATS Programming Tutorial
ATS Programming Tutorial
 
Hands-on VeriFast with STM32 microcontroller @ Osaka
Hands-on VeriFast with STM32 microcontroller @ OsakaHands-on VeriFast with STM32 microcontroller @ Osaka
Hands-on VeriFast with STM32 microcontroller @ Osaka
 
Functional IoT: Introduction
Functional IoT: IntroductionFunctional IoT: Introduction
Functional IoT: Introduction
 
Metasepi team meeting #14: ATS programming on MCU
Metasepi team meeting #14: ATS programming on MCUMetasepi team meeting #14: ATS programming on MCU
Metasepi team meeting #14: ATS programming on MCU
 
Start! ATS programming
Start! ATS programmingStart! ATS programming
Start! ATS programming
 
Functional IoT: Programming Language and OS
Functional IoT: Programming Language and OSFunctional IoT: Programming Language and OS
Functional IoT: Programming Language and OS
 
Hands-on VeriFast with STM32 microcontroller @ Nagoya
Hands-on VeriFast with STM32 microcontroller @ NagoyaHands-on VeriFast with STM32 microcontroller @ Nagoya
Hands-on VeriFast with STM32 microcontroller @ Nagoya
 
Hands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerHands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontroller
 
Metasepi team meeting #16: Safety on ATS language + MCU
Metasepi team meeting #16: Safety on ATS language + MCUMetasepi team meeting #16: Safety on ATS language + MCU
Metasepi team meeting #16: Safety on ATS language + MCU
 
Metasepi team meeting #20: Start! ATS programming on MCU
Metasepi team meeting #20: Start! ATS programming on MCUMetasepi team meeting #20: Start! ATS programming on MCU
Metasepi team meeting #20: Start! ATS programming on MCU
 
ATS2 updates 2017
ATS2 updates 2017ATS2 updates 2017
ATS2 updates 2017
 
ARM uVisor Debug Refinement Project(debugging facility improvements)
ARM uVisor Debug Refinement Project(debugging facility improvements)ARM uVisor Debug Refinement Project(debugging facility improvements)
ARM uVisor Debug Refinement Project(debugging facility improvements)
 
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
 
Emebedded Memories from GF pb-emem presentation
Emebedded Memories from GF pb-emem presentationEmebedded Memories from GF pb-emem presentation
Emebedded Memories from GF pb-emem presentation
 
Ajhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GCAjhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GC
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Safer IoT using functional language

  • 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