Abstract
Activity Streams is a data format designed to describe activities. Although its specification is written in natural language, its core vocabulary is formally defined in an OWL (Web Ontology Language) ontology. In this work, we propose a set of additional OWL axioms to extend the existing ontology, with the goal of enabling more detailed, precise, and machine-interpretable descriptions of Activity Streams. This enhancement aims to support real-world applications, such as those related to automatic test generation from OWL specifications.
Introduction
Activity Streams, as described by Snell and Prodromou (2017a), is a data format for describing activities in a rich, human-friendly, yet machine-processable and extensible manner. It is specified as a JSON-LD serialization (Lanthaler & Gütl, 2012; Sporny et al., 2020) of the Activity Vocabulary (Snell & Prodromou, 2017b). As is common in many specifications, the Activity Vocabulary is defined in a natural language document that enumerates the classes and properties used to represent activities. In addition to this normative specification, a non-normative OWL (Web Ontology Language) ontology (W3C, 2017) is provided to formalize the vocabulary in a machine-interpretable way.
Adopting OWL for specifications is highly desirable, as it enables the reuse of the extensive tools and technologies developed by the Semantic Web community over the years. For instance, reasoning techniques—implemented in tools known as reasoners (Glimm et al., 2014; Sirin et al., 2007)—can be used to automatically detect logical inconsistencies that may be overlooked when specifications are written solely in natural language. Additionally, reasoning engines can infer implicit knowledge from Semantic Web knowledge bases. Finally, OWL classes and properties can be integrated into object-oriented software through Ontology-to-Object-Mapping frameworks, such as the JOPA software suite described by Ledvinka and Křemen (2015).
The more detailed the OWL definitions in the ontology, the more valuable the ontology becomes for software developers, analysts, researchers, and other stakeholders. Indeed, OWL expressive power can be leveraged to define domain entities and their relationships precisely, thereby clarifying their roles and intended use.
However, the current Activity Streams specification does not fully support these capabilities, due to the flat structure of its ontological model. Although several features are described informally in the natural language specification, they are not captured in the accompanying OWL ontology. Consequently, the format exhibits several ambiguities that have surfaced over time, as reflected in the errata currently under discussion (W3C ActivityStreams Working Group, 2025).
In this contribution, we propose an extension of Activity Streams that introduces additional axioms intended to formally capture aspects of the Activity Vocabulary, aimed at identifying and resolving existing ambiguities and inconsistencies.
Naturally, some of the proposed axioms may be disputable, as they necessarily reflect interpretations of natural-language descriptions. However, as shown in Section 4, the resulting reasoning capabilities enable a systematic assessment of the intended semantics of Activity Vocabulary items, by comparing inferred statements against an arbitrarily large collection of test scenarios. Along similar lines, one can generate automated tests in advance for Activity Streams—enabled software, covering an exhaustive range of scenarios in accordance with the test-driven development methodology presented by Beck (2003 - 2003) and illustrated in Section 5.
We adopt the Description Logic syntax (Baader et al., 2003) to represent classes, properties, and expressions, while property assertions are written in infix notation. When inline, property assertions latter may come enclosed in apices. To improve readability, we use distinct font styles for different types of Description Logic terms: C
The remainder of the article is organized as follows. Section 2 introduces the main concepts of Activity Streams. Section 3 presents the OWL encoding of the Activity Vocabulary. Section 4 proposes additional axioms for Activity Vocabulary terms and discusses the benefits of adopting them. Section 5 describes a case study on collections management, illustrating the advantages of the proposed extension. Finally, Section 6 concludes the article and outlines potential directions for future research.
Activity Streams
This section briefly summarizes the core concepts of the Activity Streams format, as defined by Snell and Prodromou (2017a, 2017b). All Activity Streams entities belong to the namespace https://www.w3.org/ns/activitystreams#, which is assumed to be the default namespace throughout the remainder of this article. The elements of Activity Streams are organized into a class hierarchy rooted in two top-level classes:
The Activity Vocabulary defines several subclasses of Collections, represented by the class The Activity Vocabulary provides two mechanisms for identifying collection members: the A collection object refers to its first and last pages using the Each page links back to its parent collection via the Activities, represented by the class Actors are entities capable of performing activities. The Activity Vocabulary provides five specific actor types:
Finally, the Activity Vocabulary includes an additional set of predefined objects and links, such as
The OWL Ontology for Activity Streams
This section analyses the OWL encoding of Activity Streams, as presented by W3C (2017). The ontology includes all classes and properties defined in the Activity Vocabulary, with the sole exception of the
As customary, the class hierarchy is expressed via subclass axioms. Some classes are further constrained by class restrictions. For example,
Domain and ranges are specified for all properties. In some cases, such as
Let us consider the class
Additional Axioms From the Activity Vocabulary
As mentioned above, the Activity Vocabulary provides textual descriptions for all Activity Streams classes and properties.
The SABiO methodology (Falbo, 2014) is adopted to elicit and formalize competency questions (Monfardini, 2023) for the Activity Vocabulary (Snell & Prodromou, 2017a, 2017b). The analysis is intentionally restricted to competency questions that can be directly derived from the normative descriptions provided in the Activity Vocabulary. For example, the Notes field associated with the class
On the basis of these competency questions, and assuming that the relevant classes and properties had already been identified by W3C (2017), we derived a corresponding set of OWL axioms, forming the reference ontology. For practical reasons, we removed one role-chain axiom from the reference ontology, thus obtaining the operational ontology. The axioms in the operational ontology are detailed in this section. The full set of competency questions, together with both the reference and the operational ontology and the examples discussed throughout the article, are available at Longo et al. (2025).
The conventions adopted for presenting and exemplifying these axioms are outlined next. The proposed axioms are grouped into tables, one for each category of items enumerated in the Activity Vocabulary. Each table is further organized into sections, separated by horizontal lines, each representing a set of axioms. Some sections consist of a single axiom, for example, the first section of Table 1. Others represent multiple axioms using a shorthand: each class and property on the left-hand side is related through the relation symbol shown in the central column (
Proposed Additional Axioms for Collections.
Proposed Additional Axioms for Collections.
Proposed Additional Axioms for Activities.
Most of the axioms we propose are existential restrictions of the form:
Axioms of the form (1) are not particularly informative for inferring implicit facts about named individuals. For example, when an automated agent processes a
Other axioms have instead concrete consequences in terms of inferred assertions about individuals. Examples illustrating both asserted property statements (solid arrows labeled with the role name) and inferred ones (dashed arrows) are provided throughout the section; see, for instance, Figure 1.

Page items are items of the parent collection.
In these examples, individuals labeled with
In some cases, consistency checking can be used to verify the compliance of items with the Activity Streams format. Such axioms are particularly valuable for developers, as they can be used to create test cases that check whether the objects produced by their applications conform to the model. Examples of inconsistent configurations are provided in Figures 5 to 7.
The proposed axioms are examined next, starting with those related to collections, listed in Table 1.
The axioms in Table 1 derive from the description of collections provided by Snell and Prodromou (2017a, 2017b) and recalled in Section 2. We model collection pages so that the members of a page are also members of its parent collection, as illustrated in Figure 1. Note that pages are themselves instances of

Collection pages may be themselves paged.
Naturally, the

The first, current, and last pages of a collection are parts of the collection.
The axiom


Non-compliant: The first page of a collection must have no predecessor.

Non-compliant: The last page of a collection must have no successor.

Not consistent:
We also propose axioms enforcing that the first page of a collection has no predecessor and the last page has no successor. Examples of non-compliant configurations violating these axioms are shown in Figures 5 and 6.
Next, we consider the additional axioms proposed for activities, summarized in Table 2.
Most axioms in Table 2 are of the form (1) and follow directly from the descriptions provided in the Notes field in Snell and Prodromou (2017b). For instance, many activities are described by statements of the form “Indicates that the actor is doing something with the
Finally, we consider predefined objects and links. Table 3 lists the additional axioms proposed for these items. As noted in Section 2, we introduce a single axiom for the class
Proposed Additional Axioms for Predefined Objects and Links.
We now present a case study focused on collections, illustrating how the additional axioms proposed in Section 4 can be practically applied in particular within the software development process of an application that uses Activity Streams.
Suppose an engineer is tasked with developing a collection management application that supports the following commands:
We assume that the input parameters
In this example, the engineer opts for an object-oriented implementation for efficiency reasons. The axioms proposed in this article enable the automatic generation of classes (in the object-oriented programming sense) corresponding to Activity Streams items.
The engineer then adopts the so-called Test-Driven development methodology, presented by Beck (2003 - 2003), which consists of writing tests in advance and using them to validate the produced software. In our setting, test cases submit a sequence of
Specifically, let
By leveraging the proposed Activity Streams extension, the engineer only needs to provide an exhaustive set of usage scenarios to automatically generate tests that verify the application’s compliance with the specification.
Such usage scenarios may also clarify situations that are not explicitly addressed in the Activity Streams specification. An example is shown in Figure 8, which depicts a collection

Two pages sharing an object.
In this article, we presented a set of additional axioms for the ontology by W3C (2017), aimed at providing a more complete and precise formalization of the Activity Streams format. We argue that these axioms can support both ontology-to-object-oriented code generation and the automated derivation of compliance tests for Activity Streams-based applications. Moreover, a detailed and exhaustive OWL encoding would enable the automatic detection of logical inconsistencies in novel extensions of the format. Nonetheless, several aspects of the specification remain to be formalized.
This work is preliminary and focuses on a limited extension of the Activity Streams core. As a next step, we plan to enrich the ontology by grounding its semantics in foundational ontologies such as UFO (Guizzardi 2005), DOLCE (Gangemi et al., 2002), and BFO (Arp et al., 2015). Such an alignment would provide a more precise semantic characterization of key concepts. For instance, the notion of activity could be endowed with a more rigorous semantics, with clearer ontological distinctions and more specific participant roles. This, in turn, would improve conceptual clarity and facilitate interoperability with other ontologies grounded in the same foundational frameworks.
The notion of Audience, described by Snell and Prodromou (2017b), and the semantics of undoing activities also go beyond what can be captured by merely encoding textual descriptions. Finally, certain concepts require clarification, such as the precise meaning of “owner” in the context of Audience, before they can be formally specified.
Footnotes
Acknowledgments
Daniele Francesco Santamaria acknowledges the Research Program PIAno di inCEntivi per la Ricerca di Ateneo 2020/2022—Linea di Intervento 3 “Starting Grant”—University of Catania.
Funding
The authors received no financial support for the research, authorship and/or publication of this article.
Declaration of Conflicting Interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
