AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
KIRETH RESEARCH — SEMANTIC LIBRARY
URL ONTOLOGY — FLOW ALGEBRA v1.0
Category: Computational Entities > Internet Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/internet-entities/url-ontology.html
Prepared: 11 November 2026
Status: Constructed topic-level mapping; not a verified transcription of the webpage.
1. PURPOSE
Represent a Uniform Resource Locator (URL) as a structured reference that identifies a resource and specifies a means of accessing it. Model parsing, normalisation, resolution, validation, retrieval and provenance without confusing a URL with the resource itself.
2. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: observed URL string, base URL, application context and retrieval state.
R_t: URI/URL parsing, relative-reference resolution and protocol rules.
B_t: scheme allowlist, security policy, resource budgets and validity constraints.
K_t: known origins, redirects, DNS information, prior responses and provenance.
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, observation_(t+1))
The ranking expression is a decision abstraction; it does not prescribe a particular probabilistic implementation.
3. ENTITY MODEL
URL: identifier string and parsed components.
Scheme: access scheme, e.g. https.
Authority: optional user information, host and port, as permitted by scheme.
Host: registered domain, IP literal or other scheme-specific host.
Path: hierarchical or scheme-specific path component.
Query: optional parameter string; interpretation is application-specific.
Fragment: optional client-side or representation-level identifier; not sent in an HTTP request target.
Base URL: context for resolving relative references.
Origin: scheme, host and effective port for applicable web URLs.
Resource: target concept referenced by a URL; may vary by time, negotiation or authorisation.
Representation: returned bytes and metadata, potentially one of several for the resource.
Response: status, headers, body, timing and error observations.
4. RELATIONSHIP GRAPH
URL --HAS_SCHEME--> Scheme
URL --HAS_AUTHORITY--> Authority
Authority --HAS_HOST--> Host
Authority --HAS_PORT--> Port
URL --HAS_PATH--> Path
URL --HAS_QUERY--> Query
URL --HAS_FRAGMENT--> Fragment
RelativeReference --RESOLVES_AGAINST--> BaseURL
URL --MAY_IDENTIFY--> Resource
Resource --MAY_PRODUCE--> Representation
HTTPResponse --REPORTS_ON--> RetrievalAttempt
URL --MAY_REDIRECT_TO--> URL
5. CORE FLOW PATHWAYS
FLOW A — PARSE
Input: URL text and optional base.
Steps: preserve original input; parse according to the chosen standard; identify scheme, authority, path, query and fragment; record parsing failures.
Output: parsed URL object or explicit error.
FLOW B — RESOLVE RELATIVE REFERENCE
Input: base URL plus relative reference.
Steps: apply reference resolution rules; merge paths where appropriate; remove dot segments per standard; preserve query/fragment semantics.
Output: resolved absolute reference or error.
FLOW C — VALIDATE AND AUTHORISE
Input: parsed URL and application policy.
Steps: check allowed scheme; validate syntax and host requirements; apply credential, port and destination restrictions; check DNS and resolved IP against network-access policy where relevant.
Output: allowed, rejected or indeterminate with reason.
FLOW D — RETRIEVE RESOURCE
Input: authorised HTTP(S) URL.
Steps: exclude fragment from HTTP request target; resolve host as needed; establish transport and TLS where required; send request; process status, headers and bounded body; apply redirect policy at every hop.
Output: representation, metadata or typed failure.
FLOW E — CANONICALISE FOR COMPARISON
Input: two URL strings and a stated equivalence policy.
Steps: normalise only standards-safe aspects; compare scheme/host case-insensitively where applicable; account for default ports; preserve potentially significant path, query and fragment distinctions.
Output: equivalent, different or unknown under named policy.
Note: generic removal/reordering of query parameters, trailing slashes or percent-encoding changes can alter meaning.
6. INFERENCE RULES
IF scheme is absent AND base is supplied THEN attempt relative resolution.
IF scheme is not authorised THEN reject before retrieval.
IF URL fragment differs THEN the network resource request may still be identical, but client interpretation may differ.
IF host changes during a redirect THEN re-evaluate destination security policy.
IF HTTP status is a redirect AND hop budget remains THEN resolve Location against current URL and continue only if permitted.
IF DNS or resource retrieval fails THEN preserve URL validity as a separate question from current reachability.
IF two URLs differ only by host letter case THEN host comparison may be equivalent for DNS-based HTTP(S) hosts.
IF query parameters differ THEN do not assume semantic equivalence.
7. MINI RECURSION ENGINE
function resolve_and_fetch(url, policy, visited, hops_remaining):
parsed = parse(url)
if parse_failed(parsed): return ERROR_INVALID_URL
if not permitted(parsed, policy): return ERROR_POLICY
key = normalised_request_key(parsed)
if key in visited: return ERROR_REDIRECT_LOOP
if hops_remaining < 0: return ERROR_REDIRECT_LIMIT
visited.add(key)
result = bounded_fetch(parsed, policy)
if result.is_redirect:
next_url = resolve_reference(parsed, result.location)
return resolve_and_fetch(next_url, policy, visited, hops_remaining - 1)
return result
Termination: finite redirect-hop budget and loop detection. Network timeouts and byte limits are separate mandatory controls.
8. INVARIANTS, BOUNDARIES AND GUARANTEES
- A syntactically valid URL does not guarantee that a resource exists or is reachable.
- A URL is not interchangeable with an IP address, domain name or downloaded document.
- HTTPS authentication depends on successful certificate and connection validation, not merely an https prefix.
- Percent-encoded characters must be handled according to component-specific rules.
- Internationalised domain names require careful IDNA handling; Unicode display forms and DNS wire forms are distinct.
- SSRF defences must account for redirects, DNS rebinding, private/link-local addresses and alternative address forms.
- A bounded algorithm guarantees termination of its own redirect traversal, not successful retrieval or global network availability.
9. SEMANTIC EQUIVALENCE
Distinguish string equality, parsed-component equality, origin equality, HTTP request-target equality, and application-level resource equivalence. These are different relations. Canonical URLs declared by a publisher are hints, not proof that two representations are identical.
10. EXAMPLE EXECUTION TRACE
Input base: https://example.org/articles/index.html
Reference: ../guides/start.html?lang=en#intro
Resolve: https://example.org/guides/start.html?lang=en#intro
Parse: scheme=https; host=example.org; path=/guides/start.html; query=lang=en; fragment=intro.
Authorise: scheme and destination checked against policy.
Retrieve: request /guides/start.html?lang=en; fragment #intro is not transmitted as part of the HTTP request target.
Result: response or typed error; no availability asserted by this example.
11. PROVENANCE AND CITATION
Ontology topic: URL Ontology
Source: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/internet-entities/url-ontology.html
Mapping: Flow Algebra v1.0 — constructed conceptual interpretation.
Authors credited: Mark Anthony Higgins — Sky Recursive AI.
Licence and reuse: refer to the applicable Kireth Research Open Research Licence and retain required attribution.