Commit Graph

28 Commits

Author SHA1 Message Date
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 2025-04-30 15:08:45 +02:00
Giacomo Vercesi 9ff471409e Remove some asserts from YAMLTraits
More soft-fails instead.
2025-04-28 12:58:27 +02:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Alessandro Di Federico bc064244d6 s/deserialize/fromString/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 2cdedc71f4 s/serialize/toString/
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Ivan Krysak 42c1ea30f0 Allow deserialize to be called on non-root types 2024-06-27 11:05:51 +02:00
Ivan Krysak 65fa67df84 YAMLTraits: specialize for std::byte 2023-11-02 17:10:04 +01:00
Ivan Krysak a123ec2c35 Remove clang-format off around concepts
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00
Ivan Krysak 8521f6bedc YAML: enable manual [de]serialization of enums 2023-03-15 10:19:02 +01:00
Giacomo Vercesi 0b80801b2b TupleTreeDiff: applyDiff uses ErrorList
Change how TupleTreeDiff and Visitor work so they can populate an
ErrorList in case the deserialization/apply of a diff fails.
2022-10-30 09:13:44 +01:00
Giacomo Vercesi e443cd3766 YAMLTraits.h: add traits for std::tuple<T>
This commit introduces a YAML trait for `std:tuple`s of a single
scalar that allows their serialization/deserialization generically.
2022-09-01 17:46:35 +02:00
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
Ivan Krysak 9610051df9 Fix yaml traits to correctly [de]serialize scalars 2022-08-05 17:27:56 +03:00
Alessandro Di Federico f4684e244d Switch to new testsuite 2022-06-20 19:04:18 +02:00
Massimo Fioravanti 38a3c5a086 Introduce TupleTree::deserialize 2022-04-15 15:14:02 +02:00
Alvise de Faveri 45784cce8c YAMLTraits: Add serializeToString() 2022-03-17 18:34:09 +01:00
Alessandro Di Federico 5e38805063 Rename detail namespaces into revng::detail 2022-03-11 15:37:12 +01:00
Alessandro Di Federico 78be0e9268 Explode TupleTree.h 2022-01-31 16:28:26 +01:00
Alessandro Di Federico d78993ac54 Add TupleTree file (de)serialization
Tuple tree file serialization will be used by the revng-pipeline as a
helper function to load and store the models in the working directory.
2022-01-05 14:44:57 +01:00
Alessandro Di Federico 56644b8512 Move model::Register in its own file 2021-07-15 13:50:53 +02:00
Pietro Fezzardi 75bff8f29c Move CompositeScalar in YAMLTraits.h
Soon Binary.h will not be the only user.
This commit makes the same machinery usable elsewhere.
2021-06-09 20:13:27 +02:00
Pietro Fezzardi 4b7f383ea5 Conceptify YAMLTraits.h 2021-06-09 20:13:27 +02:00
Pietro Fezzardi 50681284c0 Conceptify revng
Use concepts across revng wherever possible, to keep the code concise
and easier to understand.
2021-05-05 17:10:12 +02:00
Alessandro Di Federico aeb81c4218 Don't implicitly use StringRef as std::string 2021-04-22 18:06:27 +02:00
Alessandro Di Federico e9ca81247d Improve get*FromYAML*
This commit fixes the following issues:

1. It introduces `getNameFromYAMLEnumScalar` which returns a
   `llvm::StringRef` instead of a `std::string`.
2. Lets users decide what to do when `getValueFromYAMLScalar` does not
   get any match (abort by defaul, or return an "Invalid" value).
2021-02-18 18:44:42 +01:00
Alessandro Di Federico a96c6d4931 get{Name,Value}FromYAMLScalar: support quotes 2021-02-18 18:44:42 +01:00
Alessandro Di Federico e382f40119 get*FromYAML* handle scalars and enumeration 2021-02-17 11:45:28 +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