File tree Expand file tree Collapse file tree 2 files changed +90
-0
lines changed Expand file tree Collapse file tree 2 files changed +90
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include < goto-programs/goto_trace.h>
2
+
3
+ #include < cegis/control/value/control_vars.h>
4
+ #include < cegis/control/learn/nondet_solution.h>
5
+ #include < cegis/control/facade/rational_solution_configuration.h>
6
+
7
+ void nondeterminise_solution_configuration (symbol_tablet &st,
8
+ goto_functionst &gf)
9
+ {
10
+ nondet_control_solution (st, gf);
11
+ }
12
+
13
+ namespace
14
+ {
15
+ const struct_exprt &find_solution (const goto_tracet &trace)
16
+ {
17
+ for (const goto_trace_stept &step : trace.steps )
18
+ {
19
+ const exprt &lhs=step.full_lhs ;
20
+ if (ID_symbol != lhs.id ()) continue ;
21
+ const std::string &id=id2string (to_symbol_expr (lhs).get_identifier ());
22
+ if (CEGIS_CONTROL_SOLUTION_VAR_NAME != id) continue ;
23
+ return to_struct_expr (step.full_lhs_value );
24
+ }
25
+ assert (!" Control solution not found in trace." );
26
+ }
27
+ }
28
+
29
+ void convert (control_solutiont ¤t_candidate, const goto_tracet &trace)
30
+ {
31
+ }
32
+
33
+ void show_candidate (messaget::mstreamt &os, const control_solutiont &candidate)
34
+ {
35
+
36
+ }
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************
2
+
3
+ Module: Counterexample-Guided Inductive Synthesis
4
+
5
+ Author: Daniel Kroening, [email protected]
6
+
7
+
8
+ \*******************************************************************/
9
+
10
+ #ifndef CEGIS_CONTROL_FACADE_RATIONAL_SOLUTION_CONFIGURATION_H_
11
+ #define CEGIS_CONTROL_FACADE_RATIONAL_SOLUTION_CONFIGURATION_H_
12
+
13
+ #include < util/message.h>
14
+
15
+ /* *
16
+ * @brief
17
+ *
18
+ * @details
19
+ */
20
+ class rational_solution_configurationt
21
+ {
22
+ public:
23
+ /* *
24
+ * @brief
25
+ *
26
+ * @details
27
+ *
28
+ * @param st
29
+ * @param gf
30
+ */
31
+ static void nondeterminise_solution_configuration (class symbol_tablet &st, class goto_functionst &gf);
32
+
33
+ /* *
34
+ * @brief
35
+ *
36
+ * @details
37
+ *
38
+ * @param current_candidate
39
+ * @param trace
40
+ */
41
+ static void convert (class control_solutiont ¤t_candidate, const class goto_tracet &trace);
42
+
43
+ /* *
44
+ * @brief
45
+ *
46
+ * @details
47
+ *
48
+ * @param os
49
+ * @param candidate
50
+ */
51
+ static void show_candidate (messaget::mstreamt &os, const control_solutiont &candidate);
52
+ };
53
+
54
+ #endif /* CEGIS_CONTROL_FACADE_RATIONAL_SOLUTION_CONFIGURATION_H_ */
You can’t perform that action at this time.
0 commit comments