Commit Graph

1617 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
80fad348bb Swift: Implement CFG for property reads, writes, and observers. 2022-05-25 13:46:14 +01:00
Mathias Vorreiter Pedersen
67cc1b503b Swift: Implement step 3 from the previous commit message. 2022-05-25 13:44:59 +01:00
Mathias Vorreiter Pedersen
3e1a6a777e Swift: Accept test changes. 2022-05-24 10:22:06 +01:00
Mathias Vorreiter Pedersen
21641eb1cd Swift: Make the 'semantics.ql' test plantform-independent. 2022-05-24 10:00:14 +01:00
Mathias Vorreiter Pedersen
a0659072b5 Swift: Add tests and accept test changes. 2022-05-24 09:00:34 +01:00
Mathias Vorreiter Pedersen
83bcb53199 Swift: Add tests accept test changes. 2022-05-23 13:05:55 +01:00
Paolo Tranquilli
e6f2ab003c Swift: remove empty DB-CHECK.expected files 2022-05-20 16:01:56 +02:00
Paolo Tranquilli
553930d9e3 Swift: type visitor
This transfers the current state of `TypeVisitor` from the
proof-of-concept.
2022-05-20 15:42:20 +02:00
Paolo Tranquilli
922608c65a Swift: expression visitor
This transfers the current status of `ExprVisitor` from the
proof-of-concept, together with some changes required for swift 5.6.
2022-05-20 15:41:27 +02:00
Paolo Tranquilli
3f45b73d62 Swift: pattern visitor
This transfers the current state of `PatternVisitor` from the
proof-of-concept.
2022-05-20 15:41:27 +02:00
Paolo Tranquilli
19506dae74 Swift: statement visitor
This transfers the current state of `StmtVisitor` in the PoC, plus some
changes required for the update to swift 5.6.

Also `getLabel` in `SwiftDispatcher` got renamed to `createLabel`, and
is now correctly outputting the label assignment to the trap file.
2022-05-20 15:41:27 +02:00
Paolo Tranquilli
d6ced16aa8 Swift: declaration visitor
This transfers the current state of `DeclVisitor` from the
proof-of-concept.

TODO: make the `declarations` tests in `extractor-tests` more
comprehensive.
2022-05-20 15:41:22 +02:00
Paolo Tranquilli
da00bf99a1 Swift: move TBD code to ql
This allows to avoid bypassing label type correcness in the extractor,
and allows to independently resolve TBD extractions, as with this
approach TBD nodes do have the correctly typed trap label. The TBD
status is now a predicate on the QL side.

This requires:
* a default visit using the correct type, which is achieved via macro
  metaprogramming in `VisitorBase.h`, following the way
  `swift::ASTVisitor` is programmed
* a mapping from labels to corresponding binding trap entries. The
  functor is defined in `TrapTagTraits.h` and instantiated in generated
  `TrapEntries.h`
* Binding trap entries for TBD unknown entities must not have any other
  field than the `id` (after all, we are supposed to not extract them
  yet). This is why all unextracted fields in `schema.yml` have been
  commented out, and will be uncommentend when visitors are added
2022-05-20 09:52:27 +02:00
Alex Denisov
8f8ece63e7 Swift: add extractor test for declarations 2022-05-12 14:09:44 +02:00
Alex Denisov
62d36a29f7 Swift: Extract files 2022-04-22 08:48:38 +02:00
Paolo Tranquilli
6440242268 Swift+Bazel: apply review comments 2022-04-12 16:03:20 +02:00
Paolo Tranquilli
95dbf2d666 Swift: first skeleton extractor
This adds a first dummy extractor for swift.

Running `bazel run //swift:install` will create an `extractor_pack`
directory in `swift`. From that moment providing `--search-path=swift`
will pick up the extractor.
2022-04-12 12:40:59 +02:00