Introduction To Reqt: - A Free Software Requirements Modeling Tool
Introduction To Reqt: - A Free Software Requirements Modeling Tool
se
Introduction to reqT
reqT Gist
var m = Model( Product("reqT") has Gist("A tool for modeling evolving requirements."), Release("2.0") has Gist("Major update based on student feedback."), Product("reqT") owns Release("2.0") ) m += Feature("toHtml") has Gist("Generate web document.") println(m) m.toHtml.save("reqT.html")
Feature("toHtml")
Feature("toTable")
Model.fromTable("reqT.txt")
Feature ("f2")
Status
Spec
assigns(Prio(1)) Stakeholder("s1")
[Some examples modified from Carlshamre, P., Sandahl, K., Lindvall, M., Regnell, B., Natt och Dag: "An industrial survey of requirements interdependencies in software product release planning", J.: Int. Conf. on Requirements Engineering (RE01), Toronto, Canada, pp. 8491, 2001]
Future versions of reqT may include constraints to formulate and solve release planning problems using Constraint Satisfaction Programming (CSP) with a CSP solver (e.g. JaCoP)
reqT.Goal example
Goals are high-level reasons for creating products or features.
Model( Product("shipyard quoting") has Spec("Ship repair cost calculations based on experience data."), Goal("increase accuracy") has Spec("Our precalculations shall be more accurate than today."), Product("shipyard quoting") helps Goal("increase accuracy") )
reqT.Feature example
A feature is a releasable characteristic of a Product.
Model( Feature("room repair") has ( Gist("Manage room repair periods."), Spec("The product shall be able to " + "record that a room is under repair in a specified period." + "When under repair, the room shall not be bookable."), Status(SPECIFIED) ) )
up
RELEASED
up
TESTED
down
down
IMPLEMENTED
up down
up
PLANNED
up up down
FAILED
VALIDATED
up down init up down
POSTPONED
down
down
SPECIFIED
ELICITED
down
DROPPED
up
down
Status(value: Level)
scala> val s = Status.init s: reqT.Status = Status(ELICITED) scala> s.up res1: reqT.Status = Status(SPECIFIED) scala> s.down res2: reqT.Status = Status(DROPPED)
down
POSTPONED down
down up
DROPPED
down
Priorities
Any entity can have an integer priority attribute:
Model( Feature("x") has Prio(10), UserStory("u") has Prio(20), Stakeholder("s") has Prio(5) )
[Example modified from "Setting quality targets for coming releases with QUPER: an industrial case study", R. Berntsson Svensson, Y. Sprockel, B. Regnell, S. Brinkkemper, Requirements Engineering, DOI: 10.1007/s00766-011-0125-0]
assigns(Prio(1))
ttms: Set[reqT.Entity] = Set(Quality(timeToMusic/target/min), Quality(timeToMusic/metric), Quality(timeToMusic/barrier/2), Quality(timeToMusic/ref/X), Quality(timeToMusic/ref/Y), Quality(timeToMusic/ref/Z), Quality(timeToMusic/differentiation), Quality(timeToMusic/utility), Quality(timeToMusic/saturation), Quality(timeToMusic/target/max), Quality(timeToMusic/barrier/1))
scala> m += ttm.owns(ttms.toArray:_*)
reqT.org types
Abstract
subtype
Element
Concept Node Attribute[T](value: T) Gist(String) Context Product Release Class Member UserStory UseCase Task VividScenario Stakeholder Actor Spec(String) Status(Level) Why(String) Example(String) Input(String) Output(String) Prio(Int) Label(String) Image(String) Edge
Structure Key(Entity, Edge) NodeSet(Node, Node, ...) AttributeEdge Relation has owns requires Trigger(String) Precond(String) Frequency(String) Critical(String) Problem(String) Comment(String) Deprecated(String) excludes helps hurts precedes inherits deprecates assigns(Attribute)
Type
Entity(id: String) Requirement Goal Feature Function Data Quality Interface Design Scenario
Syntax is flexible: you can skip dots and parentheses in some cases
"abc" + "xyz" // string concatenation, short for: scala> "abc".+("xyz") // object.method(singleParameter) res3: java.lang.String = abcxyz
scala> val kns = Feature("f") has (Gist("g"), Spec("s"), Prio(1)) kns: (reqT.Key, reqT.NodeSet) = (Key(Feature(f),has()),NodeSet(Gist(g), Spec(s), Prio(1))) scala> Model(kns) res42: reqT.Model = Model(Feature("f") has ( Gist("g"), Spec("s"), Prio(1) ) )
Example use of powerful Scala scripting: Collecting and looping with guards
// extract all entities that have priority < 5 val highPrio: Model = m collect { case (Key(entity,edge), nodes) if nodes exists { case Prio(p) => p < 5 case _ => false } => (Key(entity,edge), nodes) } // do the same with a for-comprehension val highPrio: Model = for ( (Key(entity,edge), nodes) <- m if nodes exists { case Prio(p) => p < 5 case _ => false } ) yield (Key(entity,edge), nodes)
Same effect as above As f2 does not have a Spec, s3 gets the value None instead of Some[String] Extract value or default: Get the value if it exists. Extract value or default: If the value does not exist, a default value is given.
Models can be constructed by applying sequences of entities linked to one or many nodes via either has or some relation, such as owns, requires, excludes, etc. (See further the reqT type structure.) The nodes (entities, attributes) and relations can be extracted using various operations on models explained below.
m.sources m.destinations m.entities m.undefined m.attributes m.relationSources m.attributeSources m.unrelated m.unsourced m.parents m.children m.roots
Set of all entities that are sources of links in model m. Set of all entities that are destinations of relations in model m. Set of all entities. Same as: m.sources ++ m.destinations Set of all entities that are destinations and not sources. Same as: Set of all attributes of all entities of model m. m \ has sources m / has sources m.entities diff m.relationSources diff m.destinations (m.relationSources ++ m.unrelated) diff m.destinations m / owns sources m / owns destinations m.parents diff m.children
for (e <- m.destinations; if (!m.sources.contains(e))) yield e