-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread identification #212
Conversation
…, improve handling of external library calls
Can you check in the C source for the two examples please |
It already exists for 'basic_assign_pthread' and never existed for the 'pthread' example (someone else committed it but without the source) which is why I removed it. |
Oh ok my mistake, I thought it was a newly added example |
This obviously needs to wait for #204 to be merged in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine, I left some comments for things to clean up.
case _ => | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be written in a functional style (since we have the iterator defined on the IR program you can do program.collect{}) but its still pretty interpret-able as is.
if (threadTargets.size > 1) { | ||
// currently can't handle case where the thread created is ambiguous | ||
throw Exception("can't handle thread creation with more than one possible target") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all we currently do is output extra programs to verify we can probably just attempt to resolve all the targets and add them as separate threads.
@@ -78,9 +85,9 @@ object Main { | |||
val q = BASILConfig( | |||
loading = ILLoadingConfig(conf.inputFileName, conf.relfFileName, conf.specFileName, conf.dumpIL, conf.mainProcedureName, conf.procedureDepth), | |||
runInterpret = conf.interpret.value, | |||
staticAnalysis = if conf.analyse.value then Some(StaticAnalysisConfig(conf.dumpIL, conf.analysisResults, conf.analysisResultsDot)) else None, | |||
staticAnalysis = if conf.analyse.value then Some(StaticAnalysisConfig(conf.dumpIL, conf.analysisResults, conf.analysisResultsDot, conf.threadSplit.value)) else None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could have --threads imply --analyse
…dures within threads
# Conflicts: # src/main/scala/ir/Program.scala
Splits threads into separate boogie output files. Currently only works for pthreads (support for other thread libraries can be added later)
-t
flag enables this functionality and requires the--analyse
flag to be used alongside it.