Граф коммитов

6587 Коммитов

Автор SHA1 Сообщение Дата
AndreiDiaconu1 2724075dec Added stmts
Added support for `ForStmt` and `DoWhileStmt`
Added test cases
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 b6287b904c Preliminary refactoring
Some preliminary refactoring of the TranslatedDeclaration.qll file
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 1e4b3fafb6 Updated expected for crement ops 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 940ba694d2 Arithmetic increment and decrement expressions
Correct code is now produced for increment and decrement expressions
Modified producesExprResult() and TTranslatedLoad() so that no loads are done from outside the crement exprs and that the VariableAddress generated from the access of the operator variable is recognized as an expr that produces result.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 3bc6456572 Work on throw statements, bug fixes, small refactor.
Throw statements now give correct code, apart from the case of rethrows: need to make explicit the fact that a finally block is executed even if stack unwinding happens.
Added 2 new classes to TranslatedStmt.qll, one for throws that have an exception, one for rethrows.
Fixed a bug in TranslatedDeclarationEntry.qll where some local declaration would be missed.
Changed toString into getQualifiedName for more clarity when generating the instructions in Instruction.qll.
Some general refactoring in TranslatedExpr.qll and TranslatedStmt.qll.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 b90bc96cb5 Objects tests and fix in PrintIR
Added tests to showcase the instructions generated for object creation and object initialization
Updated raw_ir.expected
PrintIR now uses the qualified name (with types) when printing the IR for more clarity
2019-08-28 12:25:13 +01:00
Andrei Diaconu 8661074fc3 Object creation and initialization + refactoring
Correct code is now generated from ObjectCreation exprs and ObjectInitializer exprs.
Removed TranslatedFieldInitialization and its subclasses and further refactored TranslatedInitialization
2019-08-28 12:25:13 +01:00
Andrei Diaconu dae37e5472 Fixed bugs, updated tests
Fixed a bug in TranslatedExpr: decl + init where the rhs is a reference now work as expected
Uncommented the code for the switch statement
2019-08-28 12:25:13 +01:00
Andrei Diaconu be01b031b0 Fixed and refactored code for arrays
Introduced 2 new tags to support multidimensional arrays
Multidimensional arrays produce correct code
All types of initializations for arrays work correctly
2019-08-28 12:25:13 +01:00
Andrei Diaconu 35b028e626 Initial work for objects and statements
Objects now work, although I will refactor the code quite a bit for clarity
If and while statements now produce good code
Began work on try statements
2019-08-28 12:25:13 +01:00
Andrei Diaconu 4462babc0b Added support for switch stmt (CS 6.0 style) 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 de6f547088 Synced more files 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 49777636aa Applied the review comments 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 ffb22bfff8 Locatable -> Language::AST 2019-08-28 12:25:13 +01:00
Andrei Diaconu 9105641741 Update csharp/ql/src/semmle/code/csharp/ir/IRSanity.ql
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com>
2019-08-28 12:25:13 +01:00
Andrei Diaconu 81d8905a0f Update csharp/ql/src/semmle/code/csharp/ir/PrintIR.ql
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com>
2019-08-28 12:25:13 +01:00
Andrei Diaconu ce06bd8af3 Update csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRSanity.ql
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com>
2019-08-28 12:25:13 +01:00
Andrei Diaconu d8f8b47605 Update csharp/ql/src/semmle/code/csharp/ir/implementation/raw/PrintIR.ql
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com>
2019-08-28 12:25:13 +01:00
Dave Bartolomeo 073812b6f1 Rename `Cpp` -> `CSharp` 2019-08-28 12:25:13 +01:00
Dave Bartolomeo 609ca034c0 C#/C++: Share IR implementation 2019-08-28 12:25:13 +01:00
Andrei Diaconu 50ba4d1fda Deleted folder 2019-08-28 12:25:13 +01:00
Andrei Diaconu 45455a12d6 Fixed function calls
Function calls now produce correct code.
Added 2 test cases to showcase this.
2019-08-28 12:25:13 +01:00
Andrei Diaconu 26bf7e116d Arrays fixed, simple variable initialization fixed.
Correct code is now generated for array initialization and element access.
Created a new binary Opcode, `IndexedElementAddress`, used to get the address of an array element, similar to how CIL does it.
Fixed simple variable initialization.
2019-08-28 12:25:13 +01:00
Andrei Diaconu 2a41e7b5c0 Fixed issues mentioned in the PR comments
Modified _.getCallable() to _.getFunction()
Deleted both *ssa folders from ir/implementation
Deleted the ValueCategory.qll file
2019-08-28 12:25:13 +01:00
Andrei Diaconu aea0356994 Fixed var addressing and other changes
Now variables addressing correctly gets translated
Added a new test case to showcase this
Changed VoidType to ObjectType for the type of the 2 instructions
generated by as the prelude of a translated function
(UnmodeledDefinition and AliasedDefinition)
2019-08-28 12:25:13 +01:00
Andrei Diaconu 7ef9bf6eea Fixed whitespace errors in PR 2019-08-28 12:25:13 +01:00
Andrei Diaconu 025d68f07a General tidy up and refactor
Refactored the C++ specific names
Tidied the code
Updated TODOs
2019-08-28 12:25:13 +01:00
Andrei Diaconu c733bc0ae9 Functional basic porting
Ported basic functionalities from the C++ IR
Added a simple test that passes the IR sanity check and produces
sensible IR (together with the .expected files) to the C# test folder
2019-08-28 12:25:13 +01:00
Andrei Diaconu fc69c1201d Initial copy of C++ IR with some modifications 2019-08-28 12:25:13 +01:00
Pavel Avgustinov 1bd0c69f0e
Merge pull request #1831 from jbj/existsCompleteWithName-perf
C++: Performance fix for existsCompleteWithName
2019-08-27 16:30:40 +01:00
Jonas Jensen 3700a631a6 C++: Performance fix for existsCompleteWithName 2019-08-27 16:28:57 +02:00
Nick Rolfe 45a3dcd770
Merge pull request #1829 from jf205/update-cpp-lang-support
docs: mention clang-ci support
2019-08-27 14:45:18 +01:00
james be5b5e1617 docs: clang-ci support 2019-08-27 14:04:05 +01:00
Luke Cartey 8d33f31b0d
Merge pull request #1725 from jf205/add-rst-slide/sd-3717
docs: add rst files for C/C++ training and a few styling improvements
2019-08-27 11:43:44 +01:00
Pavel Avgustinov b3081154fa
Merge pull request #1823 from markshannon/python-dont-prune-in-ql
Python: removing pruning in QL.
2019-08-27 11:32:23 +01:00
jf205 baeb1d549e
Merge pull request #1826 from felicity-semmle/ql-support/updates
QL docs: Update global variables
2019-08-26 15:21:57 +01:00
semmle-qlci f123916f53
Merge pull request #1825 from asger-semmle/js-change-notes
Approved by xiemaisi
2019-08-26 14:00:32 +01:00
Esben Sparre Andreasen 43ede52e29
Merge pull request #1670 from sjvs/patch-2
Remove reference to internal emacs tooling from public repository
2019-08-26 14:54:07 +02:00
Asger F 17f5984101
Update change-notes/1.22/analysis-javascript.md
Co-Authored-By: Felicity Chapman <felicity@semmle.com>
2019-08-26 13:10:19 +01:00
Felicity Chapman 5e21af2ca9 Update global variables 2019-08-26 13:08:54 +01:00
Pavel Avgustinov deacc23465
Merge pull request #1824 from jbj/sbb-perf
C++: Optimize SubBasicBlocks library
2019-08-26 13:02:43 +01:00
Asger F 6364f8bbf7 JS: Change notes for jump-to-def and documentation improvements 2019-08-26 12:55:14 +01:00
Jonas Jensen 5e674825e3 C++: Optimize SubBasicBlock::getPosInBasicBlock() 2019-08-26 12:47:40 +02:00
Jonas Jensen d4f1cf97fd C++: Optimize SubBasicBlock::getNode(int) 2019-08-26 12:22:37 +02:00
Jonas Jensen be24c6418b C++: Optimize SubBasicBlock::getNumberOfNodes() 2019-08-26 12:22:34 +02:00
Jonas Jensen 27b6ed3be4
Merge pull request #1822 from pavgust/fix/multiloc-defs
definitions.qll: Suppress multi-location links.
2019-08-26 10:50:21 +02:00
zlaski-semmle c276d0b8ac
Merge pull request #1770 from geoffw0/qldoceg7
CPP: Add syntax examples to QLDoc in various files
2019-08-25 20:15:51 -07:00
Mark Shannon ca75a393b4 Python: Remove pruning in QL; rely on the extractor to do it. 2019-08-25 17:03:22 +01:00
Mark Shannon f11d0638cf Python: Remove tests for pruning in QL. 2019-08-25 17:00:08 +01:00
Pavel Avgustinov b9b0c3bc5d definitions.qll: Suppress multi-location links. 2019-08-25 15:59:17 +01:00