@@ -398,6 +398,8 @@ class FuncRef {
398
398
// ------------------------- ACCESSORS/MUTATORS --------------------------- //
399
399
// / Return the function name as std::string.
400
400
std::string name () const ;
401
+ // / Return the wrapped Func pointer.
402
+ inline FuncPtr get () const { return ptr_; }
401
403
402
404
// ------------------------- METHODS -------------------------------------- //
403
405
// / Apply the function with no argument.
@@ -409,11 +411,6 @@ class FuncRef {
409
411
// / Apply the function with multiple arguments.
410
412
ExprRef operator ()(const std::vector<ExprRef>& argvec) const ;
411
413
412
- private:
413
- // ------------------------- ACCESSORS/MUTATORS --------------------------- //
414
- // / Return the wrapped Func pointer.
415
- inline FuncPtr get () const { return ptr_; }
416
-
417
414
}; // class FuncRef
418
415
419
416
// / \brief The wrapper of Instr (instruction).
@@ -583,6 +580,18 @@ class Ila {
583
580
// / top-level parent instructions.
584
581
void FlattenHierarchy ();
585
582
583
+ // / \brief Supported pass ID.
584
+ typedef enum PassID {
585
+ SIMPLIFY_SYNTACTIC = 0 ,
586
+ SIMPLIFY_SEMANTIC,
587
+ REWRITE_CONDITIONAL_STORE,
588
+ REWRITE_LOAD_FROM_STORE
589
+ } PassID;
590
+
591
+ // / \brief Execute the specified passes in order.
592
+ // / \param[in] passes the list of passes to execute.
593
+ bool ExecutePass (const std::vector<PassID>& passes) const ;
594
+
586
595
}; // class Ila
587
596
588
597
/* *****************************************************************************/
@@ -607,6 +616,7 @@ bool ExportIlaPortable(const Ila& ila, const std::string& file_name);
607
616
// / \param[in] file_name the name of the ILA portable (JSON) file to import.
608
617
Ila ImportIlaPortable (const std::string& file_name);
609
618
619
+ #ifdef SYNTH_INTERFACE
610
620
// / \brief Import the synthesized abstraction from file.
611
621
// / \param[in] file_name the name of the synthesized abstraction (.ila) file.
612
622
// / \param[in] ila_name the name of the generated ILA.
@@ -620,9 +630,14 @@ Ila ImportSynthAbstraction(const std::string& file_name,
620
630
// / \param[in] ila_name the name pf the generated child-ILA.
621
631
void ImportChildSynthAbstraction (const std::string& file_name, Ila& parent,
622
632
const std::string& ila_name);
633
+ #endif // SYNTH_INTERFACE
623
634
624
635
// / \brief Generate the SystemC simulator.
625
- void ExportSysCSim (const Ila& ila, const std::string& dir_path);
636
+ // / \param [in] ila the top-level ILA to generate.
637
+ // / \param [in] dir_path directory path of the generated simulator.
638
+ // / \param [in] optimize set true to enable optimization.
639
+ void ExportSysCSim (const Ila& ila, const std::string& dir_path,
640
+ bool optimize = false );
626
641
627
642
/* *****************************************************************************/
628
643
// Verification.
@@ -692,6 +707,8 @@ class IlaZ3Unroller {
692
707
// / Return the z3::expr representing a and b are equal at their time.
693
708
z3::expr Equal (const ExprRef& va, const int & ta, const ExprRef& vb,
694
709
const int & tb);
710
+ // / Return the z3::func_decl representing f.
711
+ z3::func_decl GetZ3FuncDecl (const FuncRef& f) const ;
695
712
696
713
private:
697
714
// ------------------------- MEMBERS -------------------------------------- //
0 commit comments