modellang is an event modeling language built with ease of use and flexibility in mind. The driving concept behind this is the separation of model description into two distinct parts: behaviors and interactions.
To wit, let us describe a model where one task sends messages and another task will then receieve them:
SYSTEM: task_a = send*;
SYSTEM: task_b = receive*;
INTERACTION: task_a:send -> task_b:receive;
modellang is not just an ergonomic language, though. Its trace generator is able to simulate all possible scenarios of a model within a small scope, producing a queryable set of results.
A modellang model is composed of systems of behaviors, interactions between the systems, and triggers that control properties.
A system is a top-level event, and is where trace generation starts. Can consist of composite events (behaviors) or atomic events.
SYSTEM: sys = behavior_pattern atomic_event;
BEHAVIOR: behavior_pattern = expanded detail;
An interaction can fall into one of three categories: relations. pre-conditions, and post-conditions:
selectors (also found in triggers) are patterns just like system and behavior definitions, but come with a prepended system: to inform the generator where to look for the pattern
INTERACTION: sys:before -> other_sys:after;
INTERACTION: sys:shared_event == other_sys:shared_event;
INTERACTION: property > 5 -> thing:happens_only_above_5;
INTERACTION: thing:never_drops_below_three -> other_property >= 3;
A trigger is a chunk of code that will execute whenever the specified selector pattern occurs during trace generation.
WHEN: sys:event1 event2 { property++ };
Behavior patterns are the way in which events are described.
SYSTEM: sequence = a whitespace delimited list of events occurring in order;
SYSTEM: group = you can even (wrap stuff into groups);
SYSTEM: alternation = a (pipe | vertical bar | stick) delimited list of sequences;
BEHAVIOR: quantifiers = none_or_more* one_or_more+ none_or_one?;
BEHAVIOR: ranges = do_exactly_n_times{n} do_at_least_n_times{n,} do_n_to_m{n,m};
Whitespace is insignificant.
Comments are C-style.