ActiveFacts ToDo list Metamodel ALWAYS Integrate Metamodel changes through lib/activefacts/vocabulary/metamodel.rb SOON Add Terms for Object Types using Words? (which include adjectives/rolenames) Notes (Extend context notes) comments in CQL? Derivation notes? HelpText? FBM Standards Metamodel Migrate towards standard terminology Make ORM model emit good CQL Use UUIDs Renamed from ("Person (was called User) ...") Multiple revisions? Extensions (new vocabularies?) for Metamodel security processes discussion/conversation Implement abstract supertypes? Allow Object naming "Paris means City 'Paris'" Use subtype extension in Metamodel (based on abstract SBVR supertypes as shown?) Meaning Concept NounConcept ObjectType RolePlaying FactType Fact Value Query Lexeme (language/locale sensitive text) Term Reading (template text, adjectives) Value (literal) Or just have per-locale syntax parser/generator to/from canonical form? Role names need to attach to RoleRefs instead of Roles Refactor RoleRef and RoleSequence so RoleSequence isn't re-used out of context Index/access-path/ordering pragmas Temporal literals (expressions using current time) Temporal: e.g. Date/Time {{/not} {after/before}} Date/Time SOON Refactor Derived Fact Types (Queries) using new terminology CQL Object Types ValueTypes Change so Data Types are not inherited Implement named parameters Autogenerated On assert (UUID) On save (ID, Timestamp, etc) Partial auto-counters (Role, *Ordinal*) Implement base VTs SOON "vt is written;" syntax Entity Types SOON "Et is identified;" forward-reference syntax Allow other possessive pronouns "Ship is identified by her Name" Allow shorthand for multi-part identification "Person is identified by his given-Name and family-Name;" Subtypes Support Role subtypes as distinct (subtype migration allowed) Subtyping fact type role names? Object Names "Paris means City 'Paris'" Joins SOON Anti-joins (no, none, negation, "it is not the case that", etc) SOON Double-contraction "Person who came to Party and was not invited to" SOON Outer joins ("maybe") SOON Compile Value join nodes STARTED, DIFFICULT Implement comparison operators as derived fact types (<, etc) Automatically detect type conversion joins Queries Expression clauses Redo grammar as normal clause (A < B -> A rel B) User-defined expression operators/clauses? Fact Type Negation (A rel no B, no A rel B) "returning" clause Invoke queries using defined role names: Company has young Person (as Director) where ... (invoke as "Company has young Director") Temporal terms and phrases "now" "4 year ago", "3 minutes from now" Temporal ValueType to act as a Universal fact type over the domain e.g. Time.hour -> all possible hours Figure out what base constraints propagate to the result set Allow "which" to project roles from a query "which Person gatecrashed Party?" Value range restrictions (in {1,2,4}) instead of (restricted to {...}) Linguistic aspects UTF-8 Support Other languages Define syntax for and handle Gender French Spanish Use filename to select (Bar.fr.cql or Bar.cql.fr?) Use metamodel predicates instead of pragmas e.g. for "Object type is independent", say "Object Type 'Foo' is independent"; How to handle Fact Type names in the above syntax? Objectify? But need ring constraint roles. Vocabulary name is implicit here... SOON Allow more than one Business Context Note per item Fact type binding Use non-local role names in fact type matching? Check that subscripts are being tested properly Implement some/that binding subscripts not necessary where "that" is unambiguous. which/that: "which Person likes that Person?" Double-hyphen for hyphenated adjectives Constraints SOON Implement "maybe" to make min-frequency non-mandatory Value Literal syntax constraints Regexp: "vt is written to match /xyz/" Regexp for role values subtype of Value Constraint PEG Grammars for literals? (extend CQL grammar) Ring constraints how to handle ambiguous rings, e.g. in ternaries? how to handle multiple rings in one FT? Think about syntax to allow this Populate Ring Types in metamodel (five unaries?) Constraint names (esp Presence Constraints, they become index names) Temporal Modeling ([at most] one at a time) single table mapping two tables mappings (current/history) Add Exclusion constraint syntax using negative clause: Person is ceo if and only if no Manager manages (that?) Person Similar case exists for subset constraint? A rel B only if no B rel C - think through Delay creation of default identifying constraints for objectified fact types Perhaps before relational/object mapping? Or don't create them at all - handle missing PI for OFTs instead Asserted instances "including {'foo', 'bar', ...}" akin to "restricted to"... Importing vocabularies Distinguish "import" from "use"? Bind to imported ValueTypes (and other object types?) Base vocabularies for SQL Multiple SQL base vocabs, using db pref to choose between. CQL Verbaliser SOON Detect new fact types that would be interpreted as an existing (only adjectives differ), and use single reading (before double-reading) e.g. other-Role of RingConstraint Implement some/that binding use some/that where "that" is unambiguous Don't emit some/that until binding will use it properly Instance data verbalisation Emit objectification joins Contractions (use Verbaliser!) Emit example fact from ORM2009 presentation Output clustering Emit Value Types just before first use Emit Constraints as soon as possible Choose "focus" items with most 1st and 2nd generation dependencies, and do all precursors/followers before choosing another Left-contraction of joins "Xyz is ... and is ...;" Units SOON Store sample data with specified unit Handle storing numeric Instance values (noted to be in the lexical form; but strings aren't!) SOON Save Units on ValueTypes Generate conversion formula to fundamental types CQL Shell Save definitions, including instances /sql; generate the SQL for this vocabulary /valid; check all metamodel constraints over the vocabulary, and/or vocabulary constraints over the population Queries /population {open, check, create} database_name /ruby /cql NORMA reader NORMA Joins Detect and store implicit joins in presence constraints (if needed???) Convert all NORMA Join paths NORMA input: Warn when preferred reading role order doesn't match the preferred identifier for objectified FTs Import instance data for objectified fact types Double-hyphen for hyphenated adjectives Generators Ruby generator Emit a module method for each example population Relational Composition Subtype Mapping extension (subtype in separate table) partition (separate and include all supertype roles) Make sure all test scenarios are covered Transforms Rails ID injection Subtype discriminator injection where no mandatory role on subtype Don't introduce additional discriminator for sub-sub-type Detect non-exclusive subtypes and discriminate combinations Column name generation Provide alternative generation pattern(s) (snake-case) Duplicate column names (detect, handle) SQL Generation Auto-generated column types IDentity fields GUIDs partial auto-counters (Ordinal) Timestamps other auto-counters? Foreign Key fields Index both ends Determine cascading based on mandatory-ness Emit triggers where PK is in a subtype (and view was generated) Existing database/vocabulary Minimal impact vs refactor and migrate Runtime API Autogenerated Data Types GUID, Ordinal Entity Save identifying roles as Role objects not symbols SOON Propagate retract() properly (replace delete?) Subtype migration Replace instance by instance of different class, de-/re-assign all roles? Re-use same role proxy/ies? Role value array proxy class Handle sorting by residual fields in counterpart's key Detect & preserve adds/deletes Correctly handle values across multiple constellations or in no constellation Verbalisation SOON Add readings to API Redo all verbalisation to use readings Use existing verbalise for to_s Ensure that all objects and classes verbalise and to_s SOON verbalise Role Value Array verbalise takes optional "verbalisation context" object Which objects have already been verbalised What role names and/or subscripts have been assigned Possible to implement as a single-pass process? Queries Query DSL/API in Ruby? CQL Query conversion to SQL (via Ruby?) Constellation boundaries Record unpopulated roles and object types during query execution (nil != mu) Hard vs soft boundary (Auto-fetch vs exception) RDBMS Platform Support DataObjects (SQL Server, MySQL, PostgreSQL, Oracle, DB2) Enumerate tables instead of needing "table" keyword Log changes to allow update Database reverse engineering Read Linda Bird's PhD thesis Extract raw schema info Tables Columns & types Null constraints Unique & primary keys Foreign keys Check constraints Naming Heuristics Rails Intuition (FK naming) Load Rails models Detect pluralisation intuit common reference modes (e.g. thing_ID) Examine data for likely FKs count, min, max, median, distinct, count(NULL) Check non-violation of possible FKs: select count(*) where not exists ... Decompose to elementary form Schema transform by manual selection (GUI?) Deabsorb (incl to use existing type) Alias name Project subclass using discriminator ... other transforms Test stubs/mocks Quality/usage metrics Mock API Mock data Use sample population as test data incorporate Faker, Machinist, etc Packaging and documentation Split into multiple gems? Example models Convert microformat RDF: http://microformats.org/about, http://www.data-vocabulary.org/ APRIMO Overall design Subscription, list/search models, friends Diagram view CQL view Object type browser Object Types Fact Types Constraints Instance data Query builder AJAX Design JSON API Server Stand-alone??? Metamodel Diagrams Convert from metamodel to JSON Database Derived Fact Types Constellation declarations Process models Units