-
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
Rewrite IR Interpreter #241
Conversation
inputFile = s"examples/$name/$name.adt", | ||
relfFile = s"examples/$name/$name.relf", |
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.
Tests should be updated to use inputs from the tests folder instead of the examples folder (which has mostly been removed)
I haven't had a deep look at this yet but:
|
# Conflicts: # src/main/scala/analysis/ExprSSAEval.scala # src/main/scala/ir/Interpreter.scala # src/main/scala/ir/Program.scala # src/main/scala/ir/eval/BitVectorEval.scala # src/main/scala/util/RunUtils.scala # src/test/scala/ir/InterpreterTests.scala
|
||
import scala.collection.mutable | ||
|
||
class ConstPropInterpreterValidate extends AnyFunSuite { |
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 doesn't match the name of the file, it should have a consistent name.
I've merged main into this so it is up-to-date now but there are some outstanding issues with DifferentialAnalysis that should be addressed before this is merged into main:
These issues existed before the merge. This still holds too and would be very very good to have:
There are a few formatting & organisational issues I intend to fix as well, such as fixing where the file structure doesn't match the package structure. |
Since this took two months to merge these changes (and the parameter pr) have been included in #256 and it has been updated with the current main. I don't intend to address any of the issues you mention here.
This is due to these programs having no main procedure, so the test cases are dubious to begin with.
The formattting isn't broken. These show what is printed to stdout which is useful to know when the interepted program is printing to stdout. I'm not interested in making a complete implementation of
Extensive documentation is provided here https://github.com/UQ-PAC/BASIL/pull/241/files#diff-4926c58a6f33f8324a92d12cf914e957622fb809f0692aee0777b7dad2d02c7a In future, don't chuck a 300 line diff of superficial syntax and formatting changes on the end of my pr please. I'm closing this as the changes are included in the other pr. |
Rewrite of the interpreter in a FP state-monad style, supporting new features
This builds on the call-statement pr and includes the readelf loading changes.
DifferentialAnalysis
which runs all thesrc/test/correct
example programs through the static analysis, and compares the interpreter's final state, and execution trace to the un-transformed program. Many of these still fall over due to missing intrinsics (e.g. malloc), and memory initialisation.ConstPropInterpreterValidate
which converts the const-prop results to boolean expressions, and runs the interpreter, asserting that the results hold at every code point.For more details see https://github.com/UQ-PAC/BASIL/blob/interpreter/docs/development/interpreter.md
Incidentally on my computer the interpreter runs at approximately 345 kHz (basil instructions/second)