From 2682a7d9a3d11b46f2d67cc238b77ceebe29b425 Mon Sep 17 00:00:00 2001 From: vovatrykoz Date: Wed, 13 Nov 2024 16:27:09 +0100 Subject: [PATCH] minor naming refactor and style adjustment --- include/MathFramework.h | 15 +++++++++------ source/MathFramework.cpp | 13 ++++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/include/MathFramework.h b/include/MathFramework.h index 6ecdea1..2594537 100644 --- a/include/MathFramework.h +++ b/include/MathFramework.h @@ -1,6 +1,7 @@ // Contains functions from section 3.4 Mathematical Framework -// Some of the description text is copy-pasted from A Compositional Framework for End-to-End Path Delay Calculation -// of Automotive Systems under Different Path Semantics to make finding relevant functions easier +// Some of the description text is copy-pasted from A Compositional Framework +// for End-to-End Path Delay Calculation of Automotive Systems under Different +// Path Semantics to make finding relevant functions easier #ifndef _MATH_FRAMEWORK_H_ #define _MATH_FRAMEWORK_H_ @@ -20,20 +21,22 @@ * writer). * @return false if activation time travel does not occur. */ -bool att(const TaskInstance& writerTask, const TaskInstance& readerTask); +bool att(const TaskInstance& writerTaskInstance, + const TaskInstance& readerTaskInstance); /** * @brief Determines if the writer and reader tasks overlap in execution. - * + * * The more important “critical function” crit determines if * (even in case of non-activation time travel) writer and reader * overlap in execution: - * + * * @param writerTask The task instance representing the writer. * @param readerTask The task instance representing the reader. * @return true if there is an overlap in execution between writer and reader. * @return false if there is no overlap in execution. */ -bool crit(const TaskInstance& writerTask, const TaskInstance& readerTask); +bool crit(const TaskInstance& writerTaskInstance, + const TaskInstance& readerTaskInstance); #endif \ No newline at end of file diff --git a/source/MathFramework.cpp b/source/MathFramework.cpp index 7500a39..e4dbb8c 100644 --- a/source/MathFramework.cpp +++ b/source/MathFramework.cpp @@ -1,17 +1,20 @@ #include "MathFramework.h" -bool att(const TaskInstance& writerTask, const TaskInstance& readerTask) { - if(readerTask.activationTime < writerTask.activationTime) { +bool att(const TaskInstance& writerTaskInstance, + const TaskInstance& readerTaskInstance) { + if (readerTaskInstance.activationTime < writerTaskInstance.activationTime) { return true; } return false; } -bool crit(const TaskInstance& writerTask, const TaskInstance& readerTask) { - int writerTaskTerminationTime = writerTask.activationTime + writerTask.wcet; +bool crit(const TaskInstance& writerTaskInstance, + const TaskInstance& readerTaskInstance) { + int writerTaskTerminationTime = + writerTaskInstance.activationTime + writerTaskInstance.wcet; - if(readerTask.activationTime < writerTaskTerminationTime) { + if (readerTaskInstance.activationTime < writerTaskTerminationTime) { return true; }