(* 
 File: RewLang.sig

 Interface to the logic of the reward language
*)

signature RewLang =
sig
  type Identifier = HashTable.hashedstring 

  datatype Formula =  
     Delta of Identifier
   | Nabla of Identifier
   | And of (Formula * Formula)
   | Or of (Formula * Formula)
   | Not of Formula
   | Mtt
   | Mff
   | Dia of (Identifier * Expressions.Aexp * Formula)
   | Box of (Identifier * Expressions.Aexp * Formula)

  type RewSpec = Formula * Expressions.Aexp
  type Attachment = RewSpec * (Pepa.Component * int)

  val makeRewSpec : Formula * Expressions.Aexp -> RewSpec
  val makeAttachment : RewSpec * (Pepa.Component * int) -> Attachment
  val hasAttachments : bool ref

  val rewSpecToString : RewSpec -> string
  val attachmentToString : Attachment -> string
  val formulaToString : Formula -> string

  val processAttachment : Pepa.Component ->
                            (string * Attachment) -> unit

  val evalReward : Pepa.Component -> Expressions.Aexp -> Expressions.Aexp


end;

