LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
coverage.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2026, QORE Lab, Imperial College London
3 * All rights reserved.
4 */
5#ifndef LINE_LANG_LAL_COVERAGE_H
6#define LINE_LANG_LAL_COVERAGE_H
7
8/**
9 * @file
10 * @ingroup line_lang
11 * LINE Agent Language (LAL): the coverage matrix of LAL against the model
12 * features LINE can declare. Port of python/line_solver/lal/coverage.py.
13 *
14 * LAL captures ALL and ONLY the Markovian models LINE declares. This is the
15 * checked-in record of that claim, one row per feature, so that a feature
16 * LINE gains and LAL does not cover shows up as a missing row rather than as
17 * a silent gap. Columns: `family` and `feature` (what LINE declares),
18 * `status` (`accepted`, `refused` or `gap`), `hand` (expressible by
19 * hand-declared agents), `embedded` (expressible by embedding the LINE
20 * object), `solvers` (LAL solver paths that interpret it) and `reason`.
21 */
22
23#include <string>
24#include <vector>
25
26namespace line {
27namespace lal {
28
29/** One row of the coverage matrix. */
32};
33
34/** The coverage matrix (`coverage_table`), one row per feature, in the reference order. */
35inline std::vector<CoverageRow> coverage_table() {
36 const std::string ALL = "CTMC, SSA(serial)";
37 std::vector<CoverageRow> rows;
38 auto row = [&](const std::string& family, const std::string& feature, const std::string& status,
39 const std::string& hand, const std::string& embedded, const std::string& solvers,
40 const std::string& reason = std::string()) {
41 rows.push_back(CoverageRow{family, feature, status, hand, embedded, solvers, reason});
42 };
43 // --- laws
44 // MMPP is the MAP (Q - diag(lambda), diag(lambda)) and MarkedMMPP the MMAP
45 // with diagonal marked blocks; both are stored under those process types
46 // (Distrib::mmpp, Distrib::marked_mmpp), as in every codebase.
47 for (const char* law : {"Exp", "Erlang", "HyperExp", "PH", "APH", "Coxian", "Cox2", "MAP", "MMPP2", "MMPP",
48 "MarkedMAP (MMAP)", "MarkedMMPP", "MPH"})
49 row("Law", law, "accepted", "yes (phases as states)", "yes", ALL + ", MAM where recognized");
50 row("Law", "BMAP (arrivals)", "accepted", "yes (phases as states)", "yes", ALL,
51 "a batch arc departs the Source once per job and lands each job where it is routed; a BMAP "
52 "service (bulk server) is refused by SolverCTMC");
53 row("Law", "Immediate", "accepted", "yes (immediate action)", "yes", ALL,
54 "zero-time: vanishing states are eliminated");
55 row("Law", "Disabled", "accepted", "yes (no transition)", "yes", ALL);
56 for (const char* law : {"Det", "Uniform", "Gamma", "Pareto", "Weibull", "Lognormal", "LogLogistic", "Normal",
57 "Expolynomial", "MassAtOrigin", "Defective", "Prior", "MultivariateNormal"})
58 row("Law", law, "refused", "no", "no", "", "non-Markovian holding time");
59 for (const char* law : {"ME", "CME", "RAP"})
60 row("Law", law, "refused", "no", "no", "", "matrix-exponential law with no CTMC representation in general");
61 for (const char* law : {"DMAP", "MMDP", "MMDP2"}) row("Law", law, "refused", "no", "no", "", "discrete-time process");
62 for (const char* law : {"NHPP", "NNPP", "MAPt", "PHt", "MMAPt", "MPHt", "BMMAPt"})
63 row("Law", law, "refused", "no", "no", "", "time-inhomogeneous process");
64 for (const char* law : {"Geometric", "Binomial", "NegBinomial", "Poisson", "Zipf", "Empirical", "Bernoulli",
65 "DiscreteUniform", "DiscreteSampler", "EmpiricalCdf"})
66 row("Law", std::string(law) + " (holding time or batch size)", "refused", "no", "no", "",
67 "discrete law; accepted only as a cache popularity or fork task count");
68 row("Law", "Replayer, Trace", "refused", "no", "no", "", "trace-driven");
69 // --- network nodes and features
70 for (const char* node : {"Source", "Sink", "Queue", "Delay", "Router", "ClassSwitch", "Fork", "Join", "Cache",
71 "Place", "Transition", "Logger"})
72 row("Node", node, "accepted", "yes (agents with typed state)", "yes, one agent per node", ALL,
73 "non-stateful nodes are agents on the routing paths they lie on (sn.rtnodes)");
74 for (const char* sched : {"FCFS", "LCFS", "LCFSPR", "LCFSPI", "PS", "DPS", "GPS", "INF", "RAND/SIRO", "HOL",
75 "SEPT", "LEPT", "POLLING", "LPS", "PSPRIO/DPSPRIO/GPSPRIO",
76 "FCFS/LCFS priority and preemptive variants", "PAS/OI", "RR", "EXT (at a Source)"})
77 row("Scheduling", sched, "accepted", "yes", "yes", ALL);
78 for (const char* sched : {"EDD", "EDF", "SETF", "FSP"})
79 row("Scheduling", sched, "refused", "no", "no", "",
80 "deadline/elapsed-time policies need a per-job clock outside a memoryless CTMC");
81 for (const char* sched : {"SJF", "LJF", "SRPT", "SRPTPRIO", "PSJF", "LRPT", "FB/LAS"})
82 row("Scheduling", sched, "refused", "no", "no", "",
83 "size-based policies order jobs by their size, remaining or attained service, a per-job "
84 "quantity outside a memoryless CTMC; SolverCTMC refuses them in every codebase");
85 for (const char* routing : {"PROB", "RAND", "RROBIN", "WRROBIN", "JSQ", "SQ", "SDR", "FIRING", "DISABLED"})
86 row("Routing", routing, "accepted", "yes (functional weights for state-dependent rules)", "yes", ALL);
87 for (const char* feature : {"finite capacity, drop rules (DROP, BAS, BBS, RSRD, WAITQ)",
88 "multiserver, heterogeneous servers", "load/class/joint/global dependence",
89 "class priorities", "reneging (Exp patience)", "retrial (Exp, unlimited)", "balking",
90 "breakdown and repair", "polling (switchover)", "switchover times",
91 "negative signals and catastrophes", "immediate feedback", "marked arrivals (MMAP)",
92 "cache replacement RR/FIFO/SFIFO/LRU/HLRU/CLIMB/QLRU, item sizes, retrieval",
93 "fork-join (closed classes)",
94 "Petri-net modes, inhibitors, priorities, weights, firing-rate dependence"})
95 row("Network feature", feature, "accepted", "yes", "yes", ALL);
96 // A DROP region is a filter on this port's enumerated space
97 // (`ctmc_filter_regions`) and a WAITQ region is read from the augmented
98 // region walk (`solver_ctmc_waitq`), which fills the LAL collect itself.
99 row("Network feature", "finite capacity regions (DROP or WAITQ)", "accepted", "yes", "yes", ALL,
100 "read from SolverCTMC's augmented region generator: a refused job's arc carries its departure but "
101 "no arrival, and a release carries the arrival of each job it lets in");
102 row("Network feature", "fork-join with open classes, quorum or partial joins", "accepted", "yes", "yes", ALL,
103 "a partial join fires on its quorum; an open chain through a Fork is truncated at the cutoff, "
104 "which is how many fork-join jobs may be in progress at once");
105 row("Network feature", "server parallelism (FCFS)", "accepted", "yes", "yes", ALL,
106 "a class-r job holds n_r servers for its whole service; head-of-line jobs start while they fit");
107 row("Network feature", "setup and delay-off (FCFS)", "accepted", "yes", "yes", ALL,
108 "servers are OFF, in SETUP, ACTIVE or in DELAYOFF, with SETUP and DELAYOFF clock actions; "
109 "SolverCTMC serves it at FCFS stations");
110 row("Network feature", "retrial with an attempt limit (open class, LINEAR policy)", "accepted", "yes", "yes",
111 ALL, "the orbit is split by the retries each job has failed; a job failing its last allowed retry is lost");
112 row("Network feature", "batch arrivals (Source.set_arrival_batch)", "refused", "no", "no", "",
113 "discrete batch-size law (a BMAP expresses Markovian batches)");
114 row("Network feature", "fluid places and transitions", "refused", "no", "no", "", "fluid, not a CTMC");
115 row("Network feature", "Markovian features SolverCTMC refuses", "gap", "case by case", "no", "",
116 "the embedding reads SolverCTMC's generator, so its refusal is the embedding's");
117 // --- other families
118 row("Family", "Environment (competing PH clocks, kernel arcs)", "accepted", "yes", "yes", ALL,
119 // resetStateFun is carried per arc by env::Environment
120 // (set_state_reset), the same field SolverEnv statevec reads
121 "reset: keep, queue-length maps (clear, callables), resetStateFun");
122 row("Family", "Environment with a non-Markovian holding law", "refused", "no", "no", "", "semi-Markov");
123 row("Family", "LayeredNetwork (infinite-server tasks)", "accepted", "yes", "yes, through LQN2QN", ALL,
124 "LINE's own LQN2QN translation; what it refuses, LAL refuses");
125 row("Family", "LayeredNetwork with a finite task multiplicity", "accepted", "yes", "yes, through LQN2QN", ALL,
126 "LQN2QN admits a finite-multiplicity task through a WAITQ finite capacity region, which embeds "
127 "(see the finite capacity regions row)");
128 row("Family", "MarkovProcess", "accepted", "yes", "yes, one agent", ALL);
129 row("Family", "MarkovChain", "accepted", "yes (discrete-time agent)", "yes, one agent", "CTMC",
130 "one part only; throughputs are per-step frequencies; SSA refuses it");
131 row("Family", "Workflow (series-parallel)", "accepted", "yes", "yes, labelled by activity", ALL);
132 row("Family", "Workflow (not series-parallel)", "accepted", "yes", "yes, completion events only", ALL,
133 "LINE's block reduction does not attribute phases to activities");
134 return rows;
135}
136
137} // namespace lal
138} // namespace line
139
140#endif // LINE_LANG_LAL_COVERAGE_H
Definition ag.h:49
std::vector< CoverageRow > coverage_table()
The coverage matrix (coverage_table), one row per feature, in the reference order.
Definition coverage.h:35
Conservation laws of a layered queueing network, enumerated from its structure.
Definition aoi_dist2ph.h:51
One row of the coverage matrix.
Definition coverage.h:30
std::string status
Definition coverage.h:31
std::string family
Definition coverage.h:31
std::string feature
Definition coverage.h:31
std::string embedded
Definition coverage.h:31
std::string solvers
Definition coverage.h:31
std::string reason
Definition coverage.h:31