Tested patterns and invalid forms
Documentation status: reference — see Maturity and evidence.
H-Logic documentation should behave as executable specification. Examples must remain aligned with the current grammar and parser/evaluation test categories.
Stable pattern families
The validated reference families include primitive expressions and collections, definitions, typed roles and attributes, named and anonymous instances, interface attachment, quantifiers, logical relations, composite/projected definitions, commands and queries.
Examples:
#an_apple;
1;
'abc';
1.75;
true;
();
(x,);
(x, y);
[a, b];
{#a, #b};
define .:#Transfer(me)[sender:#Person, receiver:#Person, amount::#float];
#alice::#Customer;
any x:#A, exists y:#B on .:#Pair(x, y);
ask .:#A(x) and .:#R(x, y) return x;
Forms to reject
Do not publish examples that rely on these clarified invalid or misleading forms:
- prefixed query variables such as
?x; &nameused as a role name;- unsupported context pseudo-functions;
- structural application of an undefined type;
- a projected public role absent from the composite body;
- a quantified compact form that combines typing and equality (
y:#A=&a); - treating a wildcard as an exact nil constraint;
- assuming descendant slot order equals ancestor slot order;
- wrapping a singleton result in an artificial list.
Review gate
Before adding or changing an H-Logic example, validate it against the target grammar and, where possible, identify or add a parser/evaluation test covering the same construct. If this has not been done, mark the page as architecture or guide instead of claiming reference maturity.