-
-xbt_automaton_t xbt_automaton_new(){
- xbt_automaton_t automaton = NULL;
- automaton = xbt_new0(struct xbt_automaton, 1);
- automaton->states = xbt_dynar_new(sizeof(xbt_state_t), xbt_state_free_voidp);
- automaton->transitions = xbt_dynar_new(sizeof(xbt_transition_t), xbt_transition_free_voidp);
- automaton->propositional_symbols = xbt_dynar_new(sizeof(xbt_propositional_symbol_t), xbt_propositional_symbol_free_voidp);
+#include <xbt/sysdep.h>
+
+struct xbt_automaton_propositional_symbol{
+ char* pred;
+ /** Callback used to evaluate the value of the symbol */
+ int (*callback)(void*);
+ /** Additional data for the callback.
+ Alternatively it can be used as a pointer to the data. */
+ void* data;
+ /** Optional callback used to free the data field */
+ void (*free_function)(void*);
+};
+
+xbt_automaton_t xbt_automaton_new(void){
+ xbt_automaton_t automaton = xbt_new0(struct xbt_automaton, 1);
+ automaton->states = xbt_dynar_new(sizeof(xbt_automaton_state_t), xbt_automaton_state_free_voidp);
+ automaton->transitions = xbt_dynar_new(sizeof(xbt_automaton_transition_t), xbt_automaton_transition_free_voidp);
+ automaton->propositional_symbols = xbt_dynar_new(sizeof(xbt_automaton_propositional_symbol_t), xbt_automaton_propositional_symbol_free_voidp);