4 #ifndef ILANG_TARGET_JSON_I2J_SER_H__
5 #define ILANG_TARGET_JSON_I2J_SER_H__
8 #include <unordered_map>
10 #include <nlohmann/json.hpp>
14 using json = nlohmann::json;
43 std::unordered_map<size_t, size_t> id_idx_map_;
45 std::unordered_map<size_t, size_t> func_id_idx_map_;
53 json SerSort(
const SortPtr& i_sort)
const;
55 json SerFunc(
const FuncPtr& i_func);
57 json SerExpr(
const ExprPtr& i_expr);
59 json SerConstVal(
const ExprPtr& i_expr)
const;
61 json SerExprUnit(
const ExprPtr& i_expr);
63 json SerInstr(
const InstrPtr& i_instr);
74 #endif // ILANG_TARGET_JSON_I2J_SER_H__
~I2JSer()
Default destructor.
Expr::ExprPtr ExprPtr
Pointer type for normal use of Expr.
Definition: expr.h:138
static I2JSerPtr New()
Create a new I2JSer. Used for hiding implementation specific type details.
json SerInstrLvlAbs(const InstrLvlAbsPtr &i_ila)
Serialize InstrLvlAbs, including its children, to JSON.
Sort::SortPtr SortPtr
Pointer type for storing/passing Sort.
Definition: sort.h:82
Instr::InstrPtr InstrPtr
Pointer type for normal use of Instr.
Definition: instr.h:132
Func::FuncPtr FuncPtr
Pointer type for normal use of Func.
Definition: func.h:83
I2JSer()
Default constructor.
I2JSer::I2JSerPtr I2JSerPtr
Pointer type for normal use of I2JSer.
Definition: ila_to_json_serializer.h:70
InstrLvlAbs::InstrLvlAbsPtr InstrLvlAbsPtr
Pointer type for normal use of InstrLvlAbs.
Definition: instr_lvl_abs.h:326
The class for serializing an ILA model to JSON format.
Definition: ila_to_json_serializer.h:20
std::shared_ptr< I2JSer > I2JSerPtr
Pointer type for normal use of I2JSer.
Definition: ila_to_json_serializer.h:23