SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Real-time OS system state captured
by ATS language
Real-time OS system state captured
by ATS language
Real-time OS system state captured
by ATS language
Real-time OS system state captured
by ATS language
Real-time OS system state captured
by ATS language
Kiwamu OkabeKiwamu OkabeKiwamu OkabeKiwamu OkabeKiwamu Okabe
Real-time OS: ChibiOS/RTReal-time OS: ChibiOS/RTReal-time OS: ChibiOS/RTReal-time OS: ChibiOS/RTReal-time OS: ChibiOS/RT
☆ http://www.chibios.org/☆ http://www.chibios.org/☆ http://www.chibios.org/☆ http://www.chibios.org/☆ http://www.chibios.org/
☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS
☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC
e200
☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC
e200
☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC
e200
☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC
e200
☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC
e200
☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec
☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte
System state in ChibiOS/RTSystem state in ChibiOS/RTSystem state in ChibiOS/RTSystem state in ChibiOS/RTSystem state in ChibiOS/RT
Class of system API in ChibiOS/RTClass of system API in ChibiOS/RTClass of system API in ChibiOS/RTClass of system API in ChibiOS/RTClass of system API in ChibiOS/RT
☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread
☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked
☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked
☆ "X-Class" must be called on Thread, S-Locked or
I-Locked
☆ "X-Class" must be called on Thread, S-Locked or
I-Locked
☆ "X-Class" must be called on Thread, S-Locked or
I-Locked
☆ "X-Class" must be called on Thread, S-Locked or
I-Locked
☆ "X-Class" must be called on Thread, S-Locked or
I-Locked
☆ "Special" have special execution requirements☆ "Special" have special execution requirements☆ "Special" have special execution requirements☆ "Special" have special execution requirements☆ "Special" have special execution requirements
☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state
Example: chSysLock()Example: chSysLock()Example: chSysLock()Example: chSysLock()Example: chSysLock()
☆ Enters the kernel lock mode☆ Enters the kernel lock mode☆ Enters the kernel lock mode☆ Enters the kernel lock mode☆ Enters the kernel lock mode
☆ Special function☆ Special function☆ Special function☆ Special function☆ Special function
☆ Should be called on Thread state☆ Should be called on Thread state☆ Should be called on Thread state☆ Should be called on Thread state☆ Should be called on Thread state
☆ Change system state into S-Locked state☆ Change system state into S-Locked state☆ Change system state into S-Locked state☆ Change system state into S-Locked state☆ Change system state into S-Locked state
Example: chVTSetI()Example: chVTSetI()Example: chVTSetI()Example: chVTSetI()Example: chVTSetI()
☆ Enables a virtual timer☆ Enables a virtual timer☆ Enables a virtual timer☆ Enables a virtual timer☆ Enables a virtual timer
☆ I-Class function☆ I-Class function☆ I-Class function☆ I-Class function☆ I-Class function
☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state
☆ Doesn't change system state☆ Doesn't change system state☆ Doesn't change system state☆ Doesn't change system state☆ Doesn't change system state
Using system API in CUsing system API in CUsing system API in CUsing system API in CUsing system API in C
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLock();
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlock();
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLock();
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlock();
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLock();
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlock();
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLock();
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlock();
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLock();
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlock();
}
☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state
Undefined behavior by wrong calling!Undefined behavior by wrong calling!Undefined behavior by wrong calling!Undefined behavior by wrong calling!Undefined behavior by wrong calling!
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLockFromISR();���//�wrong�call!
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlockFromISR();�//�wrong�call!
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLockFromISR();���//�wrong�call!
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlockFromISR();�//�wrong�call!
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLockFromISR();���//�wrong�call!
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlockFromISR();�//�wrong�call!
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLockFromISR();���//�wrong�call!
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlockFromISR();�//�wrong�call!
}
static�void�tmr_init(void�*p)�{
��chEvtObjectInit(&inserted_event);
��chEvtObjectInit(&removed_event);
��chSysLockFromISR();���//�wrong�call!
��cnt�=�POLLING_INTERVAL;
��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p);
��chSysUnlockFromISR();�//�wrong�call!
}
☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...
☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!
Want to avoid it at compile-time...Want to avoid it at compile-time...Want to avoid it at compile-time...Want to avoid it at compile-time...Want to avoid it at compile-time...
☆ The system state is a state machine.☆ The system state is a state machine.☆ The system state is a state machine.☆ The system state is a state machine.☆ The system state is a state machine.
☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?
ATS language can do that!ATS language can do that!ATS language can do that!ATS language can do that!ATS language can do that!
☆ 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 is similar to ML☆ Syntax is similar to ML☆ Syntax is similar to ML☆ Syntax is similar to ML☆ Syntax is similar to ML
☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types
☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer
☆ Without GC / Without runtime☆ Without GC / Without runtime☆ Without GC / Without runtime☆ Without GC / Without runtime☆ Without GC / Without runtime
☆ Compiled into C language code☆ Compiled into C language code☆ Compiled into C language code☆ Compiled into C language code☆ Compiled into C language code
ATS programing on ChibiOS/RTATS programing on ChibiOS/RTATS programing on ChibiOS/RTATS programing on ChibiOS/RTATS programing on ChibiOS/RT
☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2
☆ ATS code is found at following:☆ ATS code is found at following:☆ ATS code is found at following:☆ ATS code is found at following:☆ ATS code is found at following:
☆ https://github.com/fpiot/chibios-ats-2/blob/
master/demos/STM32/RT-STM32F746G-
DISCOVERY-LWIP-FATFS-USB/main.dats
☆ https://github.com/fpiot/chibios-ats-2/blob/
master/demos/STM32/RT-STM32F746G-
DISCOVERY-LWIP-FATFS-USB/main.dats
☆ https://github.com/fpiot/chibios-ats-2/blob/
master/demos/STM32/RT-STM32F746G-
DISCOVERY-LWIP-FATFS-USB/main.dats
☆ https://github.com/fpiot/chibios-ats-2/blob/
master/demos/STM32/RT-STM32F746G-
DISCOVERY-LWIP-FATFS-USB/main.dats
☆ https://github.com/fpiot/chibios-ats-2/blob/
master/demos/STM32/RT-STM32F746G-
DISCOVERY-LWIP-FATFS-USB/main.dats
DemoDemoDemoDemoDemo
https://youtu.be/Riw5C_ZrK-Yhttps://youtu.be/Riw5C_ZrK-Yhttps://youtu.be/Riw5C_ZrK-Yhttps://youtu.be/Riw5C_ZrK-Yhttps://youtu.be/Riw5C_ZrK-Y
Define linear type for system stateDefine linear type for system stateDefine linear type for system stateDefine linear type for system stateDefine linear type for system state
#define�chss_init�������0
#define�chss_thread�����1
#define�chss_irqsusp����2
#define�chss_irqdisable�3
#define�chss_irqwait����4
#define�chss_isr��������5
#define�chss_slock������6
#define�chss_ilock������7
absvtype�chss(s:int)
vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s)
vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s)
#define�chss_init�������0
#define�chss_thread�����1
#define�chss_irqsusp����2
#define�chss_irqdisable�3
#define�chss_irqwait����4
#define�chss_isr��������5
#define�chss_slock������6
#define�chss_ilock������7
absvtype�chss(s:int)
vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s)
vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s)
#define�chss_init�������0
#define�chss_thread�����1
#define�chss_irqsusp����2
#define�chss_irqdisable�3
#define�chss_irqwait����4
#define�chss_isr��������5
#define�chss_slock������6
#define�chss_ilock������7
absvtype�chss(s:int)
vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s)
vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s)
#define�chss_init�������0
#define�chss_thread�����1
#define�chss_irqsusp����2
#define�chss_irqdisable�3
#define�chss_irqwait����4
#define�chss_isr��������5
#define�chss_slock������6
#define�chss_ilock������7
absvtype�chss(s:int)
vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s)
vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s)
#define�chss_init�������0
#define�chss_thread�����1
#define�chss_irqsusp����2
#define�chss_irqdisable�3
#define�chss_irqwait����4
#define�chss_isr��������5
#define�chss_slock������6
#define�chss_ilock������7
absvtype�chss(s:int)
vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s)
vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s)
☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.
☆ The int represents ID of system state.☆ The int represents ID of system state.☆ The int represents ID of system state.☆ The int represents ID of system state.☆ The int represents ID of system state.
Import system API from CImport system API from CImport system API from CImport system API from CImport system API from C
extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void
��=�"mac#"
extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void
��=�"mac#"
extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void
��=�"mac#"
extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#"
extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t,
��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#"
extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void
��=�"mac#"
extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void
��=�"mac#"
extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void
��=�"mac#"
extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#"
extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t,
��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#"
extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void
��=�"mac#"
extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void
��=�"mac#"
extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void
��=�"mac#"
extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#"
extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t,
��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#"
extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void
��=�"mac#"
extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void
��=�"mac#"
extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void
��=�"mac#"
extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#"
extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t,
��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#"
extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void
��=�"mac#"
extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void
��=�"mac#"
extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void
��=�"mac#"
extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void
��=�"mac#"
extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#"
extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t,
��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#"
Using system API in ATSUsing system API in ATSUsing system API in ATSUsing system API in ATSUsing system API in ATS
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLock�(pss�│�)
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlock�(pss�│�)
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLock�(pss�│�)
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlock�(pss�│�)
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLock�(pss�│�)
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlock�(pss�│�)
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLock�(pss�│�)
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlock�(pss�│�)
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLock�(pss�│�)
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlock�(pss�│�)
138�}
☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument
If you call wrong system API...If you call wrong system API...If you call wrong system API...If you call wrong system API...If you call wrong system API...
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call!
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call!
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call!
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call!
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call!
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call!
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call!
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call!
138�}
128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#"
129�implement�tmr_init�(pss�│�p)�=�{
130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p)
131�
132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p)
133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p)
134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call!
135���extvar�"cnt"�=�POLLING_INTERVAL
136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp)
137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call!
138�}
ATS finds the error at compile-time!ATS finds the error at compile-time!ATS finds the error at compile-time!ATS finds the error at compile-time!ATS finds the error at compile-time!
$�patsopt�-o�build/obj/main.c�-d�main.dats
/home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-
FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):�
error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);�
S2Eintinf(5)))
$�patsopt�-o�build/obj/main.c�-d�main.dats
/home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-
FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):�
error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);�
S2Eintinf(5)))
$�patsopt�-o�build/obj/main.c�-d�main.dats
/home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-
FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):�
error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);�
S2Eintinf(5)))
$�patsopt�-o�build/obj/main.c�-d�main.dats
/home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-
FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):�
error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);�
S2Eintinf(5)))
$�patsopt�-o�build/obj/main.c�-d�main.dats
/home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-
FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):�
error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);�
S2Eintinf(5)))
☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",
☆ while checking Thread state "chss
(chss_thread)" equals ISR state "chss(chss_isr)".
☆ while checking Thread state "chss
(chss_thread)" equals ISR state "chss(chss_isr)".
☆ while checking Thread state "chss
(chss_thread)" equals ISR state "chss(chss_isr)".
☆ while checking Thread state "chss
(chss_thread)" equals ISR state "chss(chss_isr)".
☆ while checking Thread state "chss
(chss_thread)" equals ISR state "chss(chss_isr)".
☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.
Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by 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/
☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/
Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.
☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career
☆ Embedded development in agile style☆ Embedded development in agile style☆ Embedded development in agile style☆ Embedded development in agile style☆ Embedded development in agile style
☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!
Ads: Dive into VeriFast!Ads: Dive into VeriFast!Ads: Dive into VeriFast!Ads: Dive into VeriFast!Ads: Dive into VeriFast!
☆ https://people.cs.kuleuven.be/~bart.jacobs/
verifast/
☆ https://people.cs.kuleuven.be/~bart.jacobs/
verifast/
☆ https://people.cs.kuleuven.be/~bart.jacobs/
verifast/
☆ https://people.cs.kuleuven.be/~bart.jacobs/
verifast/
☆ https://people.cs.kuleuven.be/~bart.jacobs/
verifast/
☆ A verifier for single-threaded and multithreaded
C and Java programs annotated with
preconditions and postconditions written in
separation logic.
☆ A verifier for single-threaded and multithreaded
C and Java programs annotated with
preconditions and postconditions written in
separation logic.
☆ A verifier for single-threaded and multithreaded
C and Java programs annotated with
preconditions and postconditions written in
separation logic.
☆ A verifier for single-threaded and multithreaded
C and Java programs annotated with
preconditions and postconditions written in
separation logic.
☆ A verifier for single-threaded and multithreaded
C and Java programs annotated with
preconditions and postconditions written in
separation logic.
☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.
☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626
Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!
☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/
☆ AlphaGo☆ AlphaGo☆ AlphaGo☆ AlphaGo☆ AlphaGo
☆ Real-time OS and ATS language☆ Real-time OS and ATS language☆ Real-time OS and ATS language☆ Real-time OS and ATS language☆ Real-time OS and ATS language
☆ Internal set theory☆ Internal set theory☆ Internal set theory☆ Internal set theory☆ Internal set theory
☆ 日曜日⻄f32a☆ 日曜日⻄f32a☆ 日曜日⻄f32a☆ 日曜日⻄f32a☆ 日曜日⻄f32a
License of photos #1License of photos #1License of photos #1License of photos #1License of photos #1
*�Creative�Commons�BBB�│�Flickr
��https://www.flickr.com/photos/steren/2732488224/
��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0
*�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr
��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/
��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0
*�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr
��https://www.flickr.com/photos/pestoverde/16656096747/
��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0
*�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr
��https://www.flickr.com/photos/hinkelstone/2435823037/
��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0
*�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr
��https://www.flickr.com/photos/riyagi/11696094664/
��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0
*�Creative�Commons�BBB�│�Flickr
��https://www.flickr.com/photos/steren/2732488224/
��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0
*�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr
��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/
��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0
*�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr
��https://www.flickr.com/photos/pestoverde/16656096747/
��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0
*�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr
��https://www.flickr.com/photos/hinkelstone/2435823037/
��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0
*�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr
��https://www.flickr.com/photos/riyagi/11696094664/
��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0
*�Creative�Commons�BBB�│�Flickr
��https://www.flickr.com/photos/steren/2732488224/
��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0
*�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr
��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/
��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0
*�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr
��https://www.flickr.com/photos/pestoverde/16656096747/
��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0
*�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr
��https://www.flickr.com/photos/hinkelstone/2435823037/
��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0
*�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr
��https://www.flickr.com/photos/riyagi/11696094664/
��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0
*�Creative�Commons�BBB�│�Flickr
��https://www.flickr.com/photos/steren/2732488224/
��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0
*�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr
��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/
��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0
*�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr
��https://www.flickr.com/photos/pestoverde/16656096747/
��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0
*�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr
��https://www.flickr.com/photos/hinkelstone/2435823037/
��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0
*�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr
��https://www.flickr.com/photos/riyagi/11696094664/
��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0
*�Creative�Commons�BBB�│�Flickr
��https://www.flickr.com/photos/steren/2732488224/
��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0
*�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr
��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/
��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0
*�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr
��https://www.flickr.com/photos/pestoverde/16656096747/
��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0
*�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr
��https://www.flickr.com/photos/hinkelstone/2435823037/
��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0
*�Anime�Friends�-�2008�│�Ricardo�清介 ⼋⽊�│�Flickr
��https://www.flickr.com/photos/riyagi/11696094664/
��Copyright:�Ricardo�清介 ⼋⽊�/�License:�CC�BY�2.0
License of photos #2License of photos #2License of photos #2License of photos #2License of photos #2
*�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr
��https://www.flickr.com/photos/knightbaron/15966847927/
��Copyright:�KniBaron�/�License:�CC�BY�2.0
*�Horizon�│�Chris�│�Flickr
��https://www.flickr.com/photos/sparkyc/104995140/
��Copyright:�Chris�/�License:�CC�BY�2.0
*�YouTube�logo�│�Rego�Korosi�│�Flickr
��https://www.flickr.com/photos/korosirego/4481461680/
��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0
*�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr
��https://www.flickr.com/photos/knightbaron/15966847927/
��Copyright:�KniBaron�/�License:�CC�BY�2.0
*�Horizon�│�Chris�│�Flickr
��https://www.flickr.com/photos/sparkyc/104995140/
��Copyright:�Chris�/�License:�CC�BY�2.0
*�YouTube�logo�│�Rego�Korosi�│�Flickr
��https://www.flickr.com/photos/korosirego/4481461680/
��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0
*�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr
��https://www.flickr.com/photos/knightbaron/15966847927/
��Copyright:�KniBaron�/�License:�CC�BY�2.0
*�Horizon�│�Chris�│�Flickr
��https://www.flickr.com/photos/sparkyc/104995140/
��Copyright:�Chris�/�License:�CC�BY�2.0
*�YouTube�logo�│�Rego�Korosi�│�Flickr
��https://www.flickr.com/photos/korosirego/4481461680/
��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0
*�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr
��https://www.flickr.com/photos/knightbaron/15966847927/
��Copyright:�KniBaron�/�License:�CC�BY�2.0
*�Horizon�│�Chris�│�Flickr
��https://www.flickr.com/photos/sparkyc/104995140/
��Copyright:�Chris�/�License:�CC�BY�2.0
*�YouTube�logo�│�Rego�Korosi�│�Flickr
��https://www.flickr.com/photos/korosirego/4481461680/
��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0
*�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr
��https://www.flickr.com/photos/knightbaron/15966847927/
��Copyright:�KniBaron�/�License:�CC�BY�2.0
*�Horizon�│�Chris�│�Flickr
��https://www.flickr.com/photos/sparkyc/104995140/
��Copyright:�Chris�/�License:�CC�BY�2.0
*�YouTube�logo�│�Rego�Korosi�│�Flickr
��https://www.flickr.com/photos/korosirego/4481461680/
��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0

Contenu connexe

Tendances

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 + MCUKiwamu Okabe
 
Functional IoT: Programming Language and OS
Functional IoT: Programming Language and OSFunctional IoT: Programming Language and OS
Functional IoT: Programming Language and OSKiwamu Okabe
 
Embedded application designed by ATS language
Embedded application designed by ATS languageEmbedded application designed by ATS language
Embedded application designed by ATS languageKiwamu Okabe
 
Past and today of Metasepi project
Past and today of Metasepi projectPast and today of Metasepi project
Past and today of Metasepi projectKiwamu Okabe
 
ATS programming on ESP8266
ATS programming on ESP8266ATS programming on ESP8266
ATS programming on ESP8266Kiwamu Okabe
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformKiwamu Okabe
 
Metasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on ArduinoMetasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on ArduinoKiwamu Okabe
 
Functional IoT: Introduction
Functional IoT: IntroductionFunctional IoT: Introduction
Functional IoT: IntroductionKiwamu Okabe
 
Metasepi team meeting #17: Invariant captured by ATS's API
Metasepi team meeting #17: Invariant captured by ATS's APIMetasepi team meeting #17: Invariant captured by ATS's API
Metasepi team meeting #17: Invariant captured by ATS's APIKiwamu Okabe
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATSKiwamu Okabe
 
2009 Eclipse Con
2009 Eclipse Con2009 Eclipse Con
2009 Eclipse Conguest29922
 
Ajhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GCAjhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GCKiwamu Okabe
 
"Black Clouds and Silver Linings in Node.js Security" Liran Tal
"Black Clouds and Silver Linings in Node.js Security" Liran Tal"Black Clouds and Silver Linings in Node.js Security" Liran Tal
"Black Clouds and Silver Linings in Node.js Security" Liran TalJulia Cherniak
 
Spring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good partsSpring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good partsJarek Ratajski
 
Monkey-patching in Python: a magic trick or a powerful tool?
Monkey-patching in Python: a magic trick or a powerful tool?Monkey-patching in Python: a magic trick or a powerful tool?
Monkey-patching in Python: a magic trick or a powerful tool?Elizaveta Shashkova
 
C++ unit-1-part-15
C++ unit-1-part-15C++ unit-1-part-15
C++ unit-1-part-15Jadavsejal
 
Debugging with pry
Debugging with pryDebugging with pry
Debugging with pryCreditas
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...Hafez Kamal
 

Tendances (20)

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
 
Functional IoT: Programming Language and OS
Functional IoT: Programming Language and OSFunctional IoT: Programming Language and OS
Functional IoT: Programming Language and OS
 
Embedded application designed by ATS language
Embedded application designed by ATS languageEmbedded application designed by ATS language
Embedded application designed by ATS language
 
Past and today of Metasepi project
Past and today of Metasepi projectPast and today of Metasepi project
Past and today of Metasepi project
 
ATS programming on ESP8266
ATS programming on ESP8266ATS programming on ESP8266
ATS programming on ESP8266
 
Functional IoT: Hardware and Platform
Functional IoT: Hardware and PlatformFunctional IoT: Hardware and Platform
Functional IoT: Hardware and Platform
 
Metasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on ArduinoMetasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on Arduino
 
Functional IoT: Introduction
Functional IoT: IntroductionFunctional IoT: Introduction
Functional IoT: Introduction
 
ATS2 updates 2017
ATS2 updates 2017ATS2 updates 2017
ATS2 updates 2017
 
Metasepi team meeting #17: Invariant captured by ATS's API
Metasepi team meeting #17: Invariant captured by ATS's APIMetasepi team meeting #17: Invariant captured by ATS's API
Metasepi team meeting #17: Invariant captured by ATS's API
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATS
 
2009 Eclipse Con
2009 Eclipse Con2009 Eclipse Con
2009 Eclipse Con
 
Ajhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GCAjhc Haskell Compiler with Reentrant GC
Ajhc Haskell Compiler with Reentrant GC
 
"Black Clouds and Silver Linings in Node.js Security" Liran Tal
"Black Clouds and Silver Linings in Node.js Security" Liran Tal"Black Clouds and Silver Linings in Node.js Security" Liran Tal
"Black Clouds and Silver Linings in Node.js Security" Liran Tal
 
Spring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good partsSpring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good parts
 
Ruby - The Hard Bits
Ruby - The Hard BitsRuby - The Hard Bits
Ruby - The Hard Bits
 
Monkey-patching in Python: a magic trick or a powerful tool?
Monkey-patching in Python: a magic trick or a powerful tool?Monkey-patching in Python: a magic trick or a powerful tool?
Monkey-patching in Python: a magic trick or a powerful tool?
 
C++ unit-1-part-15
C++ unit-1-part-15C++ unit-1-part-15
C++ unit-1-part-15
 
Debugging with pry
Debugging with pryDebugging with pry
Debugging with pry
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
 

Similaire à Real-time OS system state captured by ATS language

Poster: Comparing ATS and VeriFast on RTOS system state
Poster: Comparing ATS and VeriFast on RTOS system statePoster: Comparing ATS and VeriFast on RTOS system state
Poster: Comparing ATS and VeriFast on RTOS system stateKiwamu Okabe
 
Poster: Generate ATS interface from C code, and introduce linear type
Poster: Generate ATS interface from C code, and introduce linear typePoster: Generate ATS interface from C code, and introduce linear type
Poster: Generate ATS interface from C code, and introduce linear typeKiwamu Okabe
 
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 @ OsakaKiwamu Okabe
 
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...PROIDEA
 
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, againKiwamu Okabe
 
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 @ NagoyaKiwamu Okabe
 
JSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of ARJSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of ARYusuke Kawasaki
 
flowr streamlining computing workflows
flowr streamlining computing workflowsflowr streamlining computing workflows
flowr streamlining computing workflowssahil seth
 
Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11John Wilker
 
Is persistency on serverless even possible?!
Is persistency on serverless even possible?!Is persistency on serverless even possible?!
Is persistency on serverless even possible?!SecuRing
 
Safer IoT using functional language
Safer IoT using functional languageSafer IoT using functional language
Safer IoT using functional languageKiwamu Okabe
 
Developing A Procedural Language For Postgre Sql
Developing A Procedural Language For Postgre SqlDeveloping A Procedural Language For Postgre Sql
Developing A Procedural Language For Postgre SqlJoshua Drake
 
An OCaml newbie meets Camlp4 parser
An OCaml newbie meets Camlp4 parserAn OCaml newbie meets Camlp4 parser
An OCaml newbie meets Camlp4 parserKiwamu Okabe
 
How would you describe Swift in three words?
How would you describe Swift in three words?How would you describe Swift in three words?
How would you describe Swift in three words?Colin Eberhardt
 
Cranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhoneCranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhoneNoel Llopis
 
SPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetupSPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetupHasith Yaggahavita
 
Sangam 18 - Database Development: Return of the SQL Jedi
Sangam 18 - Database Development: Return of the SQL JediSangam 18 - Database Development: Return of the SQL Jedi
Sangam 18 - Database Development: Return of the SQL JediConnor McDonald
 
The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)Mike Friedman
 

Similaire à Real-time OS system state captured by ATS language (20)

Poster: Comparing ATS and VeriFast on RTOS system state
Poster: Comparing ATS and VeriFast on RTOS system statePoster: Comparing ATS and VeriFast on RTOS system state
Poster: Comparing ATS and VeriFast on RTOS system state
 
Poster: Generate ATS interface from C code, and introduce linear type
Poster: Generate ATS interface from C code, and introduce linear typePoster: Generate ATS interface from C code, and introduce linear type
Poster: Generate ATS interface from C code, and introduce linear type
 
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
 
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
 
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
 
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
 
JSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of ARJSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
JSARToolKit / LiveChromaKey / LivePointers - Next gen of AR
 
flowr streamlining computing workflows
flowr streamlining computing workflowsflowr streamlining computing workflows
flowr streamlining computing workflows
 
Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11
 
Is persistency on serverless even possible?!
Is persistency on serverless even possible?!Is persistency on serverless even possible?!
Is persistency on serverless even possible?!
 
Safer IoT using functional language
Safer IoT using functional languageSafer IoT using functional language
Safer IoT using functional language
 
Developing A Procedural Language For Postgre Sql
Developing A Procedural Language For Postgre SqlDeveloping A Procedural Language For Postgre Sql
Developing A Procedural Language For Postgre Sql
 
C++ Naming Conventions
C++ Naming ConventionsC++ Naming Conventions
C++ Naming Conventions
 
An OCaml newbie meets Camlp4 parser
An OCaml newbie meets Camlp4 parserAn OCaml newbie meets Camlp4 parser
An OCaml newbie meets Camlp4 parser
 
How would you describe Swift in three words?
How would you describe Swift in three words?How would you describe Swift in three words?
How would you describe Swift in three words?
 
Php extensions
Php extensionsPhp extensions
Php extensions
 
Cranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhoneCranking Floating Point Performance To 11 On The iPhone
Cranking Floating Point Performance To 11 On The iPhone
 
SPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetupSPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetup
 
Sangam 18 - Database Development: Return of the SQL Jedi
Sangam 18 - Database Development: Return of the SQL JediSangam 18 - Database Development: Return of the SQL Jedi
Sangam 18 - Database Development: Return of the SQL Jedi
 
The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)
 

Dernier

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 

Dernier (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 

Real-time OS system state captured by ATS language

  • 1. Real-time OS system state captured by ATS language Real-time OS system state captured by ATS language Real-time OS system state captured by ATS language Real-time OS system state captured by ATS language Real-time OS system state captured by ATS language Kiwamu OkabeKiwamu OkabeKiwamu OkabeKiwamu OkabeKiwamu Okabe
  • 2. Real-time OS: ChibiOS/RTReal-time OS: ChibiOS/RTReal-time OS: ChibiOS/RTReal-time OS: ChibiOS/RTReal-time OS: ChibiOS/RT ☆ http://www.chibios.org/☆ http://www.chibios.org/☆ http://www.chibios.org/☆ http://www.chibios.org/☆ http://www.chibios.org/ ☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS☆ Simple/Small/Fast/Portable real-time OS ☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC e200 ☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC e200 ☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC e200 ☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC e200 ☆ Run on ARM Cortex-M*, Arduino Uno, PowerPC e200 ☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec☆ Context Switch (STM32F4xx): 0.40 µsec ☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte☆ Kernel Size (STM32F4xx): 6172 byte
  • 3. System state in ChibiOS/RTSystem state in ChibiOS/RTSystem state in ChibiOS/RTSystem state in ChibiOS/RTSystem state in ChibiOS/RT
  • 4. Class of system API in ChibiOS/RTClass of system API in ChibiOS/RTClass of system API in ChibiOS/RTClass of system API in ChibiOS/RTClass of system API in ChibiOS/RT ☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread☆ "Normal" must be called on Thread ☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked☆ "S-Class" must be called on S-Locked ☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked☆ "I-Class" must be called on I-Locked or S-Locked ☆ "X-Class" must be called on Thread, S-Locked or I-Locked ☆ "X-Class" must be called on Thread, S-Locked or I-Locked ☆ "X-Class" must be called on Thread, S-Locked or I-Locked ☆ "X-Class" must be called on Thread, S-Locked or I-Locked ☆ "X-Class" must be called on Thread, S-Locked or I-Locked ☆ "Special" have special execution requirements☆ "Special" have special execution requirements☆ "Special" have special execution requirements☆ "Special" have special execution requirements☆ "Special" have special execution requirements ☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state☆ "Object Initializers" can be used in any state
  • 5. Example: chSysLock()Example: chSysLock()Example: chSysLock()Example: chSysLock()Example: chSysLock() ☆ Enters the kernel lock mode☆ Enters the kernel lock mode☆ Enters the kernel lock mode☆ Enters the kernel lock mode☆ Enters the kernel lock mode ☆ Special function☆ Special function☆ Special function☆ Special function☆ Special function ☆ Should be called on Thread state☆ Should be called on Thread state☆ Should be called on Thread state☆ Should be called on Thread state☆ Should be called on Thread state ☆ Change system state into S-Locked state☆ Change system state into S-Locked state☆ Change system state into S-Locked state☆ Change system state into S-Locked state☆ Change system state into S-Locked state
  • 6. Example: chVTSetI()Example: chVTSetI()Example: chVTSetI()Example: chVTSetI()Example: chVTSetI() ☆ Enables a virtual timer☆ Enables a virtual timer☆ Enables a virtual timer☆ Enables a virtual timer☆ Enables a virtual timer ☆ I-Class function☆ I-Class function☆ I-Class function☆ I-Class function☆ I-Class function ☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state☆ Should be called on I-Locked or S-Locked state ☆ Doesn't change system state☆ Doesn't change system state☆ Doesn't change system state☆ Doesn't change system state☆ Doesn't change system state
  • 7. Using system API in CUsing system API in CUsing system API in CUsing system API in CUsing system API in C static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLock(); ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlock(); } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLock(); ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlock(); } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLock(); ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlock(); } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLock(); ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlock(); } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLock(); ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlock(); } ☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state☆ tmr_init() function begins on Thread state
  • 8. Undefined behavior by wrong calling!Undefined behavior by wrong calling!Undefined behavior by wrong calling!Undefined behavior by wrong calling!Undefined behavior by wrong calling! static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLockFromISR();���//�wrong�call! ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlockFromISR();�//�wrong�call! } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLockFromISR();���//�wrong�call! ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlockFromISR();�//�wrong�call! } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLockFromISR();���//�wrong�call! ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlockFromISR();�//�wrong�call! } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLockFromISR();���//�wrong�call! ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlockFromISR();�//�wrong�call! } static�void�tmr_init(void�*p)�{ ��chEvtObjectInit(&inserted_event); ��chEvtObjectInit(&removed_event); ��chSysLockFromISR();���//�wrong�call! ��cnt�=�POLLING_INTERVAL; ��chVTSetI(&tmr,�MS2ST(POLLING_DELAY),�tmrfunc,�p); ��chSysUnlockFromISR();�//�wrong�call! } ☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but...☆ The code has no error at compile-time, but... ☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!☆ it may cause undefined behavior at run-time!
  • 9. Want to avoid it at compile-time...Want to avoid it at compile-time...Want to avoid it at compile-time...Want to avoid it at compile-time...Want to avoid it at compile-time... ☆ The system state is a state machine.☆ The system state is a state machine.☆ The system state is a state machine.☆ The system state is a state machine.☆ The system state is a state machine. ☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?☆ Type system captures it at compile-time?
  • 10. ATS language can do that!ATS language can do that!ATS language can do that!ATS language can do that!ATS language can do that! ☆ 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 is similar to ML☆ Syntax is similar to ML☆ Syntax is similar to ML☆ Syntax is similar to ML☆ Syntax is similar to ML ☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types☆ DML-style dependent types / Linear types ☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer☆ Theorem proving / Safely use pointer ☆ Without GC / Without runtime☆ Without GC / Without runtime☆ Without GC / Without runtime☆ Without GC / Without runtime☆ Without GC / Without runtime ☆ Compiled into C language code☆ Compiled into C language code☆ Compiled into C language code☆ Compiled into C language code☆ Compiled into C language code
  • 11. ATS programing on ChibiOS/RTATS programing on ChibiOS/RTATS programing on ChibiOS/RTATS programing on ChibiOS/RTATS programing on ChibiOS/RT ☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2☆ https://github.com/fpiot/chibios-ats-2 ☆ ATS code is found at following:☆ ATS code is found at following:☆ ATS code is found at following:☆ ATS code is found at following:☆ ATS code is found at following: ☆ https://github.com/fpiot/chibios-ats-2/blob/ master/demos/STM32/RT-STM32F746G- DISCOVERY-LWIP-FATFS-USB/main.dats ☆ https://github.com/fpiot/chibios-ats-2/blob/ master/demos/STM32/RT-STM32F746G- DISCOVERY-LWIP-FATFS-USB/main.dats ☆ https://github.com/fpiot/chibios-ats-2/blob/ master/demos/STM32/RT-STM32F746G- DISCOVERY-LWIP-FATFS-USB/main.dats ☆ https://github.com/fpiot/chibios-ats-2/blob/ master/demos/STM32/RT-STM32F746G- DISCOVERY-LWIP-FATFS-USB/main.dats ☆ https://github.com/fpiot/chibios-ats-2/blob/ master/demos/STM32/RT-STM32F746G- DISCOVERY-LWIP-FATFS-USB/main.dats
  • 13. Define linear type for system stateDefine linear type for system stateDefine linear type for system stateDefine linear type for system stateDefine linear type for system state #define�chss_init�������0 #define�chss_thread�����1 #define�chss_irqsusp����2 #define�chss_irqdisable�3 #define�chss_irqwait����4 #define�chss_isr��������5 #define�chss_slock������6 #define�chss_ilock������7 absvtype�chss(s:int) vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s) vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s) #define�chss_init�������0 #define�chss_thread�����1 #define�chss_irqsusp����2 #define�chss_irqdisable�3 #define�chss_irqwait����4 #define�chss_isr��������5 #define�chss_slock������6 #define�chss_ilock������7 absvtype�chss(s:int) vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s) vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s) #define�chss_init�������0 #define�chss_thread�����1 #define�chss_irqsusp����2 #define�chss_irqdisable�3 #define�chss_irqwait����4 #define�chss_isr��������5 #define�chss_slock������6 #define�chss_ilock������7 absvtype�chss(s:int) vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s) vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s) #define�chss_init�������0 #define�chss_thread�����1 #define�chss_irqsusp����2 #define�chss_irqdisable�3 #define�chss_irqwait����4 #define�chss_isr��������5 #define�chss_slock������6 #define�chss_ilock������7 absvtype�chss(s:int) vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s) vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s) #define�chss_init�������0 #define�chss_thread�����1 #define�chss_irqsusp����2 #define�chss_irqdisable�3 #define�chss_irqwait����4 #define�chss_isr��������5 #define�chss_slock������6 #define�chss_ilock������7 absvtype�chss(s:int) vtypedef�chss_any�=�[s:int�│�chss_init�<=�s;�s�<=�chss_ilock]�chss(s) vtypedef�chss_iclass�=�[s:int�│�s�==�chss_slock�││�s�==�chss_ilock]�chss(s) ☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int.☆ Linear type "chss" depends on static int. ☆ The int represents ID of system state.☆ The int represents ID of system state.☆ The int represents ID of system state.☆ The int represents ID of system state.☆ The int represents ID of system state.
  • 14. Import system API from CImport system API from CImport system API from CImport system API from CImport system API from C extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void ��=�"mac#" extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void ��=�"mac#" extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void ��=�"mac#" extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void ��=�"mac#" extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void ��=�"mac#" extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#" extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t, ��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#" extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void ��=�"mac#" extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void ��=�"mac#" extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void ��=�"mac#" extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void ��=�"mac#" extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void ��=�"mac#" extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#" extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t, ��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#" extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void ��=�"mac#" extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void ��=�"mac#" extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void ��=�"mac#" extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void ��=�"mac#" extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void ��=�"mac#" extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#" extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t, ��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#" extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void ��=�"mac#" extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void ��=�"mac#" extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void ��=�"mac#" extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void ��=�"mac#" extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void ��=�"mac#" extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#" extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t, ��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#" extern�fun�chSysLock�(!chss(chss_thread)�>>�chss(chss_slock)�│�):�void ��=�"mac#" extern�fun�chSysUnlock�(!chss(chss_slock)�>>�chss(chss_thread)�│�):�void ��=�"mac#" extern�fun�chSysLockFromISR�(!chss(chss_isr)�>>�chss(chss_ilock)�│�):�void ��=�"mac#" extern�fun�chSysUnlockFromISR�(!chss(chss_ilock)�>>�chss(chss_isr)�│�):�void ��=�"mac#" extern�fun�chEvtBroadcastI�(!chss_iclass�│�cPtr0(event_source_t)):�void ��=�"mac#" extern�fun�chEvtObjectInit�(!chss_any�│�cPtr0(event_source_t)):�void�=�"mac#" extern�fun�chVTSetI�(!chss_iclass�│�cPtr0(virtual_timer_t),�systime_t, ��vtfunc_t,�cPtr0(BaseBlockDevice)):�void�=�"mac#"
  • 15. Using system API in ATSUsing system API in ATSUsing system API in ATSUsing system API in ATSUsing system API in ATS 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLock�(pss�│�) 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlock�(pss�│�) 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLock�(pss�│�) 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlock�(pss�│�) 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLock�(pss�│�) 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlock�(pss�│�) 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLock�(pss�│�) 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlock�(pss�│�) 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLock�(pss�│�) 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlock�(pss�│�) 138�} ☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument☆ Every function takes linear type as 1st argument
  • 16. If you call wrong system API...If you call wrong system API...If you call wrong system API...If you call wrong system API...If you call wrong system API... 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call! 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call! 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call! 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call! 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call! 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call! 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call! 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call! 138�} 128�extern�fun�tmr_init�(!chss(chss_thread)�│�ptr):�void�=�"mac#" 129�implement�tmr_init�(pss�│�p)�=�{ 130���val�bbdp�=�$UN.cast{cPtr0(BaseBlockDevice)}(p) 131� 132���val�()�=�chEvtObjectInit�(pss�│�inserted_event_p) 133���val�()�=�chEvtObjectInit�(pss�│�removed_event_p) 134���val�()�=�chSysLockFromISR�(pss�│�)���//�wrong�call! 135���extvar�"cnt"�=�POLLING_INTERVAL 136���val�()�=�chVTSetI�(pss�│�tmr_p,�MS2ST�(POLLING_DELAY),�tmrfunc,�bbdp) 137���val�()�=�chSysUnlockFromISR�(pss�│�)�//�wrong�call! 138�}
  • 17. ATS finds the error at compile-time!ATS finds the error at compile-time!ATS finds the error at compile-time!ATS finds the error at compile-time!ATS finds the error at compile-time! $�patsopt�-o�build/obj/main.c�-d�main.dats /home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP- FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):� error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);� S2Eintinf(5))) $�patsopt�-o�build/obj/main.c�-d�main.dats /home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP- FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):� error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);� S2Eintinf(5))) $�patsopt�-o�build/obj/main.c�-d�main.dats /home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP- FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):� error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);� S2Eintinf(5))) $�patsopt�-o�build/obj/main.c�-d�main.dats /home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP- FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):� error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);� S2Eintinf(5))) $�patsopt�-o�build/obj/main.c�-d�main.dats /home/kiwamu/src/chibios-ats-2/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP- FATFS-USB/main.dats:�4617(line=134,�offs=30)�--�4620(line=134,�offs=33):� error(3):�unsolved�constraint:�C3NSTRprop(C3TKmain();�S2Eeqeq(S2Eintinf(1);� S2Eintinf(5))) ☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5",☆ It means that ATS compiler can't solve "1 == 5", ☆ while checking Thread state "chss (chss_thread)" equals ISR state "chss(chss_isr)". ☆ while checking Thread state "chss (chss_thread)" equals ISR state "chss(chss_isr)". ☆ while checking Thread state "chss (chss_thread)" equals ISR state "chss(chss_isr)". ☆ while checking Thread state "chss (chss_thread)" equals ISR state "chss(chss_isr)". ☆ while checking Thread state "chss (chss_thread)" equals ISR state "chss(chss_isr)". ☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.☆ Because "chss_thread" is 1 and "chss_isr" is 5.
  • 18. Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by ATS!Let's enjoy capturing properties by 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/ ☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/☆ http://jats-ug.metasepi.org/
  • 19. Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc.Ads: Join Life Robotics Inc. ☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career☆ https://liferobotics.jp/career ☆ Embedded development in agile style☆ Embedded development in agile style☆ Embedded development in agile style☆ Embedded development in agile style☆ Embedded development in agile style ☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!☆ Specification language developed by OCaml!
  • 20. Ads: Dive into VeriFast!Ads: Dive into VeriFast!Ads: Dive into VeriFast!Ads: Dive into VeriFast!Ads: Dive into VeriFast! ☆ https://people.cs.kuleuven.be/~bart.jacobs/ verifast/ ☆ https://people.cs.kuleuven.be/~bart.jacobs/ verifast/ ☆ https://people.cs.kuleuven.be/~bart.jacobs/ verifast/ ☆ https://people.cs.kuleuven.be/~bart.jacobs/ verifast/ ☆ https://people.cs.kuleuven.be/~bart.jacobs/ verifast/ ☆ A verifier for single-threaded and multithreaded C and Java programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multithreaded C and Java programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multithreaded C and Java programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multithreaded C and Java programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multithreaded C and Java programs annotated with preconditions and postconditions written in separation logic. ☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m.☆ Next meetup at Friday, July 22, 6:30 p.m. ☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626☆ https://fpiot.doorkeeper.jp/events/47626
  • 21. Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90!Ads: Functional Ikamusume at C90! ☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/☆ http://www.paraiso-lang.org/ikmsm/ ☆ AlphaGo☆ AlphaGo☆ AlphaGo☆ AlphaGo☆ AlphaGo ☆ Real-time OS and ATS language☆ Real-time OS and ATS language☆ Real-time OS and ATS language☆ Real-time OS and ATS language☆ Real-time OS and ATS language ☆ Internal set theory☆ Internal set theory☆ Internal set theory☆ Internal set theory☆ Internal set theory ☆ 日曜日⻄f32a☆ 日曜日⻄f32a☆ 日曜日⻄f32a☆ 日曜日⻄f32a☆ 日曜日⻄f32a
  • 22. License of photos #1License of photos #1License of photos #1License of photos #1License of photos #1 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr ��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/ ��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0 *�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr ��https://www.flickr.com/photos/pestoverde/16656096747/ ��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0 *�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr ��https://www.flickr.com/photos/hinkelstone/2435823037/ ��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0 *�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr ��https://www.flickr.com/photos/riyagi/11696094664/ ��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr ��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/ ��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0 *�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr ��https://www.flickr.com/photos/pestoverde/16656096747/ ��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0 *�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr ��https://www.flickr.com/photos/hinkelstone/2435823037/ ��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0 *�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr ��https://www.flickr.com/photos/riyagi/11696094664/ ��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr ��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/ ��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0 *�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr ��https://www.flickr.com/photos/pestoverde/16656096747/ ��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0 *�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr ��https://www.flickr.com/photos/hinkelstone/2435823037/ ��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0 *�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr ��https://www.flickr.com/photos/riyagi/11696094664/ ��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr ��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/ ��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0 *�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr ��https://www.flickr.com/photos/pestoverde/16656096747/ ��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0 *�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr ��https://www.flickr.com/photos/hinkelstone/2435823037/ ��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0 *�Anime�Friends�-�2008�│�Ricardo�清介�⼋⽊�│�Flickr ��https://www.flickr.com/photos/riyagi/11696094664/ ��Copyright:�Ricardo�清介�⼋⽊�/�License:�CC�BY�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�Circle�Packing�Artifacts�│�Some�artifacts�from�an�agent-base��│�Flickr ��https://www.flickr.com/photos/blprnt/4217234991/in/photostream/ ��Copyright:�Jer�Thorp�/�License:�CC�BY�2.0 *�Mercedes�Benz�S�Class�Coupe�Concept�│�Maurizio�Pesce�│�Flickr ��https://www.flickr.com/photos/pestoverde/16656096747/ ��Copyright:�Maurizio�Pesce�/�License:�CC�BY�2.0 *�labyrinthine�circuit�board�lines�│�In�the�center�of�the�roun��│�Flickr ��https://www.flickr.com/photos/hinkelstone/2435823037/ ��Copyright:�Karl-Ludwig�Poggemann�/�License:�CC�BY�2.0 *�Anime�Friends�-�2008�│�Ricardo�清介 ⼋⽊�│�Flickr ��https://www.flickr.com/photos/riyagi/11696094664/ ��Copyright:�Ricardo�清介 ⼋⽊�/�License:�CC�BY�2.0
  • 23. License of photos #2License of photos #2License of photos #2License of photos #2License of photos #2 *�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr ��https://www.flickr.com/photos/knightbaron/15966847927/ ��Copyright:�KniBaron�/�License:�CC�BY�2.0 *�Horizon�│�Chris�│�Flickr ��https://www.flickr.com/photos/sparkyc/104995140/ ��Copyright:�Chris�/�License:�CC�BY�2.0 *�YouTube�logo�│�Rego�Korosi�│�Flickr ��https://www.flickr.com/photos/korosirego/4481461680/ ��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0 *�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr ��https://www.flickr.com/photos/knightbaron/15966847927/ ��Copyright:�KniBaron�/�License:�CC�BY�2.0 *�Horizon�│�Chris�│�Flickr ��https://www.flickr.com/photos/sparkyc/104995140/ ��Copyright:�Chris�/�License:�CC�BY�2.0 *�YouTube�logo�│�Rego�Korosi�│�Flickr ��https://www.flickr.com/photos/korosirego/4481461680/ ��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0 *�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr ��https://www.flickr.com/photos/knightbaron/15966847927/ ��Copyright:�KniBaron�/�License:�CC�BY�2.0 *�Horizon�│�Chris�│�Flickr ��https://www.flickr.com/photos/sparkyc/104995140/ ��Copyright:�Chris�/�License:�CC�BY�2.0 *�YouTube�logo�│�Rego�Korosi�│�Flickr ��https://www.flickr.com/photos/korosirego/4481461680/ ��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0 *�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr ��https://www.flickr.com/photos/knightbaron/15966847927/ ��Copyright:�KniBaron�/�License:�CC�BY�2.0 *�Horizon�│�Chris�│�Flickr ��https://www.flickr.com/photos/sparkyc/104995140/ ��Copyright:�Chris�/�License:�CC�BY�2.0 *�YouTube�logo�│�Rego�Korosi�│�Flickr ��https://www.flickr.com/photos/korosirego/4481461680/ ��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0 *�Cardcaptor�Sakura�│�moby.to/0j3c6l�│�KniBaron�│�Flickr ��https://www.flickr.com/photos/knightbaron/15966847927/ ��Copyright:�KniBaron�/�License:�CC�BY�2.0 *�Horizon�│�Chris�│�Flickr ��https://www.flickr.com/photos/sparkyc/104995140/ ��Copyright:�Chris�/�License:�CC�BY�2.0 *�YouTube�logo�│�Rego�Korosi�│�Flickr ��https://www.flickr.com/photos/korosirego/4481461680/ ��Copyright:�Rego�Korosi�/�License:�CC�BY-SA�2.0