Declarative State Transition Programming