SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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...
 

Semelhante a 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
 

Semelhante a 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)
 

Último

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

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