Library PAutomata.Trace


Set Implicit Arguments.
Unset Strict Implicit.

Require Import Transitions.
Require Import LList.

Section Trace_DEF.

Variable L : LTS.

Let state := LTS_State L.
Definition trace := LList state.

Variable init : state.

CoInductive exec : stateType :=
  | exec_init : exec init
  | exec_trans :
       (s s' : state) (a : LTS_Act L),
      exec sLTS_Trans s a s'exec s'.

CoFixpoint LList_of_exec : s : state, exec strace :=
  fun s e
  match e with
  | exec_initLNil state
  | exec_trans s s' a e' _LCons s' (LList_of_exec e')
  end.

CoInductive is_trace : tracestateProp :=
  | is_trace_LNil : is_trace (LNil state) init
  | is_trace_LCons :
       (l : trace) (s s' : state) (a : LTS_Act L),
      is_trace l sLTS_Trans s a s'is_trace (LCons s' l) s'.

End Trace_DEF.