Commit Graph

9 Commits

Author SHA1 Message Date
Alessandro Di Federico c02df6ea98 Import static TupleTree validation routines 2021-05-03 16:59:05 +02:00
Alessandro Di Federico fc64ccc627 Import TupleTree and TupleTreeReference 2021-05-03 16:59:05 +02:00
Alessandro Di Federico 87e752044f TupleTree, visit: rename and make more usable 2021-04-30 15:08:29 +02:00
Alessandro Di Federico bb7485beaf TupleTree: support UpcastablePointer 2021-04-30 14:52:25 +02:00
Pietro Fezzardi 0b24d5d7e3 Conceptify revng
Use concepts across revng wherever possible, to keep the code concise
and easier to understand.
2021-04-30 14:52:25 +02:00
Alessandro Di Federico 49287e9de7 Improve Model and TupleTree
This commit:

* Drops `KeyTraits::toString`: if needed, use `getNameFromYAMLScalar`.
* Makes many methods in TupleTree.h return `nullptr` or `std::optional`
  in order to gracefully handle failures.
* Provides `KeyTraits` specializations for integral types and tuple-like
  composed by types providing `KeyTraits`.
* Introduces `CompositeScalar`, which enables tuple-like objects to be
  YAML-serializable scalars by joining the YAML-serialization of its
  members through a customziable character.
* Implements `PathMatcher`, a very simple "regular expression" mechanism
  for paths on tuple trees.
* Introduce testing for the Model.
2021-02-17 11:48:46 +01:00
Alain Carlucci f3d755e0ff TupleTree*.h: add missing include 2021-02-08 12:25:34 +01:00
Alain Carlucci f1808c9db6 TupleTree: extend FOR_EACH up to 16 arguments
This commit extends the support for the FOR_EACH macro used in
INTROSPECTION_NS to allow serialization of structs with more than
5 entries. Now it supports up to 16 entries.
2021-02-01 11:03:53 +01:00
Alessandro Di Federico 38031f2f8a Import preliminary model
This commit imports:

* support for (de-)serializing tuple-like objects in YAML
* the Model data structure
* the {Load,Serialize}ModelPass
2021-01-27 19:46:53 +01:00