print · source · login   

Repdigit/Palindrome Checker

Description

A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. [WP_PAL]

A repdigit is a natural number composed of repeated instances of the same digit in a positional number system (often implicitly decimal). The word repdigit is a portmanteau, formed from repeated digit. [WP_REP]

The palindrome/repnumber checker depicted in Figure 1 can perform two kinds of tests. One can test whether two, three, or four numbers entered are a palindrome or a repdigit. In our case, a palindrome is a sequence of numbers that remains the same when its numbers are reversed. For example, for the inputs IPalindrome3(12, 4, 12) and IPalindrome4(1, 3, 3, 1) output OYes will be returned. A repdigit is composed of repeated instances of the same number. For example, the inputs IRepnumber2(20, 20), IRepnumber3(7, 7, 7), or IRepnumber4(5, 5, 5, 5) lead to an OYes output.

The SUT

SUT model
Fig. 1: SUT model  

Resources

model.pdf Δ   7Kb   February 14, 2015, at 07:49 PM
model.register.xml Δ   4Kb   February 14, 2015, at 07:49 PM
model.svgz Δ   3Kb   February 20, 2015, at 03:49 AM
model.uppaal.xml Δ   4Kb   February 14, 2015, at 07:49 PM