they must be specified in the classpath for the compiler the static analysis
the static analysis is integrated in the file system and a Makefile is provided
first tests with the build script showed that
the extension in the prl script works like java -cp "/usr/local"/bin/openpearl_compiler.jar:"/usr/local/lib/antlr-4.8-complete.jar":$APACHECOMMONS:$MJSON org/openpearl/compiler/Compiler \
$standard $PRLFLAGS $prlccinput.prl --createCfg --debugCfg --verbose --debug\
--imc-output $fn.xml \
--output $outputPrlCC
`
the generated dot-files remain in the /tmp-folder
a simple example works from the command line, with java -cp ../../compiler/src/org/openpearl/static_analyzer-out/static_analyzer.jar:../../compiler/minimal-json-0.9.5.jar static_analyzer/StaticAnalyzer unorderedLocking
next steps:
the update for the runtime for dynamic deadlock detection
add a compiler option for deadlock detection
the external libraries should be replaced by system libraries
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
commons-lang3-3.12.0.jar was only used in a never called debug function --> function removed by comments
minimal-json-0.9.5.jar was used in compiler and static_analyzer
in compiler the javax.json routines provided by ANTLR could be used
in static_analyzer the ANTLR rozutines could not be used, since the classes for parsing were missing --> a simple replacement named MyJsonObject was implemented from scratch with support of
int
boolean
string
array of strings
changes in the runtime system integrated
some includes moved from header to implementation
using namespace stdremoved and std:: added at the usage
testsuite/deadlockTest/unorderedLocking.prl detects deadlock in the runtime system
next steps
update prl-script to
pass parameters for deadlock detection
move generated dot-file to source folder
invoke staticAnalyzer
rename runtime/common/hfujk to runtime/common/DeadlockDetection
find answers to the following questions
what is the output location for dynamic deadlock detections?
what should happen if a deadlock occurred?
Message to stderr ok?
Message to Log and generate an interrupt?
emit a signal?
what is required for multi module support?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
disabled with warning if REF TASK/PROC/SEMA/BOLT is used
dynamic deadlock detection included in the runtime system
missing points
PRLFLAGS environment variable currently not used, but is required for verifyAnnotationsPEARL90
runtime/common/hfujk shoud become renamed to dynamicDeadlockDetection
static deadlock detection should be provided by a simplified control flow graph to minimize heap usage (706_convert.prl causes heap overflow at my development machine and takes 2 minutes time)
dynamic deadlock detection does not work with esp32
maybe
dynamic deadlock detection enable/disable by option, if memory or computing power must be saved
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
disabled with warning if REF TASK/PROC/SEMA/BOLT is used
dynamic deadlock detection included in the runtime system
missing points
add copyright notice to all new files
PRLFLAGS environment variable currently not used, but is required for verifyAnnotationsPEARL90
runtime/common/hfujk shoud become renamed to dynamicDeadlockDetection
static deadlock detection should be provided by a simplified control flow graph to minimize heap usage (706_convert.prl causes heap overflow at my development machine and takes 2 minutes time)
dynamic deadlock detection does not work with esp32
maybe
dynamic deadlock detection enable/disable by option, if memory or computing power must be saved
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
copyright notice added added to static and dynamic deadlock detection files
rename in runtime from hfujk to DynamicDeadlockDetection
found items to optimize
dynamic deadlock detection stores the names of resources and tasks as string in DeadlockOperation.h. This should be replaced by pointers to TaskCommon and Sema/Bolt
resource allocation log
uses stringstream
ResourceAllocationGraph::isDeadlocked() to cout should print to platform dependend channel or Log
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
copyright notice added added to static and dynamic deadlock detection files
rename in runtime from hfujk to DynamicDeadlockDetection
logging of deadlock operations disabled by default
found items to optimize
dynamic deadlock detection stores the names of resources and tasks as string in DeadlockOperation.h. This should be replaced by pointers to TaskCommon and Sema/Bolt
resource allocation log
uses stringstream
ResourceAllocationGraph::isDeadlocked() to cout should print to platform dependend channel or Log
enable/disable of logging lock operations should be possible by option (e.g. Log::DEADLOCK)
dynamic deadlock detection seams to be incomplete with deadlock operation via REF SEMA/BOLT, since the deadlock operations are hard coded with task and resource name --> testsuite/build/851_ref_deref.prl fails
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
copyright notice added added to static and dynamic deadlock detection files
rename in runtime from hfujk to DynamicDeadlockDetection
logging of deadlock operations disabled by default
deadlock detection (static and dynamic) is disabled if REF TASK/PROC/SEMA or BOLT is detected
found items to optimize
dynamic deadlock detection stores the names of resources and tasks as string in DeadlockOperation.h. This should be replaced by pointers to TaskCommon and Sema/Bolt
resource allocation log
uses stringstream
ResourceAllocationGraph::isDeadlocked() to cout should print to platform dependend channel or Log
enable/disable of logging lock operations should be possible by option (e.g. Log::DEADLOCK)
dynamic deadlock detection seams to be incomplete with deadlock operation via REF SEMA/BOLT, since the deadlock operations are hard coded with task and resource name --> testsuite/build/851_ref_deref.prl fails
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
status:
hfujkhfujkintegration plan:
compiler/hfujktocompiler/DeadLockDetectionLast edit: Rainer Müller 2022-10-31
status update concerning my working directory:
java -cp "/usr/local"/bin/openpearl_compiler.jar:"/usr/local/lib/antlr-4.8-complete.jar":$APACHECOMMONS:$MJSON org/openpearl/compiler/Compiler \ $standard $PRLFLAGS $prlccinput.prl --createCfg --debugCfg --verbose --debug\ --imc-output $fn.xml \ --output $outputPrlCC`
java -cp ../../compiler/src/org/openpearl/static_analyzer-out/static_analyzer.jar:../../compiler/minimal-json-0.9.5.jar static_analyzer/StaticAnalyzer unorderedLockingnext steps:
replacement of external libraries done
--> function removed by comments
--> a simple replacement named MyJsonObject was implemented from scratch with support of
changes in the runtime system integrated
using namespace stdremoved andstd::added at the usagetestsuite/deadlockTest/unorderedLocking.prl detects deadlock in the runtime system
next steps
runtime/common/hfujktoruntime/common/DeadlockDetectionstatus update
integration continued
missing points
verifyAnnotationsPEARL90status update
integration continued
missing points
verifyAnnotationsPEARL90Status update
found items to optimize
DeadlockOperation.h. This should be replaced by pointers toTaskCommonandSema/BoltstringstreamResourceAllocationGraph::isDeadlocked()tocoutshould print to platform dependend channel orLogStatus update
found items to optimize
DeadlockOperation.h. This should be replaced by pointers toTaskCommonandSema/BoltstringstreamResourceAllocationGraph::isDeadlocked()tocoutshould print to platform dependend channel orLogtestsuite/build/851_ref_deref.prlfailsStatus update
found items to optimize
DeadlockOperation.h. This should be replaced by pointers toTaskCommonandSema/BoltstringstreamResourceAllocationGraph::isDeadlocked()tocoutshould print to platform dependend channel orLogtestsuite/build/851_ref_deref.prlfailsNext steps
Next steps
status update
endOfBlockLoopProcOrTask: 'END';next steps
--std=OpenPEARLLast edit: Rainer Müller 2023-03-01
status update for item 1 of next steps above
multi module support works with
Last edit: Rainer Müller 2023-04-21
commit of the current state
the ticket was divided into #429 static deadlock detection and #430 dynamic deadlock detection
--> close this ticket