My stack

Preamble

My stack is a software case study, which is implemented in State Chart XML (SCXML) and PauWare. PauWare is a Java engine for executing Harel's Statecharts in general.

Application Programming Interface -API-: Javadoc.

Goal

This case study aims at illustrating the basic use of PauWare for a stack. My_stack.PauWare2.zip  does not reuse PauWare2Web (no visualization at all) while My_two_stacks.PauWare2Web.zip  does. This second application illustrates the concomitant functioning of two stack objects (My_stack_1 and My_stack_2) having a (visual) internal state machine. Caution: PauWare requires distinct state machine names to address visualization issues in a safe way. Using the same name for two different objects with internal state machines lead to non-interpretable visualization.

Note that in My stack case study, each behavior is self-contained, i.e., there is no interdependency/interaction at all between the two behaviors.

Resources
Installation requirements
Specification (statechart) as full-size SVG image
My_stack_1allow: search/My_stack._search(Object)allow: empty_/My_stack._emptyNot_emptyallow: peek/My_stack._peekEmptyinvariant: [My_stack.size_is_equal_to_0]More_than_oneinvariant: [My_stack.size_is_greater_than_1]Only_oneinvariant: [My_stack.size_is_equal_to_1]push/My_stack._push(Object)pop/My_stack._poppop[My_stack.size_is_not_equal_to_2]/My_stack._poppush/My_stack._push(Object)pop[My_stack.size_is_equal_to_2]/My_stack._poppush/My_stack._push(Object)