RML: RUNTIME MONITORING LANGUAGE

Luca Franceschini

VORTEX 2019
18 July 2019, London, UK

A System-Agnostic DSL for Runtime Verification

RML LANGUAGE

Goals:

  • Instrumentation-independent
    (thus language-independent)
  • Programmer-friendly syntax
  • Expressivity
  • JSON-encoded events
  • Both offline and online RV

PROPOSED ARCHITECTURE

EXAMPLE: ITERATORS

iterator matches { name: 'iterator' };
hasNext(res) matches { name: 'hasNext', result: res };
next matches { name: 'next' };

Main = empty ∨ iterator (hasNext(true) next)* hasNext(false);

Event domain: method calls

PARAMETRICITY

iterator(id) matches { name: 'iterator', resultId: id };
hasNext(id, res) matches { name: 'hasNext', result: res, targetId: id };
next(id) matches { name: 'next', targetId: id };

Main = empty ∨ { let id;
    iterator(id)
    (hasNext(id, true) next(id))*
    hasNext(id, false)
};

Event domain: method calls

MONITORING MANY OBJECTS

iterator(id) matches { name: 'iterator', resultId: id };
hasNext(id, res) matches { name: 'hasNext', result: res, targetId: id };
next(id) matches { name: 'next', targetId: id };

Main = empty ∨ { let id; iterator(id)
    (Main | (hasNext(id, true) next(id))* hasNext(id, false))
};

Event domain: method calls

GENERICS AND COMPUTATIONS

// event types push(val), pop(val), size(s) to be defined

Stack<s> = size(s)* { let val;
    push(val) Stack<s+1> pop(val) Stack<s>
}?;

Main = Stack<0>;

INTERSECTION AND FILTERS

// event types enq(val), deq and deq(val) to be defined

Main = { let val;
    enq(val)
    ((deq | Main ) ∧ ( deq ≫ deq(val) all))
}?;

Context-sensitive property!

VERDICT

4-value logic for the verdict (RV-LTL, Bauer et al.):

  • False
  • Presumably false
  • Presumably true
  • True

IMPLEMENTATION

BENCHMARKS

BENCHMARKS

QUESTIONS?

VORTEX'19

By Luca Franceschini

VORTEX'19

  • 1,845