Runtime verification based on
CSP
TSSS-3
AIST, Mar. 23, 2015
Yoriyuki Yamagata, Artho Cyrille, Masami Hagiya, Alexander Kohan,
Lei Ma, Nazim Sebih, Yoshinori Tanabe, Mitsuharu Yamamoto
Web servers
Backend server
Internet
Web servers
Backend serverMonitoring server
Log
Log
Internet
Goal
Runtime monitoring framework with

• natural notations for concurrency

• integration to the network applications

• web server, DB, syslog, etc…
Current status
• A monitor for dtruss output is implemented

• Check whether open/close system calls are
matched or not
Monitor definition
Command line
stracematch yoriyuki$ time target/pack/bin/strace-match <
wget.log > trace.wget
SLF4J: Failed to load class
"org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger
implementation
SLF4J: See http://www.slf4j.org/
codes.html#StaticLoggerBinder for further details.
real 0m1.219s
user 0m2.595s
sys 0m0.165s
Output trace
open("/dev/dtracehelper0", 0x2, 0x7FFF4FF071A0)
= 3 0
{Set(||Set() Bag(jp.go.aist.cspe.Rec0@57536d79;
jp.go.aist.cspe.ParamPrefix@2473b9ce))}
…
close(0x5) = 0 0
{Set()}
…
{Set()}
false
State explosion
Observation
• Parsing log file is not trivial

• use of fluentd?

• Writing down a correct monitor is not easy

• State explosion easily occurs
Future works
• Complete modeling of the file descriptor life cycle

• Improve error reporting

• Interface to fluentd

Runtime verification based on CSP