-
Notifications
You must be signed in to change notification settings - Fork 49
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
Topic/genc v2: ready for general review #290
Commits on Feb 13, 2017
-
- augment list of known compilers (with compcert) - adapt this list for the current OS - use advanced parameters (e.g. sanitizers) - run all found compilers - add ability to disable a given compiler on a case-by-case basis - ignore files generated by tests - improve error messages - report warnings and other errors from the GenC phase (and others)
Configuration menu - View commit details
-
Copy full SHA for 37b7e5a - Browse repository at this point
Copy the full SHA 37b7e5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 420b145 - Browse repository at this point
Copy the full SHA 420b145View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86a0538 - Browse repository at this point
Copy the full SHA 86a0538View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf7d3b1 - Browse repository at this point
Copy the full SHA bf7d3b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d35c0d3 - Browse repository at this point
Copy the full SHA d35c0d3View commit details -
This new implementation of GenC uses a pipelined approach: the translation of Scala code into C99 equivalent code is split into several phases that live in the `leon.genc.phases` package. The overall process is bases on several versions of an Intermediate Representation (IR) that is defined under `leon.genc.ir`. Additionally, the C AST was partially redesigned. This new implementation is supposed to be better than the previous version in terms of bugs but there remain a few areas for improvement: * The `ClassLifter` is slightly incomplete: class fields should be processed as well. * When converting nested generic functions, the Scala2IRPhase might not do a proper job. Both of these points are explained in the source code; see the corresponding TODOs.
Configuration menu - View commit details
-
Copy full SHA for 0e280b1 - Browse repository at this point
Copy the full SHA 0e280b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c31230a - Browse repository at this point
Copy the full SHA c31230aView commit details -
Make sure to use a new reporter for each test in GenCSuite
This avoids propagating failures from one test to the next.
Configuration menu - View commit details
-
Copy full SHA for 6e56930 - Browse repository at this point
Copy the full SHA 6e56930View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e9528c - Browse repository at this point
Copy the full SHA 0e9528cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09cb198 - Browse repository at this point
Copy the full SHA 09cb198View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cd74d0 - Browse repository at this point
Copy the full SHA 6cd74d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c00391 - Browse repository at this point
Copy the full SHA 3c00391View commit details -
Configuration menu - View commit details
-
Copy full SHA for f40514e - Browse repository at this point
Copy the full SHA f40514eView commit details -
Blind attempt to improve GenCSuite for Larabot
Hope is that shutting down fsc will prevent two concurrent build to mess with one another.
Configuration menu - View commit details
-
Copy full SHA for 3907f38 - Browse repository at this point
Copy the full SHA 3907f38View commit details -
Explicitly reject ArrayUpdated constructs
ArrayUpdated, which represents Array.updated(index, newValue) and therefore builds a new array, should not be confused by ArrayUpdate, which updates a given array element in place.
Configuration menu - View commit details
-
Copy full SHA for 0321eb5 - Browse repository at this point
Copy the full SHA 0321eb5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c5fe34 - Browse repository at this point
Copy the full SHA 7c5fe34View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad0266c - Browse repository at this point
Copy the full SHA ad0266cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 862775f - Browse repository at this point
Copy the full SHA 862775fView commit details -
Ensure GenC tests actually test something
Since the introduction of the new dependency finder, many functions/types were no longer examined by GenC.
Configuration menu - View commit details
-
Copy full SHA for 121d765 - Browse repository at this point
Copy the full SHA 121d765View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91b4dff - Browse repository at this point
Copy the full SHA 91b4dffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d4ad3f - Browse repository at this point
Copy the full SHA 4d4ad3fView commit details -
Make GenC tests return a value in [0, 255] to avoid false positive
On most systems, the return value from a program is truncated to its least significant byte.
Configuration menu - View commit details
-
Copy full SHA for be87190 - Browse repository at this point
Copy the full SHA be87190View commit details -
Add regression test for operator Equals
Note: this could get supported by generating the proper function definitions and replacing the operator by a function call.
Configuration menu - View commit details
-
Copy full SHA for 240326b - Browse repository at this point
Copy the full SHA 240326bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ffaa95c - Browse repository at this point
Copy the full SHA ffaa95cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd81242 - Browse repository at this point
Copy the full SHA bd81242View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe3bb1f - Browse repository at this point
Copy the full SHA fe3bb1fView commit details -
Remove useless optimisation of id translation
This can also prevent some clashes with C std functions.
Configuration menu - View commit details
-
Copy full SHA for d151c31 - Browse repository at this point
Copy the full SHA d151c31View commit details -
Update regression test about invalid pattern matching
Xlang now ensures no side effect so we remove this test from GenC.
Configuration menu - View commit details
-
Copy full SHA for 0472cd5 - Browse repository at this point
Copy the full SHA 0472cd5View commit details -
Note: when using the private ctor of FIS/FOS, Leon will emit something like this: [info] [ Error ] Test.scala:93:16: Class leon.io.FileInputStream not defined? [info] val fis1 = FIS(Some("input.txt")) [info] ^^^ and therefore identifying the call to the constructor as faulty.
Configuration menu - View commit details
-
Copy full SHA for 1dd6229 - Browse repository at this point
Copy the full SHA 1dd6229View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e015bf - Browse repository at this point
Copy the full SHA 8e015bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8460f96 - Browse repository at this point
Copy the full SHA 8460f96View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5f5a76 - Browse repository at this point
Copy the full SHA a5f5a76View commit details -
- Use >>> in Scala to represent >> in C; - Cast signed integer to unsigned integer before shifting, and cast result back to signed integer afterward (see NOTE in code for rational)
Configuration menu - View commit details
-
Copy full SHA for 2516a3c - Browse repository at this point
Copy the full SHA 2516a3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e463dbb - Browse repository at this point
Copy the full SHA e463dbbView commit details -
Make GenCSuite robust against encoding issues
Now the outputs are compared at a byte level, not at a string level (which can be invalid).
Configuration menu - View commit details
-
Copy full SHA for c198ce0 - Browse repository at this point
Copy the full SHA c198ce0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8929200 - Browse repository at this point
Copy the full SHA 8929200View commit details -
Add support for more forms of Pattern Matching in GenC
Namely, LetTuple & LetPattern constructs
Configuration menu - View commit details
-
Copy full SHA for c592017 - Browse repository at this point
Copy the full SHA c592017View commit details -
Configuration menu - View commit details
-
Copy full SHA for f71f3f1 - Browse repository at this point
Copy the full SHA f71f3f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 261bcb9 - Browse repository at this point
Copy the full SHA 261bcb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49ae298 - Browse repository at this point
Copy the full SHA 49ae298View commit details -
Configuration menu - View commit details
-
Copy full SHA for a539b6a - Browse repository at this point
Copy the full SHA a539b6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 584ae3b - Browse repository at this point
Copy the full SHA 584ae3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 782c9b9 - Browse repository at this point
Copy the full SHA 782c9b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for bbf6d6e - Browse repository at this point
Copy the full SHA bbf6d6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b00e85f - Browse repository at this point
Copy the full SHA b00e85fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b2a45f5 - Browse repository at this point
Copy the full SHA b2a45f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c99fcc - Browse repository at this point
Copy the full SHA 4c99fccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 739a1c7 - Browse repository at this point
Copy the full SHA 739a1c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02b89d8 - Browse repository at this point
Copy the full SHA 02b89d8View commit details -
Add some aliasing regression tests that should get rejected
They are currently disabled because implementing a rejection phase for those is not as simple as it might seem. Similar cases can occur though pattern matching, for example.
Configuration menu - View commit details
-
Copy full SHA for 9194733 - Browse repository at this point
Copy the full SHA 9194733View commit details -
Emit warnings on recursive functions
Let the user know this is not 100% MISRA compliant. With stack size analysis this issue could be solved.
Configuration menu - View commit details
-
Copy full SHA for 9b4a33d - Browse repository at this point
Copy the full SHA 9b4a33dView commit details -
Enable more C optimisation by making every function static
Except for the main function which should not be static
Configuration menu - View commit details
-
Copy full SHA for 1b8e55f - Browse repository at this point
Copy the full SHA 1b8e55fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca6a2de - Browse repository at this point
Copy the full SHA ca6a2deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76b546a - Browse repository at this point
Copy the full SHA 76b546aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2855b6b - Browse repository at this point
Copy the full SHA 2855b6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3282308 - Browse repository at this point
Copy the full SHA 3282308View commit details -
Configuration menu - View commit details
-
Copy full SHA for bedc207 - Browse repository at this point
Copy the full SHA bedc207View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc1236d - Browse repository at this point
Copy the full SHA fc1236dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 38f1c76 - Browse repository at this point
Copy the full SHA 38f1c76View commit details -
Configuration menu - View commit details
-
Copy full SHA for b687527 - Browse repository at this point
Copy the full SHA b687527View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34ff8ee - Browse repository at this point
Copy the full SHA 34ff8eeView commit details -
Use a different representation for Dictionary in LZW
This representation is less efficient in terms of speed of the produced code, but requires far less small arrays and therefore significantly improve the performance of GenC and C compilers to compile the code. Also, less properties are proven on this implementation.
Configuration menu - View commit details
-
Copy full SHA for b98422b - Browse repository at this point
Copy the full SHA b98422bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec5db50 - Browse repository at this point
Copy the full SHA ec5db50View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8ecf7c - Browse repository at this point
Copy the full SHA c8ecf7cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ca576f - Browse repository at this point
Copy the full SHA 8ca576fView commit details -
Moving LZW implementations to a new testcases section
Because they are slow to generate, slow to compile and slow to execute, they cannot be part of the regression suite.
Configuration menu - View commit details
-
Copy full SHA for ec37922 - Browse repository at this point
Copy the full SHA ec37922View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1748148 - Browse repository at this point
Copy the full SHA 1748148View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46be524 - Browse repository at this point
Copy the full SHA 46be524View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70138c5 - Browse repository at this point
Copy the full SHA 70138c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f77238b - Browse repository at this point
Copy the full SHA f77238bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a583e1b - Browse repository at this point
Copy the full SHA a583e1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 05c2136 - Browse repository at this point
Copy the full SHA 05c2136View commit details -
Configuration menu - View commit details
-
Copy full SHA for a35be9a - Browse repository at this point
Copy the full SHA a35be9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b53420 - Browse repository at this point
Copy the full SHA 3b53420View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e84253 - Browse repository at this point
Copy the full SHA 5e84253View commit details -
Configuration menu - View commit details
-
Copy full SHA for bae8c9a - Browse repository at this point
Copy the full SHA bae8c9aView commit details -
Add case study ImageProcessing for GenC
Use comments to select the kernel you want to use, then recompile.
Configuration menu - View commit details
-
Copy full SHA for e27a4f7 - Browse repository at this point
Copy the full SHA e27a4f7View commit details