Modeler:15/VCEditor

From CaseTalk Wiki
Jump to: navigation, search

Value Constraint Edit

A value constraint limits the values a label type may be populated with. Open the editor from the Value Constraints tab of the Object/Fact Type editor — press Add, or Edit an existing constraint (double clicking the row does the same) — or from a label type in a diagram.

The title bar names the label type and, in brackets, the kind CaseTalk reads the constraint as. That is derived from the values themselves, so it follows what you type; a constraint with no values yet reads as empty.

Kind

The Kind selector at the top says what you are defining. Each kind has its own editor, and picking another one converts nothing — the values stay exactly as they are, only the way you edit them changes.

Value List

The simplest kind. Every line in the list is one possible value.

Range

One row per range. Each row holds the Minimum and the Maximum of that range, with a clickable operator beside each of them, so a row reads left to right the way the constraint does: >= 1 .. 100 <=.

Including or excluding a bound

Click an operator to include or exclude its bound. >= and <= take the bound in; > and < leave it out. A minimum of 0 that is included allows zero itself; excluded, it allows everything above zero but not zero — and on a label type holding decimals that is every value in between as well.

A bound that has not been filled in can be neither included nor excluded, so clicking its operator does nothing until there is a value beside it.

Leaving an end unlimited

Leave a Minimum or a Maximum empty and that end is unlimited. The operator beside it then reads none. A row with only a minimum accepts everything from it upwards; a row with only a maximum accepts everything up to it. Type a bound back in and that end is closed off again.

A Minimum and a Maximum that are the same is a single value.

A range is not a list

A range is not the same constraint as the values between its bounds listed one by one. A range from 1 to 3 also covers whatever else lies between them, which on a label type holding decimals includes 1.5; the three values 1, 2 and 3 do not. Use a range where the bounds are the point, and a Value List where the values are.

Ranges are stored with the ".." notation, which is why typing 1..9 in the Value List is enough to make a constraint read as a Range.

Key and Label

Two columns: the Value that is stored and populated, and the Label it stands for. Use this where the data holds a code but people say the meaning — D for Draft.

Because every value can carry a label, this kind can show any constraint without losing anything, whatever kind it really is.

State Machine

The values become the states of a state machine, and the matrix holds the transitions between them. Every state is both a row and a column: the row is the state transitioned from, the column the state transitioned to. One cell, where a row meets a column, is therefore one transition.

Double click a cell to place that transition. Double click it again to take it away. A cell that carries a transition shows a marker — leaving the Start row, arriving in the End column, or an ordinary change of state in between. Taking a transition away also discards the description it carried, which is the point: the transition is gone.

The diagonal, where a state meets itself, is a state transitioning back to itself. That is an ordinary loop and is placed and removed the same way.

  • The States list on the left holds the states. Adding or removing one is simply typing in that list; the matrix follows when you leave it. Removing a state takes its transitions with it.
  • Rename State renames the state of the selected row and carries its transitions with it. Renaming in the list instead reads as a delete plus an add, and the transitions would be lost.
  • The Start row is where the machine begins and the End column is where it stops. A state that reaches nothing and that nothing reaches is stored as reachable from the start.
  • Transition describes the transition of the selected cell. Leave it empty for a transition without a description.

Changing the kind

Value List, Range and Key and Label can be mixed and swapped freely: the strongest kind present is how the whole set reads, and nothing is thrown away. One 1..10 makes every plain value a range whose lower and upper bound are the same; one X=Something makes every plain value a key whose label equals the key.

State Machine is the exception. It holds transitions and nothing else, so leaving it keeps the state names as ordinary values but discards every transition between them. CaseTalk asks before doing that, and only when you press OK. Up to that point you can move between the kinds as often as you like without losing an arrow.

Comment

The lower pane documents the constraint itself — why these values, and where they come from. Its tabs are the annotation sections, so a definition, an example or a source can each be kept apart.

Buttons

  • Populate — reads every value already used in the population of this label type and adds the ones that are not on the list yet.
  • Vocabularies — translations for the value the cursor is on. Available once that value is part of the model.
  • Copy and Paste — the whole list as plain text, one value per line, to move a set of values between constraints or in and out of a spreadsheet.

Status bar

The bar at the bottom reports what is on screen: how many values, or how many states and transitions. It also warns about values that appear more than once — a value constraint holds each value only once, so only the last line of each is kept.




Constraints — Constraint Types in CaseTalk
Reference All Constraint Types
Editors Uniqueness (UC) · Subset (SC) · Totality (TC) · Value (VC)
Wizards UC Wizard · TC Wizard
Related Expression Unification · GlrOptions · Business Glossary