Saturday, May 10, 2014

Names, Name Syntaxes, and Namespaces – A Survey

With apologies for the poor formatting, in the article's presentation within its style in the Blogger web service.

I've begun developing a small proof of concept, for a URI parser implementation …  in which each of the following concepts would be defined:
  • Names
    • Name: Identifier of an information resource, within an information service
    • Application: URI – applications in URI decoding, storage, and encoding
      • HTTP user agent implementation.
      • URI processing and handling, in defining a Resource desktop model
        • URI Schemes for practical resource reference 
        • Application architecture, ad hoc model:
          • URI query model
          • Resource proxy model
          • Resource presentation model
          • Bibliographical reference model
          • Literary publishing model
          • Archival research (practical, cf. national and local libraries, historic landmarks, historic narratives)
    • Application: Registration of UML named entities within a UML modeling system
      • Namespaces and names in the UML metamodel 
      • UML NamedElement metaclass, UML Namespace metaclass [UML Infrastructure Specification (UML 2.4.1) subclause 11.7, Namespaces Diagram]
    • Application: Registration of named objects, in repository services published by a CORBA Object Request Broker
      • Referencing CORBA 3.3 specification,  Part 1, Interfaces 
        • CORBA IRObject interface
          • Subclause 14.5.2, IRObject
        • Interfaces and Containers Within a CORBA Interface Repository (IR) (CORBA 3.3)
          • CORBA IR
            • Subclause 14.5.4, Container
            • Subclause 14.5.3, Contained
          • CCM ComponentIR
            • Subclause 14.6.1, ComponentIR::Container
        • Object Identifiers in CORBA Services
          • CORBA RepositoryId Interface
            • Subclause 14.7, RepositoryIds
            • Formal ReposiroryId Syntaxes
              • Identifier syntax: "IDL"
                • RepositoryId structure, from a perspective of IDL processing 
                  • IDL RepositoryId prefix part
                    • Subclause 14.7.5.2, The Prefix Pragma
                    • Subclause 14.7.1, IDL Format
                  • IDL RepositoryId version part
                    • Subclause 14.7.5.3 , The Version Pragma
                    • Syntax: "major.minor", each an unsigned CORBA short integer
                  • IDL RepositoryId name part
                    • IDL scoped name
                    • Subclause 14.7.1, IDL Format
                    • Subclause 7.20, Names and Scoping
              • Identifier syntax: "RMI"
                • Subclause 14.7.2, RMI Hashed Format
                • Java class name, hash code, optional version designator
              • Identifier syntax: "DCE"
                • Subclause 14.7.3, DCE UUID Format
              • Identifier syntax: "LOCAL"
                • Subclause 14.7.4, LOCAL Format
          • CORBA ObjectId interface 
        • CORBA Portable Object Adapter (POA)
          • Specification subclause 15.3.9, POA Interface
            • Subclause 15.3.9.18,  create_reference
            • Subclause 15.3.9.19,  create_reference_with_id
          • Specification subclause 15.2.4, Reference Creation
  • Name Syntax 
    • Subset: URI syntax 
      • URI as meta-syntax
      • One URI syntax per each URI scheme
      • URI Scheme registry: IANA – Assigned URI Schemes
      • Highlighting:
        • The "urn" URI scheme
          • The "urn" URI scheme as a meta-syntactic subset within URI meta-syntax
          • Implementing URN namespace syntaxes as registered in the IANA URN namespace scheme registry
        • Hieracrhical and "flat" name syntaxes
          • Hierarchical name syntax implementation 
            • e.g. An http, https, ftp, or file URI interpreted in a service context
          • "Flat" name syntax implementation 
            • e.g DNS URI [RFC4501]
            • any URI, in a context in which the URI is interpreted as an XML namespace [XMLNames]
              • Given a URI interpreted exclusively in an XML namespace context, the URI's structure is not applicably relevant for the URI's interpretation as denoting an XML namespace
                • URI schema, URI syntax, URI escaping: Beyond the scope of URI interpretated as XML Namespaces
        • Application Concept: Given a textual URI, O, Initialize an URI object N of Syntax A and a metaclass M, such that a N will be an object of type M, and M may be located by the syntax A, within a single names implementation 
          • URI syntax provides that the schema of any absolute URI shall be denoted in the URI. The URI scheme S of URI O may therefore be determined from O, and the metaclass M located, with S applied onto a discrete index of URI scheme implementations.
          • Once the metaclass M is located, then M be used to initialize an standard object N, using CL:ALLOCATE-INSTANCE
          • Once the standard object is initialized, then N may be used for method dispatching, in a manner of iteratively consuming O for initializing N
            • The application may observe, furthermore, that Common Lisp indirect arrays may be used as to effectively initialize N without necessarily creating "new" native string objects in parsing the text string, O – thus, ostensibly minimizing system RAM usage in URI decoding,
          • This methodology may serve to allow an application to dispatch methods onto N, for purpose of decoding O as A, in initializing object structural components A'1…A'n 
            • e.g A'1…A'n for an HTTP URI [RFC3986]
              • A'1: network host name (i.e DNS domain name or network host address)
              • A'2: Network service port
              • A'3: Service user name in HTTP URI
                • DEPRECATED: Plaintext password in URI userinfo subset)
              • A'4: URI "directory path" elements 
                • i.e. URI path subset to last forward slash
                • Represent as null if path is zero-length
                • To do: Define semantics of not using NULL as a slot value type.
                  • Within an application of CLOS:
                    (WITH-SLOT-VALUE (VALUE OBJ SL) 
                         (BEHAVIOR-IF-SLOT-BOUNDP (THE* (SLOT-DEFINITION-TYPE SL) VALUE))
                         (BEHAVIOR-IF-NOT-SLOT-BOUNDP OBJ))
                  • Compiler optimization onto slot value types
                    • Applicable only if a class' definition will not change throughout the Lisp host runtime session (i.e TO DO: Define MOP intransient class extension) and 
                    • Applicable only when a class' definition is available to the compiler, as a finalized class definition 
                    • May be implemented via a compiler macro, such as would be defined as to compute the slot value type of any specific slot of any finalized, intransient class, in such as may allow for further optimization by the compiler. 
              • A'5: URI "file part" element 
                • i.e. URI path subset following last forward slash and preceding anchor or query subsets
              • A'6: URI "anchor"
              • A'7: HTTP URI (HTTP GET) query elements – (OR NULL (SIMPLE-ARRAY (CONS STRING(OR STRING NULL)) * )
  • Name Syntaxes and Namespaces
    • Concept: A namespace as representing a container for names of a single name syntax
      • Applications onto URI meta-syntax
        • One name syntax per each URI scheme
        • One name syntax per each each URN namespace
        • One name syntax per each Info URI info scheme
      • Applications onto UML, MOF, SysML
        • One name syntax
        • Arbitrary number of names and namespaces, within each model
      • Applications onto CORBA
        • RepositoryId format "IDL" as effective name syntax
      • Applications onto XML
        • One XMLNS namespace per XML element node. Contents: Namespace prefix, URI bindings. Should be indexed on URI prefixes (element, namespace assignment) and namespace URI (namespace prefix initialization)
        • Namespace equivalence : Dependent on Namespace URI content, not dependent on URI structure.
        • Namespace URI may be referenced by way of namespace prefix
        • Similar behavior for entity naming in RDF, OWL
        • Namespace inheritance (XMLNS)
        • Duration/Lifecycle: Each XML infoset's XMLNS namespace(s) may be mem-freed via scheduled GC, after the root XML document node and subnodes are no longer needed for presentation or other infoset processing, and not referenced from within any single names index.