Modeler:15/PopulationEdit
Population Window
This window is meant to add examples in a grid-like or data-entry-like interface. The examples may be given using the previously selected expression. The window has three tabs: Grid, Details and Live Data.
Every row is one example, a tuple. The expression line at the top verbalizes the current row, so you can read back what the example says. A row is in one of three states: confirmed (a fact you vouch for), unconfirmed (entered but nobody has ruled on it yet, shown in the warning colour) or a counter example (deliberately wrong, shown in the error colour). Switch the state with Is Confirmed and Is Counter Example in the popup menu of the row. Well-formedness checks and generated artifacts only weigh confirmed examples; a counter example is there to test that a constraint really forbids it.
Grid
- Previously entered example values may be re-used with the dropdown control which appears when clicking a cell.
- Examples from other Object Types may be picked using the Lookup button.
- Rows may be duplicated to have a single value changed.
- Using Copy and Paste an entire example population set may be edited using an external spreadsheet application.
- Augment asks a configured language model for more examples in the same shape; Import Row(s) brings rows over from the Live Data tab.
- A value is read in the notation of the locale the expression is stated in and stored in the standard form of its data type (a date as
2024-02-01, a number with a dot), see standardized values. In the Details tab a field is typed in the shape its label type gives with Typed as. How a value reads back — in the expression line, in verbalizations, in diagrams — follows the label type's Shown as. A value the label type's Pattern does not accept is kept and reported by the well-formedness checks; see the label type editor. - The panel below the grid follows the selected row. It lists every fact the instance takes part in, verbalized, and in italics every fact type it could take part in but does not yet. Double-click a fact to open the population of that fact type on that row; double-click an italic reading to add such a fact for this instance, with its identification already filled in.
Ordering the rows
Rows are shown in the order they were entered. Move Up and Move Down (Ctrl+Up, Ctrl+Down) rearrange them, and Reset Order forgets the arrangement and returns to entry order. Arranging is always allowed and is, by itself, only a matter of presentation: a list nobody arranged is not changed on save, while a list you did arrange keeps its order the next time it is opened. Whether an order also means something is decided by the role, see Sets, bags and sequences below.
Grouping rows into one instance
Some instances are not a single value but a collection of them: a team is its members, a route is the list of cities it visits. In the population window such an instance is entered as a group of rows: several rows of the same type that together form one example. A group is shown as a framed block with a shaded band; its first row is the head and carries a brace in the # column, the numbers of the other members are greyed. Whichever member is selected, the expression line and the related facts speak for the whole group: "the team of John, Mary and Jack".
- Group (Ctrl+G) makes the current row join the group of the row above, starting a new group with it when that row was on its own. Repeat it on the next row to grow the block.
- New Group (Ctrl+Alt+G) lets the current row start a group of its own, which is how you begin a second group right below another one.
- Ungroup (Ctrl+Shift+G) takes the row out of its group; when the last member leaves, the group is gone.
- Add Member (Ctrl+Shift+Ins) adds a new row inside the current group. Plain Add always makes an independent row, so nobody joins a group by accident.
- Move Up and Move Down inside a block order the members. Across the edge of a block they change membership: the row leaves its block and joins the neighbouring one, or none.
The group is the example: its state (confirmed, counter example), comment and reference name belong to the group as a whole. Other fact types refer to a group as one instance, and two groups with the same members are the same instance, however their rows are numbered.
Instead of entering members one by one you may type the collection as a literal in a cell of a new row: {John, Mary, Jack} creates the members and the group at once. Braces denote a set or bag, parentheses (Amsterdam, Haarlem, Leiden) a sequence. The same literals are used in exported files and by the expression input dialog, where a phrase such as "John, Mary and Jack" is qualified as a set, bag or sequence.
Sets, bags and sequences
Grouping rows says that the rows form one instance; the kind of the collection says what that instance is:
- a set: each member occurs once and the order is irrelevant, {John, Mary} and {Mary, John} are the same team;
- a bag (multiset): a member may occur more than once, the order is still irrelevant;
- a sequence: the order is the meaning, (Amsterdam, Haarlem) and (Haarlem, Amsterdam) are different routes, and Move Up / Move Down inside the block change the fact.
The kind is a property of the role, not of the data. Set it in the role editor under Holds: a single Person, a set of Persons, a bag of Persons or a sequence of Persons. Until a role says so, CaseTalk derives the kind from the examples: grouped rows make a set, an arranged group a sequence. The well-formedness rules report a grouping role that has not said what it holds, and examples that do not keep to the kind, such as a member twice in a set. On the diagram an object type identified by a collection is drawn with braces around it, and when artifacts are generated the collection gets a key and a member fact type of its own, with a position column for a sequence and an occurrence column for a bag.
Details
The Details tab shows one instance at a time as a data entry form: its identifying values, the tuple reference and annotation, and below that its Related facts.
- There is one section for every fact type the instance plays a role in, headed by the reading of that fact type.
- When the instance can have that fact only once, the section is a single field; when it can have several, the section is a grid with an empty row to add one; a fact type without further values is a tick.
- A grouped instance is shown whole, with all its members.
- Values entered here are stored when you move to another instance, switch tabs or press OK.
Decisions
Below the related facts, Decisions lists every decision table the fact takes part in: a business rule that judges it, and every rule or derivable fact type that reads it. For each it shows the facts of that example as sentences - the licence, the rental period, the driver - and what the rules make of it:
- Agrees with rule 1: ... - the rule that applies says the same as the example;
- Breaks rule 2: ..., in red - the rule that applies says otherwise: the example or the rule is wrong;
- No rule decides this example or Rules 1, 2 all apply - a gap or an overlap in the rules.
This is information only: population is never refused. The same findings are listed in the well-formedness checks (The population must keep to the decision rules).
Live Data
- When declaring external datasources CaseTalk may even provide live database examples. Select the needed rows from the Live Data tab and click the Copy Refs button.
- A population that comes from such a source is static: Unlock... asks before you edit it by hand.
Other versions: v8 | v9 | v10 | v11 | v12 | v13 | v14 | v15
| Population | |
|---|---|
| Dialogs | Population Edit · Namespaces |
| Reference | Reference Data |


