Better state pictures facilitating state machine characteristic conjecture

The mutual exclusion protocol invented by Mellor-Crummey and Scott (called MCS protocol) is used to exemplify that state picture designs based on which the state machine graphical animation (SMGA) tool produces graphical animations should be better visualized. Variants of MCS protocol have been used in Java virtual machines and therefore the 2006 Edsger W. Dijkstra Prize in Distributed Computing went to their paper on MCS protocol. The new state picture design of a state machine formalizing MCS protocol is assessed based on Gestalt principles, more specifically proximity principle and similarity principle. We report on a core part of a formal verification case study in which the new state picture design and the SMGA tool largely contributed to the successful completion of the formal proof that MCS protocol enjoys the mutual exclusion property. The lessons learned acquired through our experiments are summarized as two groups of tips. The first group is some new tips on how to make state picture designs. The second one is some tips on how to conjecture state machine characteristics by using the SMGA tool. We also report on one more case study in which the state picture design has been made for the mutual exclusion protocol invented by Anderson (called Anderson protocol) and some characteristics of the protocol have been discovered based on the tips.


Introduction
Our group led by the second author of the present paper has been developing a state machine graphical animation (SMGA) tool [7,22]. Given a state picture design for a state machine, SMGA basically takes a sequence of states in text and plays a graphical animation for the state machine by regarding the sequence as a movie film based on the state picture design. SMGA has been used to make graphical animations of state machines formalizing Alternating Bit Protocol (ABP) [22], Qlock shared-memory mutual exclusion protocol [4], MCS shared-memory mutual exclusion protocol [23] and Suzuki-Kasami distributed mutual exclusion protocol [7]. The main purpose of SMGA is to help experts in Formal Methods conjecture lemma candidates or state machine characteristics that can be used for formal verification by visually/graphically observing graphical animations. This is because humans are good at visual perception [6].
We summarize some tips on how to design state pictures in our paper [7] published in 2019. The tips have been accumulated through the case studies for ABP [22], Qlock protocol [4], MCS protocol [23] and Suzuki-Kasami protocol [7]. They are still useful but we realized that there is some room to improve the state picture design used for SMGA so far. Some part of each state of a state machine formalizing MCS protocol was not visualized sufficiently enough in that the part is almost the same as text representation. We have made a new state picture design of (the state machine formalizing) MCS protocol in which the part is visualized. We assess the new state picture design based on Gestalt principles (or principles of grouping) [26,28,29,31]. The new state picture design can be expressed reasonably well based on two Gestalt principles: proximity principle and similarity principle. We then propose some more tips on how to make better state picture designs.
We have conducted a case study in which we conjecture several non-trivial characteristics or lemma candidates of (the state machine formalizing) MCS protocol. Some lemma candidates have been actually used in a real case study in which it is formally proved that MCS protocol enjoys the mutual exclusion property [27]. We also propose some tips on how to conjecture state machine characteristics with SMGA.
We also report on one more case study. The state picture design has been made for Anderson shared-memory mutual exclusion protocol [1] and some characteristics of the protocol have been discovered based on the tips in the case study.
The contributions of the paper are as follows. (1) We propose the new state picture design of MCS protocol and assess it based on Gestalt principles. (2) We report on a core part of a formal verification in which the new state picture design and the SMGA tool have been largely contributed to its successful completion. (3) We summarize two groups of tips on how to make better state picture designs and how to conjecture state machine characteristics with SMGA, respectively.
The rest of the paper is organized as follows. Section 2 reports on some related work, evaluation of information visualization and Gestalt principles as a summary of conducting a literature review. We finally summarize how we assess the new state picture design of MCS protocol and the SMGA tool in the section. Section 3 mentions some preliminaries such as state machines, Maude, SMGA, MCS protocol and two Gestalt principles (proximity principle and similarity principle). Section 4 mentions formal specification of MCS protocol in Maude. In Section 5, we review the tips summarized in the paper [7], argue that there is some room to improve the state picture design of MCS protocol used in the paper [23] and propose a new state picture design of MCS protocol. We assess the new state picture design based on Gestalt principles in the section. Section 6 reports on a case study in which we have conjectured several non-trivial characteristics of MCS protocol with SMGA that uses the new state picture design. Section 7 summarizes some lessons learned. Section 8 reports on one more case study. Finally, we conclude the present paper in Section 9.
The present paper is an extended and revised version of the paper [8] published at DMS-VIVA 2020. SMGA, the state picture designs and input files for SMGA used in the present paper are available at the following website: https://bddang.bitbucket.io/.

Related work
This section first reports on our literature review on systems visualization, evaluation of visualization and usability, and Gestalt principles. We compare SMGA with some existing systems visualization tools. Based on the literature review, this section finally describes our way to evaluate the new state picture design of MCS protocol and the SMGA tool.

Literature review on systems visualization
SMGA is a systems visualization tool. Other systems visualization tools have been developed. As usual, we have conducted a literature review of some systems visualization tools related to SMGA. We mention the tools and compare SMGA with them.
ShiViz [5] is a tool to visualize logs generated by distributed systems. Logs in this context are basically sequences of events, hosts that carry out the events and timestamps when the hosts carried out the events. The most important events are message sending and receiving. Feeding a log into ShiViz, ShiViz generates a diagram that is similar to a sequence diagram. The diagram helps human users comprehend what events precede and/or succeed what events, some patterns of message passings, etc. ShiViz has a functionality to find three typical patterns of message passings: (a) Request Response, (b) Broadcast and (c) Gather. The authors conducted three experiments to assess ShiViz: (1) a controlled experiment with a mix of 39 undergraduate and graduate students in which one group of participants studied distributed system executions using ShiViz and another group without ShiViz; (2) two homework assignments in a distributed systems course conducted by 70 students who used ShiViz to help them debug and understand their implementations; (3) a case study conducted by two systems researchers who were developing complex distributed systems to evaluate the end-to-end usefulness of ShiViz to developers in their work. The evaluation results are positive in that ShiViz helps students understand distributed systems better and even expert engineers in distributed systems are able to discover subtle errors lurking in distributed systems unless otherwise it would be infeasible or take much longer time to do so. The visualization used by ShiViz (still visualization) and the one (graphical animation) used by SMGA can be complementary. One possible future direction is to find a good balanced combination of the two approaches to (distributed) system visualization.
Artho, et al. [2] propose an extended version of UML sequence diagrams so that multithreaded programs, especially interactions among multiple threads, can be visualized. Threads are two aspects in Java programs: data (or objects) and executable units. UML sequence diagrams do not have enough descriptive capabilities for threads as executable units. The authors propose hexagonal diagrams for threads as executable units. Their extended sequential diagrams make it possible to describe what threads as execution units start or resume parts of participants (threads as objects) lifelines and terminates. It is possible to describe some dependencies among events carried out by threads as execution units, which can be used to describe lock acquisition and release by threads as execution units. The authors suppose that their extended sequential diagrams could be helpful for human users to comprehend counterexamples generated by model checkers or runtime verification tools. SMGA can graphically animate counterexamples generated by Maude LTL model checker [24]. Their extended sequence diagrams are also still visualization, while our visualization is graphical animations.
VA4JVM [3] is a tool that can visualize outputs generated by Java Pathfinder (JPF). JPF outputs can be lengthy and is not easy-to-read especially when JPF finds something wrong, such as race condition and deadlock. VA4JVM can zoom some specific part of JPF outputs, filter such outputs, leaving more interesting fragments only, and highlight some fragments of such outputs that look more interesting so that human users could comprehend JPF outputs better. As above-mentioned, SMGA can graphically animate counterexamples generated by Maude LTL model checker [24]. Although Maude LTL model checker is a classical model checker and JPF is a software model checker, it would be worth considering some VA4JVM functionalities, such as zooming, filtering and highlighting and adopting some of them for a future version of SMGA.
Magee et al. [18] have proposed a way to visualize the behavior of a Labeled Transition System (LTS) described in FSP and developed a tool to support their proposed technique. One novelty of their approach to graphical animation of the LTS behavior is to use Timed Automata as formal semantics of animations. Their proposed technique makes it possible to compose multiple animations by composing Timed Automata. Their tool has been implemented with SceneBeans 1 , a library of JavaBeans. As written, their visualization is graphical animation like ours. SceneBeans could be used to implement a future version of SMGA.

Literature review on evaluation of visualization and usability
It is truly crucial to reasonably evaluate any new techniques proposed and tools that supports the techniques including information visualization techniques and tools. Several papers on evaluation of information visualization techniques and tools have been published because it is not straightforward but rather hard to reasonably evaluate them. We have conducted a literature review of some such papers. We summarize them, which partially made us decide how to evaluate the new state picture design of MCS protocol and the SMGA tool.
Carpendale [11] mentions challenges of information visualization evaluation and two kinds of methods to evaluate information visualization: quantitative evaluation and qualitative evaluation. She writes that reasons why current evaluations are not convincing enough to encourage widespread adoption of information visualization tools include that information visualizations are often evaluated using small datasets, with university student participants, and using simple tasks.
Isenberg, et al. [16] conducted a systematic review of 581 papers published at IEEE Visualization (now IEEE Scientific Visualization) conference for 10 years (2012-2006, 2003, 2000 and 1997) to assess the state and historic development of evaluation practices as reported in those papers. They found that there was a steady increase in evaluation methods that include participants, either by evaluating their performances and subjective feedback or by evaluating their work practices and their improved analysis and reasoning capabilities using visual tools for the six years . They also found that generally the studies reporting requirements analyses and domain-specific work practices are too informally reported that hinders cross-comparison and lowers external validity.
Merino, et al. [20] conducted a systematic literature review of 181 full papers published at SOFTVIS/VISSOFT conferences on software visualization evaluation. They found that 68% of those papers lack of strong evaluation. They then propose guidelines to increase the evidence of the effectiveness of software visualization approaches, thus improving their adoption rate. Caine [9] conducted an analysis of all manuscripts published at CHI 2014 to determine local standards for sample size within the CHI community. She summarizes recommendations for authors as local standards in the CHI community on how to determine their sample size to evaluate their proposed techniques and/or tools. She also warns that relying on local standards should not be considered "best practice".
Schmettow [25] points out that usability professionals and HCI researchers tend to use and/or want to have a magic number to determine the sample size to conduct usability studies, such as the 10±2 rule of Hwang and Salvendy [15]. Resorting to such a magic number may make usability studies inaccurate for making predictions and underestimate required sample size as well. He recommend usability professionals and HCI researchers to conduct expensive, quantitatively managed studies when usability is critical. He, however, concludes the paper with the following sentence: "Most usability practitioners will likely continue to use strategies of iterative low-budget evaluation where quantitative statements are unreliable but also unnecessary".

Literature review on Gestalt principles
Gestalt principles (or laws) (or principles of grouping) [26,28,29,31] are a set of principles that govern humans perceiving an image as a whole, although the image is constituted of smaller visual objects and there do not seem any direct relations between the humans' perception of the image and smaller visual objects. Note that "gestalt" is a German word meaning "form" or "group". Gestalt principles have been used to design and assess visual interfaces, etc. in Computer Science.
Graphs are very common structures often used in many domains. Therefore, many software tools have been developed to draw graphs. Graphs may represent something dynamics, such as mobile networks. If so, whenever data represented as graphs change, the graph should change accordingly. Human users, however, may not follow such a change reasonably well, losing their mental maps. Nesbitt and Friedrich [21] have come up with how to visualize such a change by using Gestalt principles.
It is crucial to automatically identify some objects in a digital image for many purposes, such as security. To this end, it is necessary to make the boundaries between those objects and the others very distinct. Cao [10] invented a good algorithm for this aim by utilizing Gestalt principles and Helmholtz Principle, a quantitative version of the former [13].
Yalcinkaya and Singh [32] claim that information technologies have not been utilized reasonably well in AEC-FM industry, where AEC-FM stands for Architecture/Engineering/Construction (AEC) and Facilities Management (FM) Markets (see https://www.ogc.org/), in spite of many AEC-FM standards agreed in the industry, such as construction operations building information exchange (COBie) over its spreadsheet representation. They also claim that this is not just because of technical reasons caused by the standards but because of cognitive perception of COBie spreadsheet representation exchanged and processed by end-users. Then, they used Gestalt principles to analyze COBie spreadsheet representation, proposing more visual representation called VisualCOBie.
It is necessary to comprehend and track information or data that have been moved in cloud systems. It has been common to use logs and graphs that represent such logs. It has become the new trend for cloud users to comprehend "data provenance," a historical record of data and their origin. Then, Garae, et al. [14] proposed "User-centric Visualization of data provenance with Gestalt (UVisP)," a novel user-centric visualization technique for data provenance. UVisP aims at facilitating the missing link between data movements in cloud systems and end-users' uncertain queries about their files' security and life cycle in the cloud systems. It makes it possible for users to transform and visualize data provenance with implicit prior knowledge of Gestalt principles.

Our way to evaluate state picture design and SMGA
The purpose of SMGA partly overlaps that of ShiViz, which is to help human users comprehend distributed systems through visualization. The main purpose of SMGA is to help experts in Formal Methods conjecture lemma candidates that can be used for formal verification, however, while the main purpose of ShiViz is to help students and engineers understand implementations (or programs) of distributed systems. The developers of ShiViz conducted some experiments that involved human participants to assess it. We do not follow their approach to evaluating ShiViv so as to evaluate the new state picture design of MCS protocol and the SMGA tool partly because the main purposes of SMGA and ShiViz are different and partly because it is not straightforward to determine a good number of participants for our assessment purpose as we surveyed. Instead, we use Gestalt principles to assess the new state picture design of SMGA. Gestalt principles have been used to design and evaluate still images. Because SMGA produces graphical animations that are not still images but are dynamic images, there may be someone who wonders why we use Gestalt principles to evaluate the SMGA tool. We first need to make a state picture design to produce a graphical animation with SMGA. A state picture design is a template still image in which many visual objects are fixed. A small number of visual objects change in a series of concrete still images that are made from a state picture design and a sequence of states in text and that can be regarded as a movie film. We can use Gestalt principles to design and evaluate a state picture design because it is basically a still image. It is crucial to decide the positions of many visual objects that are fixed, for which we can use Gestalt principles. Even for visual objects that change their positions in a series of concrete still images, it is also important to decide the positions of the visual objects in each still image, for which we can use Gestalt principles as well. Note that Nesbitt and Friedrich [21] have used Gestalt principles to design animated visualization of network data that are represented as graphs, which is another case in which Gestalt principles have been used to design dynamic images.
It is a common practice to conduct a case study (or a few case studies) to evaluate newly proposed formal techniques and tools supporting them 2 . We follow this practice to evaluate the SMGA tool because its main purpose is to help Formal Methods experts conjecture lemma candidates.

Preliminaries
This section describes some preliminaries needed to read what follows in the present paper: state machines, Maude, SMGA, MCS protocol and Gestalt principles. State machines are mathematical models used to formalize systems. Maude is a specification/programming language in which state machines can be described. Maude also refers to its processor equipped with many functionalities. One of them is model checking. MCS protocol is a mutual exclusion protocol and used as one main example in the present paper. Gestalt principles can explain how humans perceive an image as a whole and are used to evaluate the new state picture design of MCS protocol and the SMGA tool.

State machines
A state machine M S, I, T consists of a set S of states, a set I ⊆ S of initial states and a binary relation T ⊆ S × S over states. The set R of reachable states with respect to M is inductively defined as follows: (1) for each s ∈ I, s ∈ R and (2) for each (s, s ) ∈ T , if s ∈ R, then s ∈ R. A state predicate p is an invariant property with respect to M if and only if p(s) holds for all s ∈ R.
A system can be formalized as a state machine. There are many possible ways to express states. We express states as braced associative-commutative collections of namevalue pairs. Associative-commutative collections are called soups and name-value pairs are called observable components. So, states are expressed as braced soups of observable components. Let ob 1 , ob 2 and ob 3 be observable components and then the braced soup of the three observable components is expressed as {ob 1 ob 2 ob 3 }, where the juxtaposition operator is used as the constructor of soups. Soups are associative-commutative collections in that the juxtaposition operator is associative and commutative. Therefore, Let us consider a system such that we can observe two values val 1 and val 2 that are natural numbers and val i for i = 1, 2 is updated as follows: if val i < val (i%2)+1 , then val i is incremented and otherwise, it is decremented, where we suppose that if a value is 0 and decremented, the value does not change. Initially, val 1 and val 2 are set to 1 and 5, respectively. Let Nat be the set of natural numbers. Let us formalize the system, which we call TVS, as a state machine M TVS S TVS , I TVS , T TVS . S TVS is {{(val1 : x) (val2 : y)} | x, y ∈ Nat}, where (val1 : x) and (val2 : y) are observable components such that val1 and val2 are names, x and y are values that correspond to val 1 and val 2 and : is used as a delimiter. I TVS is {{(val1 : 1) (val2 : 5)}}. For all x, y ∈ Nat, if x < y, then T TVS has the following: if x ≥ y, then T TVS has the following: if y < x, then T TVS has the following: if y ≥ x, then T TVS has the following: where dec(0) = 0 and dec(n + 1) = n for all n ∈ Nat.

Maude
Maude [12] is a specification and programming language based on rewriting logic. Its system (or environment) is also called Maude. Maude makes it possible to naturally describe soups, observable components and braced soups of observable components. T is described in terms of rewrite rules when specifying M in Maude. T TVS is described as follows: crl stands for conditional rewrite rule and is used to declare a conditional rewrite rule. An unconditional rewrite rule is declared with rl instead. inc-val1 is the name or label given to the first rewrite rule. X and Y are Maude variables of Nat. Rule inc-val1 says that if X is less than Y, a state denoted {(val1: X) (val2: Y)} can change to another state denoted {(val1: (X + 1)) (val2: Y)}. The other three rewrite rules can be interpreted likewise. Maude makes it possible to conduct reachability analysis for state machines and model check that state machines enjoy invariant properties. We may conjecture that val 1 is always less than or equal to 5 for M TVS . We can check it by the following search command: where init is {(val1: 1) (val2: 5)} and OCs is a Maude variable of observable component soups. The search command tries to find a reachable state such that X is greater than 5. It does not find any such a state and then we can conclude that val 1 ≤ 5 is an invariant property with respect to M TVS . Let us model check that val 1 < 5 is an invariant property with respect to M TVS , which can be done by the following search command: search [1] in TVS : init => * {(val1: X) OCs} such that X >= 5 .
It finds a reachable state {(val1: 5) (val2: 5)} such that X is 5 and then X >= 5 holds. Therefore, val 1 < 5 is not an invariant property with respect to M TVS .

State machine graphical animation (SMGA)
SMGA [22] is a tool that basically takes a sequence of states in text and plays a graphical animation by regarding the sequence as a movie film. To regard a sequence of states in text as a movie film, we are supposed to design state pictures. One possible state picture design for M TVS is shown in Fig. 1. There are six rectangles on the state picture design such that each rectangle has a natural number (0, 1, 2, 3, 4 or 5) at the left upper corner. Let the rectangle that has n be called rectangle n. When val i for i = 1, 2 is n that is 0,  Figure 2 shows the first six state pictures of a graphical animation for TVS. The state pictures allow us to visually/graphically perceive what value each val i for i = 1, 2 has. We need to comprehend TVS to some extent in order to design such state pictures because otherwise we do not know how many rectangles should be prepared.

MCS protocol
MCS protocol [19] is a shared-memory mutual exclusion protocol invented by Mellor-Crummey and Scott. Partly because its variants had been used in Java VMs, the 2006 Edsger W. Dijkstra Prize in Distributed Computing went to their paper 3 . It can be described in Algol-like pseudo-code as shown in Fig. 3. It uses one global variable glock and three local variables next p , pred p and lock p for each process p. Process IDs are stored in glock, next p and pred p , while Boolean values are stored in lock p . In this paper, initially, glock, next p and pred p are set to nop, while lock p is set to false, where nop is a special ID that is

Fig. 3 MCS protocol in
Algol-like pseudo-code different from any real process IDs. lock next p is lock q such that next p = q and next pred p is next q such that pred p = q. Note that because the protocol is used for shared-memory computers, any process p can read and write lock q and pred q even though q is different from p. The protocol uses two atomic operations (or instructions): fetch&store and comp&swap. For a variable v and a value a, fetch&store(v, a) atomically does the following: it sets v to a and returns the old value of v. For a variable v and two values a & b, comp&swap(v, a, b) atomically does the following: if the value stored in v equals a, then v is set to b and true is returned; otherwise false is just returned. MCS protocol uses a virtual queue basically composed of process IDs by using next p . Figure 4a shows the virtual queue that consists of p 2 , p 1 and p 3 in this order such that all of them have been completely put into it. glock always refers to the bottom element whenever the virtual queue is not empty, while it is nop whenever the virtual queue is empty. Enqueuing and dequeuing for the virtual queue are not atomic. Therefore, there may be some elements that have not yet been completely put into it. Figure 4b shows the virtual queue that consists of p 2 , p 1 and p 3 in this order such that p 1 has not yet been completely put into it and will set next p 1 to p 2 by using pred p 1 , where pred p 1 = p 2 . p 1 will conduct next pred p := p; at line l5 in the pseudo-code shown in Fig. 3, where because p is p 1 , pred p 1 is p 2 and next p 2 will be p 1 .

Gestalt principles
We use examples to introduce two Gestalt principles that are used to assess state picture designs in the present paper: proximity principle and similarity principle. Let us take a look at the following image: Six stars are aligned horizontally such that the distance of each adjacent pair of stars is the same. Then, we perceive that there are just six stars and did not recognize any sub-groups in it. Let us change the layout a little bit as follows: There are still six stars but we can recognize that there are three sub-groups each of which consists of two stars. This is because the distance between each adjacent pair of sub-groups is greater than the distance between the two stars in each sub-group. This visual perception is called "proximity principle".
Let us change the first image of six stars in a different way. The changed image is as follows: We do not change the layout but change the color of some stars. We can recognize that there are three different kinds of stars because there are three different colors. Thus, we may perceive that there are three sub-groups each of which consists of the same color stars. This visual perception is called "similarity principle".

Specification of MCS protocol in Maude
We suppose that there are three processes that participate in MCS protocol. Let M MCS formalize MCS protocol. Each state in S MCS is expressed as follows: where bp, pp i and np i for i = 1, 2, 3 are process IDs, l i for i = 1, 2, 3 is a label, such as rs, l1 and cs, and b i for i = 1, 2, 3 is a Boolean value. Initially, bp, pp i and np i are nop, l i is rs and b i is false. I MCS consists of one state. Let init equal the initial state.

State picture design
States are expressed as braced soups of observable components, where observable components are name-value pairs. Therefore, it would be possible to automatically produce a straightforward state picture design. Let us take TVS as an example. A straightforward state picture design that could be automatically generated is shown in Fig. 5. Figure 6 shows the where || is the constructor of sequences. On the visual/graphical representation of each TVS state shown in Figs. 1 and 2, we can perceive that there is one group that consists of six rectangles due to both proximity and similarity principle. We also recognize that there are two circles on which val1 and val2 are shown. The two visual objects represent something similar because both of them are circle but they are not exactly the same because they are in different colors due to similarity principle. Each visual circle object is located on one of the six rectangles, which can be interpreted as follows: each val can have one of the six values (0, 1, 2, 3, 4, 5). Looking at the rectangles on which the two circles are located, we can perceive how different values val1 and val2 have. For two values x, y from the six values (0, 1, 2, 3, 4, 5), let the distance between x and y modulo 6 (or the distance (mod 6) between x and y) be the smallest k such that x + k ≡ y (mod 6) or x ≡ y + k (mod 6), where k ∈ {0, 1, 2, 3, 4, 5}. The bigger the distance between the locations of the two circles is, the bigger the difference (mod 6) between the values stored in val1 and val2 is. Let us confess that we need to comprehend TVS to some extent so that we can make the state picture design shown as in Figs. 1 and 2. On the other hand, just looking at each picture as shown in Fig. 6 or the text representation of each TVS

New State picture design of MCS protocol
It is also possible to automatically generate a straightforward state picture design for MCS protocol, such as the one shown in Fig. 7. State pictures generated from the state picture design, such as the one shown in Fig. 8  We summarize some tips on how to design state pictures for mutual exclusion protocols in our paper [7] published in 2019. The existing tips on state picture design are summarized in Table 1.
Nguyen and Ogata [23] made the state picture design shown in Fig. 9 for MCS protocol, which follows the tips. A state picture generated from the state picture design is shown in Fig. 10. The state picture allows us to immediately realize that processes p1, p2 and p3 are located at l5, l6 and l8, respectively. Nguyen and Ogata [23] conducted a case study in which several characteristics of MCS protocol can be discovered by observing graphical animations of MCS protocol such that each state picture used in the graphical animation is generated from the state picture design. For example, one of the characteristics found is as follows: No state such that a process is at cs, l7, l8, l10, or l11 and another process is at cs, l7, l8, l10, or l11.
Let the characteristic be called Characteristic 0 in this paper.  SPD-T 1 To recognize what sections there are at which each process or node is located, allocate the pane (or place) for each section such that the relations among the sections are visually/graphically perceived and display some diagram, such as a circle on which a process or node ID is written, on the designated pane.

SPD-T 2
To recognize what pieces of information, such as the network for the Suzuki-Kasami protocol and variable locked for the test&set protocol, are shared by all processes or nodes, allocate the pane (or place) for each such piece of information such that we can visually/graphically perceive they are shared by all processes and nodes and display them on the designated panes adequately.

SPD-T 3
To recognize whether there are some that are more crucial than the others among the shared resources, such as the messages that have been just put into and deleted from the network, prepare the panes (or places) for them and display them there adequately

SPD-T 4
To recognize what pieces of information are owned by each process or node, allocate the panes (or places) for them to make it possible to visually/graphically perceive what pieces of information are owned by what processes or nodes and display them on the designated panes adequately.

SPD-T stands for State Picture Design Tip
Although the state picture shown in Fig. 10 also allows us to notice the values stored in the global variable glock and the three local variables next p , pred p and lock p for each process p, their representations on the state picture are almost the same as the text representation. Since SMGA requires and/or permits human users to make state picture designs, the representations must be able to be visually/graphically perceivable. To this end, we came up with the state picture design shown in Fig. 11. Figure 12 shows a state picture generated from the state picture design.
The design of the glock representation used in Fig. 9 is as follows:  The value of glock is nop, p1, p2 or p3. Regardless of the value, the value is displayed on the same place. For example, when the value is p1, it is displayed as follows: The design of the glock representation used in Fig. 11 is as follows: If the value is nop, nothing is displayed on the rectangle or pane for glock. If the value is p1, p1 is displayed at the left-most place of the rectangle for glock. If the value is p2, p2 is displayed at the middle place of the rectangle for glock. If the value is p3, p3 is displayed  at the right-most place of the rectangle for glock. Because p1, p2 and p3 are processes (or process IDs), we use exactly the same representation as those used for the three processes appearing on the 14 sections. For example, when the value is p1, it is displayed as follows: The design of the next p , pred p and lock p representations for each process p used in Fig. 9 is as follows: Regardless of the values of next p , pred p and lock p , their values are displayed on the same places. For example, when next p1 is nop, pred p1 is p2, lock p1 is true, next p2 is nop, pred p2 is p3, lock p2 is true, next p3 is p2, pred p3 is nop and lock p3 is false, those values are displayed as follows: The design of the next p , pred p and lock p representations for each process p used in Fig. 11 is as follows: The next p representation appears at the right-most place, where there are three rectangles, the first, second and third ones of which from top are used for p1, p2 and p3, respectively. For example, if the value of next p1 is nop, nothing is shown on the first rectangle; if the value is pi, the circle on which pi is written is shown at the designated place on the first rectangle. The lock p representation appears at the middle place, which also indicates that the first, second and third rows are used for p1, p2 and p3, respectively. When lock pi is true, the background color of pi is red; otherwise the color is non-red (or light blue). The pred p representation appears at the left-most place, where there are three rectangles, the first, second and third ones of which from top are used for p1, p2 and p3, respectively. For example, if the value of pred p1 is nop, nothing is shown on the first rectangle; if the value is pi, the circle on which pi is written is shown at the designated place on the first rectangle. For instance, when next p1 is nop, pred p1 is p2, lock p1 is true, next p2 is nop, pred p2 is p3, lock p2 is true, next p3 is p2, pred p3 is nop and lock p3 is false, those values are displayed as follows:

Evaluation of state picture design based on Gestalt principles
On both the old state picture design and the new state picture design of MCS protocol, we can perceive that there are 14 rectangles aligned along the edge of the whole image due to similarity principle. The 14 rectangles represent the 14 sections on which processes are located and each of the rectangles has its name on it, such as rs, l1 and cs. An arrow-shape visual object is shown between each pair of adjacent rectangles, meaning that processes basically move from one section to the other. Processes are represented as circles on which their IDs, such as p1, are shown. Taking a look at state pictures immediately allows us to recognize which sections processes are located. On the old state pictures, all circles representing processes are in one color, while on the new state pictures different colors are used to make it clear to distinguish different processes due to similarity principle. On both the old state picture design and the new state picture design of MCS protocol, the visual representation of glock is arranged a bit far from the visual representations of the three local variables owned by processes, which makes it clear that glock can be perceived as one independent group due to proximity principle.
On the new state picture design of next p , pred p and lock p for each process p, we can perceive that there are three groups due to similarity principle. The three groups correspond to pred p , lock p and next p from left on the new state picture design. We also perceive that there are also three different groups due to proximity principle. The three different groups correspond to p1, p2 and p3 from top on the new state picture design.
Because the types of glock, next p and pred p are the same, process IDs or nop, we use the same visual representation for them so that we can perceive it due to similarity principle. When such a variable has a process ID, a circle on which the process ID is shown appears at the designated place on the rectangle that represents the variable. Since p1, p2 and p3 are processes, each of them is represented as a circle due to similarity principle. Since they are different processes, however, we use three different colors for the three different processes due to similarity principle. When such a variable has nop, nothing appears on the rectangle that represents the variable. This is because nop is different from process IDs and should be distinguished from them. We can recognize that such a variable has nop thanks to similarity principle. Because of the visual representations of glock, next p and pred p , we can perceive whether among those variables have a same value (namely a same process ID or nop) or different values.
The type of lock p is Boolean and then it has either true or false. We use two different colors to represent the two different values. Red is used to represent true, while non-red (or light blue) is used to represent false. This is because when lock p is true, process p is supposed to wait somewhere to proceed to the critical section and when lock p is false, p is allowed to enter the critical section. We can perceive which lock p is true or false thanks to similarity principle.

The number of processes
We supposed that there are three processes participating in MCS protocol. When we would like to change the number of processes, we need to revise the state picture design a little bit. However, the essence of the state picture design can be used even when the number of processes changes. For example, when there are seven processes participating in MCS protocol, the state picture design of MCS protocol is as shown in Fig. 13. Figure 14 shows a state picture generated from the state picture design. The state picture design as shown in Fig. 13 can be used for the case in which there are seven or less processes participating in MCS protocol. As you can imagine, although we could increase the number of processes, if there are many processes, such as 100, then state pictures become less understandable. Let us recall the main purpose of the SMGA tool: helping experts in Formal Methods conjecture lemma candidates or state machine characteristics that can be used for formal verification by visually/graphically observing graphical animations. When writing formal proofs, it suffices to suppose that there are 3 or 4 arbitrary processes. Therefore, it would suffice that SMGA can deal with 3 or 4 processes reasonably well for our purpose.

Characteristic discovery based on new state pictures
The authors of the present paper and some others have conducted a case study in which it is formally proved that MCS protocol enjoys the mutual exclusion property, namely that there is always at most one process in the critical section. The case study is reported in the paper [27] accepted by 2020 Asia-Pacific Software Engineering Conference (APSEC 2020). The new state picture design and the SMGA tool contributed to the case study to some extent. This section describes how the new state picture design and the SMGA tool contributed to the case study.
Carefully observing graphical animations for MCS protocol in which new state pictures, such as Fig. 12, are used, we realize that there is always at most one process at cs, l7, l8, l10 or l11. This is exactly the same as Characteristic 0 discovered based on old state pictures, such as Fig. 10. We call these sections (cs, l7, l8, l10 and l11) CS region. We also notice that there exists at most one process p such that p is located at l3 and pred p is nop and there exists at most one process p such that p is located at l6 and lock p is false. Moreover, if p is located at l3 and pred p is nop, there is no process in CS region and there is no process q at l6 such that lock q is false, and if p is located at l6 and lock p is false, there is no process in CS region and there is no q at l3 such that pred q is nop. l3 and l6 are only the sections from which processes enter CS region. We call CS region plus l3 and l6 extended CS region. The first characteristic that can be conjectured by carefully observing graphical animations for MCS protocol in which new state pictures, such as Fig. 12, are used is as follows: -Characteristic 1: There exists at most one process in extended CS region except for processes p such that (1) p is located at l3 and pred p is not nop and (2) p is located at l6 and lock p is not false.
Extended CS region is one key concept that captures one important aspect of MCS protocol and Characteristic 1 is very crucial in that several other characteristics can be discovered based on the characteristic. Figure 15 shows some state pictures that capture Characteristic 1. On the top left state picture, there are two processes p1 and p2 in extended CS region such that both are located at l6, lock p1 is true and lock p2 is false and therefore p2 is only the process in extended CS region in the sense of Characteristic 1 because p1 satisfies condition (2) in Characteristic 1. On the top right state picture, there are two processes p1 and p3 in extended CS region such that both are located at l3, pred p1 is p2 and pred p3 is nop and therefore p3 is only the process in extended CS region in the sense of Characteristic 1 because p1 satisfies condition (1) in Characteristic 1. Each of the other five state pictures shows that there exists one process at one section of CS region and for all processes q located at l3 and l6 if any, pred q is not nop and lock q is not false, respectively.
The first author of the present paper started the formal proof that MCS protocol enjoys the mutual exclusion property and got stuck somewhere for several months. One reason why the first author of the present paper got stuck for such a long time is as follows: eq inv40(S,P) = ((pc(S,P) = l3 or pc(S,P) = l4 or pc(S,P) = l5 or pc(S,P) = l6 or pc(S,P) = cs or pc(S,P) = l7 or pc(S,P) = l8 or pc(S,P) = l10 or pc(S,P) = l11) implies (glock(S) = nop) = false) .
The equation defines a state predicate inv40(S,P), where S is a variable for states and P is a variable for process IDs. pc(S,P) denotes the section where a process P is located in a state S. glock(S) denotes the value stored in glock in a state S. or and implies denote the logical disjunction and the logical implication, respectively. false can be interpreted as usual. inv40(S,P) says that if P is located at l3, l4, l5, l6, cs, l7, l8, l10 or l11, then glock is not nop. inv40(S,P) is likely to be an invariant with respect to MCS protocol and then the first author of the present paper started the proof. However, he did not converge the proof attempt because he encountered a situation in which he needed to use an unbounded number of lemmas that are similar but different a little bit. Please refer to the APSEC 2020 paper [27] in detail.
The key to tackle the situation is Extended CS region or Characteristic 1. The premise part of inv40(S,P) is similar to Characteristic 1 but not exactly the same. We can recognize that glock is not nop on each state picture shown in Fig. 15. Therefore, we can guess the second characteristic of MCS protocol as follows: The difference between inv4(S,P) and inv40(S,P) is as follows: pc(S,P) = l3 is revised to pc(S,P) = l3 and prede(S,P) = nop, pc(S,P)= l6 is revised to pc(S,P) = l6 and lock(S,P) = false and pc(S,P) = l4 & pc(S,P) = l5 Although there is a small difference between inv4(S,P) and inv40(S,P), it is possible to successfully prove that inv4(S,P) is an invariant with respect to MCS protocol without any difficulties in contrast to inv40(S,P). Please refer to the APSEC 2020 paper [27] on how to formally prove that inv4(S,P) is an invariant with respect to MCS protocol.
We describe some more characteristics discovered based on the new state picture design. Focusing on a process in CS region or extended CS region, we can recognize the following characteristics: -Characteristic 3.1: Whenever there is a process at l10, there is at least one process at l3, l4, l5 or l6; -Characteristic 3.2: Whenever there is a process at l11, there is at least one process at l6.
The third-row right state picture of Fig. 15 is an example of Characteristic 3.1 and the bottom state picture of Fig. 15 is an example of Characteristic 3.2.
Carefully observing the next p and pred p representations for each process p, nothing may be displayed and the circle on which q that is different from p is written may be displayed but the circle on which p is written is never displayed. Thus, we can realize the following characteristics: -Characteristic 4.1: The value of next p for each process p is never p; -Characteristic 4.2: The value of pred p for each process p is never p.
Some relations between two observable components can be discovered by carefully observing graphical animations, from which some characteristics can be conjectured. A relation between the glock observable component and the pc[p] observable component can be perceived by graphical animations and allows us to conjecture the following characteristics: -Characteristic 5.1: If glock is nop, then there is no process at l3, l4, l5 or l6 or in CS region; -Characteristic 5.2: If glock is a process p, then p is located at l3, l4, l5 or l6 or in CS region.
A relation between the pred[p] observable component and the pc[p] observable component allows us to conjecture the following characteristic: -Characteristic 6: If pred p for each process p is nop, then p is never located at l4, l5, l6 or l12.
A relation between the pc[p] observable component and the next[p] observable component allows us to conjecture the following characteristics: -Characteristic 7.1: If each process p is located at l2 or l9, then next p is nop; -Characteristic 7.2: If next p for each process p is nop, then p is not located at l11 or l12.
A relation between the lock[p] observable component and the pc[p] observable component allows us to conjecture the following characteristics: -Characteristic 8.1: If lock p for each process p is true, then p is located at l5 or l6; -Characteristic 8.2: If each process p is located at l5, then lock p is true.
Note that when a process p is located at l6, another process may set lock p to false. There are cases such that it is necessary to fix the values of some observable components so as to discover some similarities of multiple states and/or some relations among observable components. It is not straightforward to do so by observing graphical animations because we need to remember states in which the former observable components have the fixed values. For example, it must not be reasonable to remember all states in a graphical animation such that pred p1 is p2 and p2 is located at rs, l1, l2, l9 or l12. One possible remedy for it is to use the Find Patterns functionality of SMGA [7,22,23]. Given a condition written by human users, the Find Patterns functionality finds all states in an input sequence of states such that they satisfy the condition. When we would like to find all states in an input sequence of states such that pred p1 is p2 and p2 is located at rs, l1, l2, l9 or l12, it suffices to write the following condition: '] == 'p2' says that pred p1 equals p2. && and || are logical conjunction and disjunction, respectively. Figure 16 shows three state pictures among the states discovered by the Find Patterns functionality for the condition.
It does not suffice, however, to use the condition above-mentioned so as to conjecture non-trivial characteristics. This is because the pair (p1, p2) is one possible combination and there are five more combinations to consider: (p1, p3), (p2, p1), (p2, p3), (p3, p1) and (p3, p2). Note that we do not need to take the three combinations (p1, p1), (p2, p2) and (p3, p3) into account because of Characteristic 4.2. Let (p, q) be each of the six combinations to consider. Carefully observing all states discovered by the Find Patterns functionality for the six combinations to consider, we can conjecture some non-trivial characteristics: -Characteristic 9.1: If pred p is q and q is located at rs, l1, l2, l9, l11 or l12, then p is not located at l3, l4 or l5; -Characteristic 9.2: If pred p is q and glock is q, then p is not located at l3, l4 or l5; -Characteristic 9.3: If pred p is q, next q is not nop and p is located at l3, l4, l5, l6, cs, l7, l8 or l10, then q is not located at l3, l4 or l5.
We notice that there are both states in which next q is nop and those in which next q is not nop among the states found by the Find Patterns functionality of the condition of Characteristic 9.1, while there are only states in which next q is nop among the states found by the Find Patterns functionality of the condition of Characteristic 9.2. Then, finding the states with the Find Patterns functionality of the second sub-condition only of Characteristic 9.2 because the first sub-condition is shared by both characteristics, we realize that next q is nop in all of them. Therefore, we come up with the following characteristic: -Characteristic 10: If glock is a process p (or equivalently non-nop), next p is nop.
We have used the Maude reachability analyzer (or the search command) to model check that all characteristics conjectured in this section are invariant properties with respect to the state machine formalizing MCS protocol and have not found any counterexamples for each characteristic.
Moreover, we have formally proved that Characteristics 2, 4, 7.1, 8.2, 9 and 10 are invariants with respect to the state machine formalizing MCS protocol. Please refer to the APSEC 2020 paper [27] in detail.

Some lessons learned
Let us summarize some lessons learned through the case study with SMGA and MCS protocol.

Some new tips on state picture design
One important lesson learned can be directly derived from what is described in Section 5: -State picture designs should be visualized as much as possible based on Gestalt principles, more specifically proximity principle and similarity principle; visual objects of observable components that are closely related should be closely arranged; visual objects of observable components whose types are the same should be the same, while different colors should be used when you would like to distinguish different instances; visual objects of observable components that are less related should be arranged apart.
We have described what effects we acquire from the new state picture design based on proximity principle and similarity principle in Section 5. We have also described how we discover characteristics of MCS protocol by observing graphical animations of MCS protocol generated based on the new state picture design and using the Find Patterns functionality of the SMGA tool in Section 6. The concept "extended CS region" is really crucial, which made it possible to conjecture Characteristic 2 or inv4(S,P) that is a key lemma that can largely contribute to the completion of the formal proof that MCS protocol enjoys the mutual exclusion property.
To make the lesson more practical, we describe some more concrete lessons or guides.
-When an observable component can have two different values, such as lock p for each process p, it should be visually/graphically represented as a light bulb.
For example, if an observable component has one value, such as on, we should use a fancy or light color; if it is the other value, such as off, we should use a plain or dark color.
-When an observable component can have three or more (but moderate) different values, such as glock and next p & pred p for each process p, we should prepare some designated area, such as a rectangle, and a specific position in the area for each value where some visual object, such as a circle on which the value is written, is displayed; if the observable component has a value, only the visual object for it should be displayed and the other visual objects for the other values should disappear; there may be some special value, such as nop, and if the observable component has such a value, nothing should be displayed. -If there are some local variables, such as next p , pred p and lock p for each process p, to processes or nodes, then we should design the layout of the visual representations for them so that we can visually/graphically identify what variables or observable components are local to what processes or nodes; for example, all local variables for each process should be aligned horizontally.

Some tips on characteristic conjecture
Some lessons we have learned from the case study are some tips on how to conjecture characteristics with SMGA: -By concentrating on one observable component, we may find that it never has some specific value, it has some specific value much more often than the other values and whenever it has some specific value, any other same-kind observable components never have the value, from which we may conjecture some characteristics.
-By concentrating on two different-kind observable components, we may find a relation between them, from which we may conjecture some characteristics. -By fixing some specific values of some observable components and taking a look at all state pictures in which the observable components have the specific values, we may find some relations among the observable components and some other observable components, from which we may conjecture some characteristics. It is necessary to use the Find Patterns functionality so as to take a look at all such state pictures because there may be many such states and it is almost impossible to remember all of them. -By carefully investigating the conditions of some characteristics that have been already conjectured and the states found by the Find Patterns functionality of (part of) the conditions, we may conjecture some other characteristics.
All characteristics we can conjecture with SMGA may not be true properties of systems under examination. Therefore, we need to use a model checker to confirm that the characteristics are more likely to be true properties of the systems. For all of the characteristics described in Section 6, we have used the Maude search command to confirm that there is no counterexample. We found two plausible characteristics with SMGA: -If a process p is located at l12, then there exists another process q ( = p) in CS region.
-It is not the case that there are two different processes p 1 and p 2 such that next p 1 = q, next p 2 = q, q = p 1 , q = p 2 and q = nop.
Therefore, it is mandatory to use a model checker to confirm each characteristic conjectured. It is not sufficient to use a model checker to do so because a standard model checker cannot prove characteristics or properties for an arbitrary number of each entities, such as processes. Hence, we need to use a theorem prover to prove each characteristic conjectured with SMGA and confirmed with a model checker. In the Qlock case study [4], it has been formally verified that Qlock protocol enjoys the properties conjectured with SMGA and confirmed with a model checker by writing what is called proof scores in CafeOBJ, an interactive theorem proving technique. Among the characteristics found for MCS protocol, it has been formally proved that Characteristics 2, 4, 7.1, 8.2, 9 and 10 are invariants with respect to the state machine formalizing MCS protocol as mentioned.

Summary of tips
The new tips on how to make good state picture designs are summarized in Table 2. We have one new generic tip and three new concrete tips with which we can make the generic tip more effective. In the table, the generic tip is called SPD-T 5, while the three concrete tips are called SPD-T 5.1, SPD-T 5.2 and SPD-T 5.3, respectively. The tips on how to conjecture state machine characteristics with SMGA are summarized in Table 3.
8 One more case study Anderson protocol [1] is a shared-memory mutual exclusion protocol. The protocol uses a finite Boolean array whose size is the same as the number of processes participating in the protocol. It also uses the modulo operation of natural numbers and an atomic operation fetch&incmod. fetch&incmod takes a natural number variable x and a non-zero natural number constant N and atomically does the following: setting x to (x + 1) % N , where % is the modulo operation, and returning the old value of x. We suppose that there are N processes participating in Anderson protocol. Figure 17 shows the protocol written in Algol-like pseudo-code. We suppose that each process is located at rs, ws or cs and initially located at rs. place is an array whose size is N, each of whose indexes is a process IDs and each of whose elements stores one from {0, 1, . . . , N − 1}. Initially, each element of place can be any from {0, 1, . . . , N − 1} but is 0 in this paper. Although place is an array, each process i only uses place[i] and then we can regard place[i] as a local variable to each process i. array is a Boolean array whose size is N and each of whose indexes is as usual. Initially, array[0] is true and array[j ] is false for any j ∈ {1, . . . , N − 1}. next is a natural number variable and initially set to 0. x, y := e 1 , e 2 Table 3 Tips on characteristic conjecture   CC-T 1 By concentrating on one observable component, we may find that it never has some specific value, it has some specific value much more often than the other values and whenever it has some specific value, any other same-kind observable components never have the value, from which we may conjecture some characteristics.

CC-T 2
By concentrating on two different-kind observable components, we may find a relation between them, from which we may conjecture some characteristics.

CC-T 3
By fixing some specific values of some observable components and taking a look at all state pictures in which the observable components have the specific values, we may find some relations among the observable components and some other observable components, from which we may conjecture some characteristics. It is necessary to use the Find Patterns functionality so as to take a look at all such state pictures because there may be many such states and it is almost impossible to remember all of them.

CC-T 4
By carefully investigating the conditions of some characteristics that have been already conjectured and the states found by the Find Patterns functionality of (part of) the conditions, we may conjecture some other characteristics.

CC-T stands for Characteristic Conjecture Tip
Fig. 17 Anderson protocol in Algol-like pseudo-code is a concurrent assignment that is processed as follows: calculating e 1 and e 2 independently and setting x and y to their values, respectively. We suppose that there are three processes that participate in Anderson  where l i for i = 1, 2, 3 is a label such as rs, ws and cs, pl i for i = 1, 2, 3 is a natural number (precisely 0, 1 or 2), npl is a natural number (precisely 0, 1 or 2) and b i for i = 1, 2, 3 is a Boolean value. Initially, each l i is rs, each pl i is 0, npl is 0, b 1 is true and each b j for j = 2, 3 is false. I Anderson consists of one state. Let init equal the initial state.  Figure 18 shows a state picture Fig. 18 A simple state picture for Anderson protocol based on the simple design. The simple state picture design does not make best use of the human image perception capability. We then use the tips on how to make state picture designs summarized in Tables 1 and 2. Figure 19 shows a state picture based on one state picture design made according to the tips.
We visualize the array observable components as follows: Three colors (light pink, violet and light blue) are used to represent the three indexes (0, 1 and 2, respectively) instead of natural numbers because colors are visually/graphically more perceivable than natural numbers. Each element of array is either true or false. If it is true, a red box appears at the designated place. If it is false, nothing appears at the designated place. On the above visualization of array, because array[0] = false, array [1] = false, array [2] = true, a red box appears at the index 2 (or the light blue color place) and nothing appears at the other indexes (or the light pink and violet places).
We visualize the next observable component as follows: The next observable component stores one of the three indexes 0, 1 and 2. When it is 0, a light pink box appears at the lest-most place and is aligned vertically with the light pink rectangle representing the index 0 of the array visualization. When it is 1, a violet box appears at the middle place and is aligned vertically with the violet rectangle representing the index 1 of the array visualization. When it is 2, a light blue box appears at the rightmost place and is aligned vertically with the light blue rectangle representing the index 2 of the array visualization. On the above visualization of next, because next = 1, a violet box appears at the middle place (see also Fig. 19).  Fig. 19).
Because of the visual representations of the place, next and array observable components described so far, it is possible to visually/graphically perceive the value of each place[p] for p = p1, p2, p3, the value of next, the value of each array[x] for x = 0, 1, 2 and some relations among those values. For example, we can visually/graphically perceive that two boxes of the place[p] observable component and the next observable component such that their colors are the same and a red box of the array observable components are aligned vertically; we can visually/graphically perceive that the three values of the place observable components are different from each other.
Observing graphical animations of Anderson protocol, we often find that at least one of the three boxes representing the values of the three places and the two boxes representing the values of next and some array element, namely the three boxes, are aligned vertically. Figure 20 shows four such state pictures. For example, on the top right state picture of Fig. 20, the left-most three boxes (two pink boxes and on red box) are aligned vertically. On the four state pictures of Fig. 20, the process concerned, for example p1 on the top right state picture of Fig. 20, is located at either ws or cs. Thus, we first guess that whenever place[p] = next and array[place [p]] = true, p is located at either ws or cs for any process p. This guess of ours is, however, refuted by the initial state whose picture is shown in Fig. 21, where all five boxes are aligned vertically and all three processes are located at rs.
Because our intuition says that there must be some interesting relation among place[p] = next, array[place [p]] = true and that p is located at either ws or cs, however, we ask SMGA with its Find Patterns functionality to find all states that satisfy the following condition:  for p = p1, p2, p3, x = 0, 1, 2 and l = ws, cs. In all states found by the Find Patterns functionality, we notice that there is no process located at rs. From this observation, we conjecture the following characteristics: Fig. 21 Initial state picture of Anderson protocol -Characteristic 11.1: If a process p is located at ws, place[p] = x, next = x and array[x] = true, then there is no process located at rs; -Characteristic 11.2: If a process p is located at cs, place[p] = x, next = x and array[x] = true, then there is no process located at rs.
In all those states found by the Find Patterns functionality, we also find that the three values of the place observable components are different from each other, which can be visually/graphically perceived because of the visual representations of the place observable components (see Fig. 20). This observation guides us to the following characteristics:  [2] = true and there is no process located at cs. We find several other state pictures like them, from which we can conjecture the following characteristic: -Characteristic 13: If a process p is located at ws, place[p] = x and array[x] = true, then there is no process located at cs.
We also conjecture the following characteristics: -Characteristic 14: There is always at most one process located at cs. From Characteristic 14, we know that the conditional part of Characteristic 12.3 is always false and then Characteristic 12.3 is vacantly true and becomes less interesting. From Characteristic 15, Characteristic 11.2 can be simplified as follows: -Characteristic 11.2': If a process p is located at cs, place[p] = x and next = x, then there is no process located at rs.
We have used the Maude reachability analyzer (or the search command) to model check that all characteristics conjectured in this section are invariant properties with respect to the state machine formalizing Anderson protocol and have not found any counterexamples for each characteristic.

Conclusion
We have used MCS protocol, not only a literature protocol but also used in Java virtual machines, to exemplify that state picture designs based on which the SMGA tool produces graphical animations should be better visualized. The new state picture design of a state machine formalizing MCS protocol has been assessed based on Gestalt principles, more specifically proximity principle and similarity principle. We have reported on a core part of a formal verification case study in which the new state picture design and the SMGA tool largely contributed to the successful completion of the formal proof that MCS protocol enjoys the mutual exclusion property. We have summarized the lessons learned as two groups of tips. The first group is some new tips on how to make state picture designs. The second one is some tips on how to conjecture state machine characteristics by using the SMGA tool. We have also reported on one more case study in which the state picture design has been made for Anderson protocol and some characteristics of the protocol have been discovered based on the tips.
As usual, there are many left to do as future work. The current implementation of the SMGA tool is not interactive in that state picture designs cannot be revised, the layouts of visual objects cannot be changed, any visual objects cannot be zoomed-in/-out, any visual objects cannot be hide, etc. while playing graphical animations and even when pausing graphical animations. We will plan to make SMGA interactive so that we can do what has been just mentioned. The Find Patterns functionality of SMGA is useful as described but only allows us to use a limited class of regular expressions. Maude allows us to use context-free grammars plus some more, such as binary operators that are associative and/or commutative, and has a rich pattern matching functionality between terms constructed based on rich grammars. Maude also provides several formal methods functionalities, such as a reachability analyzer and an linear temporal logic (LTL) model checker. We will plan to integrate SMGA with Maude so that rich Maude functionalities can be used by SMGA. We should conduct some more case studies in which different types of protocols, such as PAXOS [17], as well as some more mutual exclusion protocols, such as a mutual exclusion protocol for ad hoc mobile networks [30], are tackled. Case studies should include formal proofs in which the SMGA tool is used to conjecture lemmas.