UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

25 lines 935 B
"use strict"; /* * A state-machine simulator. * * Igor Konnov, 2023 * * Copyright 2023 Informal Systems * Licensed under the Apache License, Version 2.0. * See LICENSE in the project root for license information. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.showTraceStatistics = exports.getTraceStatistics = void 0; function getTraceStatistics(traceLengths) { return { maxTraceLength: Math.max(...traceLengths), minTraceLength: Math.min(...traceLengths), averageTraceLength: traceLengths.reduce((a, b) => a + b, 0) / traceLengths.length, }; } exports.getTraceStatistics = getTraceStatistics; function showTraceStatistics(stats) { return `Trace length statistics: max=${stats.maxTraceLength}, min=${stats.minTraceLength}, average=${stats.averageTraceLength.toFixed(2)}`; } exports.showTraceStatistics = showTraceStatistics; //# sourceMappingURL=simulation.js.map