FLOW ALGEBRA
User Interface Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/computing-ontologies/human-computer-interaction/user-interface-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "UserInterfaceOntology" v4.0
# ---------- DOMAIN ----------
DOMAIN := ComputingOntology
SUBDOMAIN := HumanComputerInteraction
ONTOLOGY := UserInterfaceOntology
# ---------- PRIMARY ENTITY ----------
ENTITY UserInterface {
definition:
"The perceptible and interactive boundary through which a human user
provides input to, receives output from and controls an interactive
computational system.";
objectives: [
Interaction,
Usability,
Accessibility,
Clarity,
Feedback,
Navigation,
TaskSupport
];
}
# ---------- CORE ENTITIES ----------
UIEntity := {
User,
Interface,
Screen,
View,
Component,
Control,
Input,
Output,
Navigation
};
UIComponent := {
Button,
Link,
Menu,
Form,
InputField,
Checkbox,
RadioControl,
SelectControl,
Dialog,
Tab,
Table,
Card,
Notification
};
UIState := {
Initial,
Active,
Focused,
Disabled,
Loading,
Error,
Success,
Completed
};
InteractionEvent := {
Click,
Tap,
KeyPress,
TextInput,
Selection,
Submit,
Drag,
Gesture,
VoiceInput
};
# ---------- FUNDAMENTAL RELATIONSHIPS ----------
User INTERACTS_WITH UserInterface;
UserInterface CONSISTS_OF UIComponent;
UIComponent RECEIVES InteractionEvent;
InteractionEvent MAY_TRIGGER Action;
Action CHANGES UIStateOrSystemState;
UserInterface PRESENTS Output;
Navigation CONNECTS View;
Feedback COMMUNICATES ResultOrState;
# ---------- INTERACTION FLOW ----------
UserGoal ->
LocateControl
-> PerformAction
-> InterfaceReceivesEvent
-> SystemProcessesAction
-> UpdateState
-> PresentFeedback
-> UserEvaluatesOutcome;
# ---------- SCREEN / VIEW ----------
View :=
PresentedInterfaceStateOrRegion;
View CONTAINS UIComponent;
Application MAY_HAVE MultipleViews;
Navigation MOVES User BETWEEN Views;
# ---------- COMPONENT ----------
UIComponent :=
InteractiveOrPresentationalInterfaceElement;
UIComponent HAS {
Identifier,
Label,
State,
Role,
Behaviour
};
InteractiveComponent SHOULD_HAVE PerceivablePurpose;
# ---------- BUTTON ----------
Button :=
ControlTriggeringAction;
Button MAY_HAVE {
Label,
Icon,
DisabledState
};
IF ButtonActivated
THEN AssociatedAction MAY_EXECUTE;
# ---------- LINK ----------
Link :=
ControlNavigatingToResourceOrLocation;
Link HAS Destination;
LinkText SHOULD_COMMUNICATE DestinationOrPurpose;
# ---------- FORM ----------
Form :=
CollectionOfInputControlsForDataSubmission;
Form MAY_CONTAIN {
InputField,
Checkbox,
RadioControl,
SelectControl,
SubmitControl
};
FormSubmission ->
Validate
-> AcceptOrReject
-> Process
-> PresentOutcome;
# ---------- INPUT FIELD ----------
InputField :=
ControlForEnteringData;
InputField MAY_HAVE {
Label,
Value,
Placeholder,
ValidationRule,
ErrorMessage
};
InputField SHOULD_HAVE ProgrammaticAndVisibleLabelWhereApplicable;
# ---------- VALIDATION ----------
InputValidation :=
UserInput
-> CheckRules
-> Valid | Invalid;
IF InputInvalid
THEN {
PreventInvalidProcessingWhereRequired;
PresentUsefulErrorFeedback;
};
# ---------- ERROR MESSAGE ----------
ErrorMessage :=
FeedbackExplainingProblemAndRecovery;
ErrorMessage SHOULD_IDENTIFY {
Problem,
AffectedInputOrAction,
CorrectiveActionWherePossible
};
# ---------- MENU ----------
Menu :=
CollectionOfNavigationOrActionOptions;
MenuItem MAY_TRIGGER {
Navigation,
Command,
Submenu
};
# ---------- NAVIGATION ----------
Navigation :=
MechanismForMovingThroughInterfaceOrInformationStructure;
NavigationElement MAY_INCLUDE {
Menu,
Link,
Breadcrumb,
Tab,
Search,
Pagination
};
User SHOULD_BE_ABLE_TO UnderstandCurrentLocation;
# ---------- BREADCRUMB ----------
Breadcrumb :=
HierarchicalNavigationTrail;
Breadcrumb MAY_SHOW {
ParentLocation,
CurrentLocation
};
# ---------- DIALOG ----------
Dialog :=
TemporaryFocusedInterfaceRegion;
Dialog MAY_REQUIRE UserDecisionOrInput;
ModalDialog MAY_RESTRICT InteractionWithUnderlyingView;
# ---------- NOTIFICATION ----------
Notification :=
InterfaceMessageAboutEventOrState;
Notification MAY_BE {
Informational,
Success,
Warning,
Error
};
Notification SHOULD_NOT UnnecessarilyInterruptUser;
# ---------- FEEDBACK ----------
Feedback :=
PerceivableResponseToUserActionOrSystemState;
Feedback MAY_BE {
Visual,
Auditory,
Haptic,
Textual
};
IF ActionProcessingDelayed
THEN LoadingOrProgressFeedback SHOULD_BE Considered;
# ---------- SYSTEM STATUS ----------
SystemStatus MAY_INCLUDE {
Loading,
Saving,
Offline,
Error,
Completed
};
Interface SHOULD_COMMUNICATE RelevantSystemStatus;
# ---------- FOCUS ----------
Focus :=
CurrentTargetForKeyboardOrAssistiveInteraction;
FocusOrder SHOULD_FOLLOW LogicalInteractionSequence;
IF InteractiveElementNotKeyboardReachable
THEN KeyboardAccessibility := insufficient;
# ---------- KEYBOARD INTERACTION ----------
KeyboardInteraction MAY_INCLUDE {
TabNavigation,
EnterActivation,
SpaceActivation,
ArrowNavigation,
EscapeAction
};
KeyboardOperability SUPPORTS Accessibility;
# ---------- RESPONSIVE INTERFACE ----------
ResponsiveInterface :=
InterfaceAdaptsTo AvailableViewportOrDevice;
ResponsiveLayout MAY_CHANGE {
ComponentSize,
ComponentPosition,
NavigationPattern
};
TaskFunctionality SHOULD_REMAIN AvailableAcrossSupportedLayouts;
# ---------- VISUAL HIERARCHY ----------
VisualHierarchy :=
ArrangementCommunicatingRelativeImportance;
VisualHierarchy MAY_USE {
Size,
Position,
Spacing,
Typography,
Contrast
};
# ---------- CONSISTENCY ----------
UIConsistency :=
SimilarComponentsAndActionsFollowStablePatterns;
Consistency SUPPORTS {
Predictability,
Learnability,
Efficiency
};
# ---------- AFFORDANCE ----------
Affordance :=
PossibleActionOfferedByComponent;
Signifier :=
PerceivableCueIndicatingAction;
ClearSignifier SUPPORTS Discoverability;
# ---------- ACCESSIBILITY ----------
UIAccessibility MAY_REQUIRE {
SemanticStructure,
KeyboardAccess,
TextAlternatives,
SufficientContrast,
VisibleFocus,
FormLabels,
ErrorIdentification,
AssistiveTechnologyCompatibility
};
AccessibleName IDENTIFIES InteractiveElementToAssistiveTechnology;
# ---------- ARIA / SEMANTICS ----------
SemanticRole :=
MeaningOfInterfaceElement;
NativeSemanticElement SHOULD_BE PreferredWhereAppropriate;
ARIA MAY_SUPPLEMENT SemanticsWhenNeeded;
ARIA SHOULD_NOT_REPLACE CorrectNativeSemanticsWithoutReason;
# ---------- COLOUR / CONTRAST ----------
Contrast :=
VisualDifferenceBetweenForegroundAndBackground;
Information SHOULD_NOT_DEPEND_ONLY_ON ColourWhereAlternativeCueNeeded;
# ---------- TEXT ALTERNATIVE ----------
NonTextContent MAY_REQUIRE TextAlternative;
TextAlternative COMMUNICATES PurposeOrMeaningOfRelevantNonTextContent;
# ---------- TOUCH ----------
TouchTarget :=
InteractiveAreaActivatedByTouch;
TouchTarget SHOULD_BE SufficientlyUsableForIntendedUsers;
Spacing MAY_REDUCE AccidentalActivation;
# ---------- USER CONTROL ----------
UserControl MAY_INCLUDE {
Undo,
Cancel,
Back,
Edit,
Confirm
};
UserControl SUPPORTS ErrorRecovery;
# ---------- CONFIRMATION ----------
DestructiveAction MAY_REQUIRE ConfirmationOrRecoverability;
IF ActionHighImpactAndHardToReverse
THEN ConfirmationRequirement := increase;
# ---------- LOADING ----------
LoadingState :=
SystemProcessingBeforeResultAvailable;
LoadingIndicator COMMUNICATES ProgressOrActivity;
IF WaitLong
THEN ProgressInformation MAY_IMPROVE UserUnderstanding;
# ---------- EMPTY STATE ----------
EmptyState :=
InterfaceStateWithNoCurrentContentOrResults;
EmptyState SHOULD_EXPLAIN ContextAndPossibleNextActionWhereRelevant;
# ---------- DESIGN SYSTEM ----------
DesignSystem :=
SharedSetOf {
Components,
Patterns,
Tokens,
Guidelines
};
DesignSystem SUPPORTS InterfaceConsistencyAndReuse;
# ---------- PROTOTYPE ----------
UIPrototype :=
RepresentationOfProposedInterface;
Prototype MAY_BE {
Wireframe,
Mockup,
InteractivePrototype
};
Prototype SUPPORTS EvaluationBeforeImplementation;
# ---------- USABILITY TEST ----------
UIUsabilityTest :=
User
-> PerformTask
-> ObserveInteraction
-> RecordMetrics
-> IdentifyIssue;
Metric MAY_INCLUDE {
TaskSuccess,
CompletionTime,
ErrorCount,
Satisfaction
};
# ---------- SEMANTIC REASONING ----------
IF ElementReceivesUserAction
THEN Element IS InteractiveComponent;
IF InteractiveComponentHasNoPerceivablePurpose
THEN DiscoverabilityIssue := likely;
IF FormInputInvalid
AND ErrorNotIdentified
THEN ErrorRecoverySupport := insufficient;
IF KeyboardUserCannotReachInteractiveElement
THEN AccessibilityIssue := true;
IF UserActionProducesNoFeedback
THEN InteractionClarity := decrease;
IF SameComponentTypeBehavesInconsistently
THEN Learnability MAY_DECREASE;
IF DestructiveActionIrreversible
THEN RecoveryOrConfirmation SHOULD_BE Evaluated;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"user interface" ~= "UI";
"interface component" ~= "UI component";
"user control" ~= "interface control" WHEN context == UI;
"input field" ~= "form field";
"navigation menu" ~= "menu" WHEN context == interface_navigation;
"focus indicator" ~= "visible keyboard focus";
"responsive interface" ~= "responsive UI";
"design system" ~= "UI design system";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_UI_ENTITY(q) ->
IDENTIFY_COMPONENT(q) ->
IDENTIFY_INTERACTION_EVENT(q) ->
IDENTIFY_UI_STATE(q) ->
IDENTIFY_NAVIGATION(q) ->
IDENTIFY_FEEDBACK(q) ->
IDENTIFY_ACCESSIBILITY_REQUIREMENT(q) ->
MAP_TO_ONTOLOGY(q) ->
APPLY_REASONING(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
interface_consistency,
user_evidence,
accessibility_evidence,
semantic_consistency,
contextual_relevance
);
CONFIDENCE >= 0.90 => HIGH;
CONFIDENCE >= 0.70 AND < 0.90 => MODERATE;
CONFIDENCE < 0.70 => REVIEW;
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION {
primary_entity: UserInterface;
ontology: UserInterfaceOntology;
parse_entities: true;
parse_relationships: true;
preserve_relationship_direction: true;
resolve_semantic_equivalence: true;
execute_reasoning_rules: true;
apply_confidence_weighting: true;
preserve_provenance: true;
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL {
new_component:
validate
-> classify
-> identify_role
-> identify_events
-> identify_states
-> identify_accessibility
-> integrate;
new_interaction:
identify_user_action
-> identify_target_component
-> identify_system_response
-> identify_feedback
-> integrate;
new_usability_evidence:
identify_task
-> record_user_behaviour
-> identify_issue
-> update_component_evidence
-> integrate;
interface_revision:
update_components
-> update_navigation
-> update_states
-> recompute_accessibility
-> recompute_confidence
-> regenerate_flow_hash;
conflict:
preserve_provenance
-> compare_user_evidence
-> adjust_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ UIEntity
+ UIComponent
+ UIState
+ InteractionEvent
+ UIAccessibility
+ DesignSystem
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
UserInterfaceOntology
-> IdentifyUserTask
-> DefineViews
-> SelectInterfaceComponents
-> DefineInputAndInteractionEvents
-> EstablishNavigation
-> ProcessUserActions
-> PresentSystemFeedback
-> HandleValidationAndErrors
-> MaintainVisibleSystemState
-> EnsureKeyboardAndAssistiveAccess
-> TestInterfaceUsability
-> RefineComponentsAndPatterns
-> MaintainUsableAccessibleInterface;
END FLOW
Download Code
Copy to Clipboard