<<

Theoretical foundations of natural language programming and publishing for intelligent agents and robots

Sandor M Veres

Abstract— This paper is an application of ontology the- (2) Users of the autonomous vehicle/robot will clearly ory, conceptual graphs and programming language theories understand how it operates and will also know its limitations to develop the theoretical foundations of natural language to avoid misuse or misunderstanding. Users can modify programming (NLP) that has in recent years been used to produce natural language documents for intelligent agents and English sentences in the controlling document to influence human readers. The analysis given reveals three benefits of the vehicles behaviour or how its skills are performed. Also NLP. First, it is “conceptualized” programming that enables the legal responsibility for misuse can be shifted to the user. developers to write less bug prone programs due to clarity of (3) The use of sEnglish provides the rational agent, code presentation and enforced structuring of data. Secondly, controlling a vehicle or robot, with abstractions that it can NLP can aid programming of the all important abstractions for robots: event, action and world model abstractions can be use in reasoning. created by sentences. Thirdly, NLP can be used to publish nat- (4) The abstractions of sensing and actions through ural language documents by researchers, i.e. sEnglish can provide a hiearchical abstraction system that documents on control theory and procedures, on the Internet or can allow the formal verification of the hybrid system of in printed documents. This theoretical paper also defines a large robot/environment interactions. class of intelligent agents that can read such documents. This enables human users and agents to have shared understanding (5) There are also consequences for team based computer of how application systems work. programming. [2] studies hierarchical abstractions for soft- Index Terms— Computer programming, intelligent physical ware systems. The need of supporting knowledge collabora- agents, robots, conceptual graphs, machine knowledge. tion, in software development environments, is highlighted in [3], based on the conceptualization of software development I. INTRODUCTION as knowledge-intensive and distributed cognitive activity. This principle is extended in [1] for the context of shared The paper presents the theoretical background to an in- knowledge and collaboration between human users, i.e. sci- formation processing system for autonomously operating entists, engineers, and machines or intelligent agents. [1] robotic agents where engineers can use natural language defines natural language programming (NLP) and uses it programming (NLP,[1]) in sEnglish documents to define their to link software code with concepts from an ontology via behaviour. After their operational launch, the agents can sentences. read new published documents to acquire knowledge such Since publishing of the book [1], that introduced the as various physical skills, facts about the environment, be- meaning of NLP and its societal/technological context, it haviour policies and also goal priorities. The NLP documents has found applications in a number of areas. The paper [4] concerned are similar to engineering booklets with contents, contained the description of an, at the time new, sliding mode sections, subsections in English, that can appear in HTML, controller for a 6DOF holonomic control of a satellite that LaTex(pdf) formats (see numerous examples at www.system- allows precise position and attitude control, with thrusters english.com). Although sEnglish has been in use for some only, within a satellite cluster in formation for interferometry. time this is the first paper providing a theoretical background The control scheme has been fully defined using NLP and to it. an sEnglish paper, that publishes the control scheme in a Use of NLP documents have various impacts on robot webpage on the world wide web, is available at www.system- programming: english.com and [5]. (1) sEnglish documents can shorten the route to robotic [6] illustrated another application of NLP for system software update. There is no need for an application engineer verification of autonomous underwater vehicles (AUV) by to read a journal publication and implement it by pro- model checking. Here NLP, in the form of an sEnglish gramming. The research engineers methodological work is documents, defined abstractions for the events and control directly utilized by the autonomous vehicle or robot reading operations of subsystems of an AUV. These abstractions NLP documents. Other engineers can also read the published were first compiled into SateflowTM and ISPL [7], [8], the papers and learn the details of how the vehicle operates, how interpretation language for the Multi-Agent Model Checker decisions are reached and how skills are performed. (MCMAS) used for system verification of the AUV in [9]. The publication [10] reported about the use of sEn- This work has been partially supported by EPSRC Grants No. glish/NLP for describing all the control operations of an EP/E02677X/1 and No. EP/F037570/1. S M Veres is with the School of Engineering Sciences, Southampton, experimental autonomous ground vehicle (AGV) so that the Highfield, SO17 1BJ, UK, Email: [email protected] manual equalled the program of the vehicle. The sEnglish document that was the program of the AGV, contained Fort his a complete software system is available: sections on initialisation of the hardware, preparations for a (1) authoring tool (sEAT) of sEnglish human/machine mission, sensor systems operations, collision avoidance and readable documents [12]; realtime replanning of path while the vehicle was moving (2) sEnglish reader agent (sERA) [13] as an IPA; in a model urban environment. The sEnglish document (3) programming environment to create autonomous controlling the AGV and video are available at [5]. agents that can read the sEnglish documents [14]. [11] reviewed the area of decision making in autonomous In this paper we fit NLP into the theoretical abstraction vehicle systems and concluded that there is a technological layers of programming as described in [3]. NLP is accom- gap between sensing devices and intelligent agent program- panied by simultaneous human and machine interpretation ming through logic that handles a discrete world. The transi- of NLP sentences. Code inambiguity of NLP sentences tion from sensing to discretisation of events, skills, actions, preserves the cornerstone of digital computing: the usefulness plans and world models are underdeveloped. It is identified of digital computation largely orginates from its determin- that sEnglish/NLP can play a crucial role in filling this ism, i.e. its reliability in banking, accounting and computer technological gap between sensing and cognition. control of aircraft, machines and robots, etc. [12] is a software environment in which authors can create This paper is organized as follows. The next section sEnglish documents in NLP and publish them on the web or provides definitions of ontologies. This is followed by a a local network in a factory or offices. The sEnglish reader model of human thinking in terms of conceptual graphs. agent [13] provides the client end of the authoring tools Section IV introduces the NLP document and Section V that anyone can use to read the sEnglish documents and provides illustrations. Section VI briefly discusses levels of use its sentences to invoke control actions on her/his PC abstractions for sentences. Section VII is concerned with or application device. In this role the reader agent acts like procedural knowledge sharing among a set of agents. Shared an intelligent personal assistant (IPA). knowledge description is concluded with the involvement The Cognitive Agent Toolbox [14] (CAT), extends the of the human operator of the agents that is followed by usefulness of [13] from the role of a IPA to that of an conclusions. Note however that this is a paper about the autonomous agent that can control a vehicle, manufacturing theory, application examples can be found elsewhere as listed machine or an appliance. CAT is based on the use of sEn- in the references. glish/Jason(AgentSpeak) in a MATLAB/Java environment. This application of sEnglish clarifies the actual role of II. FUNDAMENTALS sEnglish and natural language programming: it is not a new agent programming language to compete with robot A natural language program document (NLPD) consists of programming languages, it is a conceptualisation tool of three components: an ontology, a set of templates programming that can be used in association with high and an underlying instructional (imperative) programming level programming languages to associate programming steps language. The process of creating and making NLPDs is with human concepts and build up a hybrid automaton that described in a flow diagram in Figure 1. An expert author easily lends itself to formal verification and to support legal of an algorithmic field (for instance in subfields of signal certification for safety [6], [9]. processing, control, science and logic inference) produces [15] reports on the applicability of sEnglish in the space an ontology and provides hierarchical definitions of sentence technologies where rational agent programming is comple- meanings using a programming language for low abstraction mented with external calls to sEnglish sentences that define level . The sentence meanings, ontology definitions the well structured connections to sensing and control pro- and meta sentences to define the area composed cesses. sEnglish documents, that are NLP routine libraries, into an HMTL document by a document creator algorithm. can also contain equations, figures, images, quotes, numbers, Some of the web pages of this document are illustrated in physical quantities that humans can read as technical papers Figures 2,3. The NLPD is utilized either by engineers who and can also be read by suitable rational agents. A number can read the document and borrow from it algorithm for their of these documents can be found at [5] . own work, or by an intelligent agent, typically controlling a Publications for autonomous systems is a logical next step vehicle, machine, appliance or a robot in general. Machines of information systems in a historical perspective [1]: reading publications directly can shorten the route how (a) There was first verbal communication between people. results are made useful in intelligent machines - there are (b) Writing was developed to record events and knowledge no upgrades needed by engineers. The agents seek out their manually for top layers in society. knowledge themselves. This section will first provide formal (c) Printed book was invented, multiple copies of written definitions for the ontologies used and also for the relation- material could reach masses of people. ship with the underlying programming language. Next formal (d) Journals, newspapers and the WWW has been used to definitions of human interpretations are given in terms of distribute information and knowledge. conceptual graphs. Finally NLP documents are defined and (e) This paper reports about foundation steps of a system illustrated. of publishing for autonomous machines, the next revolution- First a formal definition of a traditional ontology is ary step in information technology. provided here that is short of using the description logic (DL,OWL, see W3C.org) framework as that will not strictly basic type in N, as given in the following definition. be required for natural language programming. Definition 2.3: Let N = hBN ,LN ,DN ,HN ,PNi be an in- Definition 2.1: An agent’s modelling ontology is a de- structional computer language that has a set of variable types scription logic MDL = {Γ,R,=,,I,∪,∩,¬,∃,∀} with atomic BN . An ontology O=hΓ| ≺ |@|Λi is said to be supported by classes Γ, roles R so that they satisfy the following axioms: N if BN ⊂ Γ and ∀ξ ∈ Γ ∃ζ ∈ BN : ξ ≺ ζ. (a) Subclass relationship A ⊃ B is defined by A ∪ B = B. An ontology O supported by a programming language N (b) There are atomic classes perceived , imagined will often be indexed as ON to express this relationship. object, mathematical object that are disjoint and satisfy For instance if the underlying programming language is modelling object = ( perceived object ∪ imagined object MATLAB, we will use the notation OM, if it is C or C++, ∪ mathematical object ) then we can use Oc or Ocpp, respectively. Next a possible (c) There is an atomic role has attribute. relationship of an ontology ON to conceptual graphs (CG) In NLP the individuals created from classes of O will will be described. become examples of human concepts as represented on a digital computer. To achieve this the O will be linked to some III. CONCEPTUALGRAPHSOFHUMANTHINKING (popular) imperative programming language: the ontology O Formalizing human thinking will not be attempted here, is required to have a subset of classes that are classes in the CGs will be used instead to represent human thought as programming language and any class in O are subclasses it is generally accepted [16], [17] that CGs are powerful of some basic types (classes) in the programming language. representations of human thought. For completeness a simple This will be formally described as follows. First we restrict and general enough definition of conceptual graphs will be the definition of an ontology that NLP will use. provided here. Definition 2.2: A restricted ontology O=hΓ |≺| @|Λi Definition 3.1: Let C and R be sets of classes from two Γ Γ consists of a lattice h |≺i over the class set , an attribute disjoint ontologies Oc and Or respectively. A basic con- Λ Γ Γ(Λ) label set and an attribute mapping @: → 2 where ceptual graph G = hGv,Ge,Lvi is a vertex-labelled directed- Γ(Λ):Λ → Γ is a mapping from the attribute label set to bigraph that satisfies the following conditions: the class set Γ . The class set has a universal sup-class ξ0 (a) the vertices Gv are decomposed into two sets of concepts that is the modelling object so that ∀ξ ∈ Γ: ξ ≺ ξ0 and a C and conceptual relations R so that Gv = C ∪ R; universal sub model class ξ∞ such that ∀ξ ∈ Γ: ξ∞ ≺ ξ . (b) the directed edges of G occur in pairs so that Ge ⊂ The @ is also required to satisfy the inheritance condition C × R ×C. ∀ξ ,ζ ∈ Γ: ξ ≺ ζ ⇒ @(ξ ) ⊇ @(ζ) . (c) Vertices Gv are labelled by a referent function Lv : Gv → R where R contains of existential, individual, set, universal and question labels as listed in Table 1.

Author ’s understanding of The set of basic conceptual graphs is denoted by Bcg(Oc,Or).

systems, natural language Ξ Basic conceptual graphs G Referent Formats Examples Existential [con: *] DOG:*

Modelling ontology M DL of agents unique ex. [con: @1] DOG:@1 anaphoric [con: #] DOG:# Restricted ontology O NLP document D Individual [con: # num] DOG:453 [con: name] DOG:Vak Sentence based Set [con: {i1,..,in}] DOG:{Vak,Spot} Programming language N definitions generic [con: {*}] DOG:{*} counted set [con: {*}@num] DOG:{*}@4 anaph. set [con: {*}#] DOG:{*}# Autonomou s Webpage Universal [con: ∀] DOG:∀ Interpreter agent negative [con: ∀¬] DOG:∀¬ agent set [con: {*}∀] DOG:{*}∀ f uzzy set [con: {*}@many] DOG:{*}@many Question [con: ?] DOG:? Reader ’s understanding and plural [con: {*}?] DOG:{*} usage of capabilities TABLE I DEFINITIONSOFREFERENTTYPESIN R. con STANDS FOR concept THAT IS AN ENTRY FROM O AND num STANDS FOR number THAT IS A Fig. 1. Flow diagram of NLP document creation and usage. v NONNEGATIVE INTEGER.THE Lv MAPS A concept IN Ov TO ON OF THE LABELS IN COLUMN 2 OF THIS TABLE. Let N = hB,L,D,H,Pi be an instructional (imperative) programming language (can be either object oriented or not) that has a set of basic types B, a set L of syntactically Some basic CGs are based on perception of the sur- correct sets of instructions, declarations D, subroutines H rounding physical world and are direct abstractions from and programs P. The ontology O is required to be such that perception processes of an agent. Other basic CGs can any class of O is a subclass of a type (class) in B, i.e. of a be obtained through communication by other agents or by operations on conceptual graphs the agent has in memory. IV. NLP DOCUMENTS Classical work [16] on CG defined four basic operations on conceptual graphs to obtain new ones: (1) copying, i.e. In the following an NLP text is understood as a sequence creating and identical copy; (2) restricting a CG where con- of ASCII characters. A word is a sequence of characters cepts are replaced by conceptual subclasses or by individual without space. A proper name is a word starting with a markers; (3) joining where identical concepts of individuals capital letter but not all words starting with capital letters are used in two graphs to create a third one that shares the are proper names, for instance all sentences start with capital individuals and keeps all other relations from the two graphs. letters. (4) simplifying, that means removing duplicate conceptual Definition 4.1: Let Ξ be a natural language with word set Ξ relations from a graph. w. A word is a sequence of characters without space. A proper name is a single word that starts with a capital letter. Basic conceptual graphs are timeless and do not contain An NLP class name is a finite sequence of words from Ξ . references to the context how the “thought” was generated, w An attribute name is a finite sequence of words from Ξ . e.g. communication, belief, desire or whether it occurred in w the past or will be valid in the future. These modalities are 1) An ontology O is called Ξ compliant if all of its class clearly important for human and also for artificial agents such names and attributes are finite sequences from Ξw. as the belief-desire-intention agents. Context boxes [16], [17] 2) An NLP sentence is a sequence of words that starts are used to represent negation, modality and propositional with an initial capital and ends with ., ! or ?. A sentence attitudes like “know” or “believe” and indirect speech. Con- may contain proper names, class names and attribute ceptual graphs have been extended by agent’s perspectives names as sub-sequences of the sentence. The set of and temporal localization [18] where agent’s perspectives all feasible, but not necessarily plausible, sentences is and temporal localizations are also described. Using these named S¯(Ξ,O,S). references we provide a sufficiently general definition of 3) An NLP text is a finite sequence of NLP sentences. compound conceptual graphs (CCGs) to provide background The set of all feasible, but not necessarily plausible, for the concepts of natural language programming. sentences is named X¯ (Ξ,O,S). This definition with minimalist conditions sets constrains to Definition 3.2: Let Oc and Or be two disjoint ontologies for concepts and conceptual relations with associated basic form words and on sequences of words to form sentences and NLP text. The semantics of NLP meanings is however conceptual graphs Bcg(Oc,Or). The set of compound con- defined in terms of a broader data set to reflect context ceptual graphs Ccg(Oc,Or) is the smallest set that satisfies the following conditions: sensitivity of meanings. Semantics will be defined in terms of procedures run on a digital computer with input-output (a) Bcg(Oc,Or) ⊆ Ccg(Oc,Or). devices such as sensors and actuators. (b) Let Tl be a set of temporal labels. For any x ∈ Tl, g ∈ To secure conceptual graph correspondence for each sen- Ccg(Oc,Or) also T (x,g) ∈ Ccg(Oc,Or). tence s ∈ S defined by m, we also need a conceptual (c) Let Tr be a set of temporal relation labels on the description function as defined. real time-line. For any x ∈ Tr, G,H ∈ Ccg(Oc,Or) also Definition 4.2: For each s ∈ S the conceptual description T(G,x,H) ∈ Ccg(Oc,Or). d(s) ∈ X¯ (Ξ,O,S) is a formalized NLP text description. (d) Let Al be a set of agent aspect labels. For any x ∈ While we are not going into the details of an algorithm Al , G ∈ Ccg(Oc,Or) also A(x,G) ∈ Ccg(Oc,Or). The that parses NLP sentences to obtain conceptual graphs, we set of A-enveloped aspect graphs will be denoted by are making the following assumption. A O ,O C O ,O . ( c r) ⊂ cg( c r) Assumption 4.1: There is conceptual resolvent function (e) Let G ∈ C (O ,O ) and c a concept in G. The com- cg c r F : X¯ (Ξ,O,S) → B (O ,O ) that uniquely identifies a pound graph G0 obtained from G by replacing all CG cg c r g(s) = FCG(d(s),s) ∈ Bcg(Oc,Or) in terms of a CG with occurrences of c by a A ∈ A(Oc,Or) is also a compound 0 referenced vertices belonging to conceptual classes in O and graph: G ∈ Ccg(Oc,Or). conceptual relations in Or as permitted by Bcg(Oc,Or) of Large parts of human knowledge can be modelled by sets ∈ HKB. of conceptual graphs (CGs) that can also have modalities of For any set S the notation S∗ will be used for the set of time, perception and communication, etc. its sub-sequences. Here we will aim to formalise human thought processes Definition 4.3: Let N be a computer programming lan- but make the following assumption. guage with syntactically correct code set LN and let O be Ξ Assumption 3.1: Human knowledge base HKB = {Gi | i ∈ an ontology compliant with natural language . A meaning ∗ J} about the present and the past of the world is represented function m : S → S ∪ LN ∪{/0} maps any sentence to a by a time varying set of conceptual graphs with abstraction sequence of sentences or to a code in LN or to the empty modalities of time, intention, desirability, likelihood and set to express that there is no meaning . An interpreter is a communication. tuple I = hS,m,LN i. An interpreter I is called semantically Now we come to the definition of a NLP text that are related complete if there is a translator T : S → LN so that to CGs. 1) For all s ∈ S the m(s) 6= /0. 2) T (m(s)) = concatenation(T(s1), T (s2), ... T(sk)) if m(s)= {s1, s2, ... sk} Practically useful are sets of semantically complete sen- tences that use some ontology that is compliant with a natural language. As meaning of natural language sentences is context dependent and can be ambiguous, a most desirable property for sentence meaning is to retain the most important characteristics of von Neumann architectures that is deter- minism of code meanings. This is the property that makes today’s computers reliable for bank transactions or airplane ticket search and reservation systems, etc. Determinism is however not defined globally, that would be untenable in the global world of knowledge, but locally in the context of a single NLP document. Definition 4.4: NLP document is a tuple D = hΞ,O,S,m,d,LN ,Ni of natural language Ξ, ontology O, sentence set S, meaning function m, conceptualization descriptions d and syntactically correct codes LN (in terms of programming language N), if the following are satisfied: • O and S are Ξ compliant. • The interpreter I = hS,m,LNi is semantically complete. • There is a unique translator T such that T (s) ∈ LN ,∀s ∈ S and all s ∈ S are acceptable in Ξ. The property of unique compilation is to preserve the main benefit of digital computers in that they are deterministic. Fig. 2. Title page of an NLP document in “system English” that is short for V. EXAMPLES OF NLP DOCUMENTS sEnglish. See numerous examples of machine generated sEnglish documents Figures 2,3 illustrate the web pages of an NLP document, at www.system-english.com. sentences and document format for modelling of the environ- ment and goals. Figure 4 shows the graphical user interface of the sEnglish authoring tools. The reader can find and download a number of NLP documents from www.system- english.com .

VI. LEVELS OF ABSTRACTIONS

Assume Ξp = {O,S} is a conceptual program. Any s ∈ S has an associated set of subroutine calls denoted by H(s)= {hi ∈ LN , i = 1,...,ns}. Each hi has a set of input object classes corresponding to ontology classes in Γ of O. An individual object under a class γ ∈ Γ is simply a structure with field names {λ | ∃χ ∈ Γ : hλ, χi ∈ @(γ)}. An s ∈ S within a Ξp = {O,S} is called to have an elementary meaning if m(s) ∈ LN and it is called to have an explained meaning if m(s)= {s1, s2, ... sk}, si ∈ S,i = 1,...,k. Definition 6.1: A sentence s ∈ S, that has elementary meaning only, is called zero-level abstraction D-abstract ion. An s ∈ S is called to be of a level k D-abstraction if k is the smallest positive integer such that there is a sequence of si ∈ S,i = 0,1,...,k −1 such that m(s0) ∈ LN ,si ∈ m(si+1),i =

1,...,k − 1, sk = s . Zero level D-abstractions are also called subconscientious abstractions. The term “D-abstraction” is short for “deter- Fig. 3. Example section of an NLP document ministic abstractions”. Although D-abstractions are unlike human abstractions in flexibility, they are abstractions as they abstract away the details into their developed meaning in terms of other sentences and eventually code in LN . Note however that even zero-level abstractions abstract away from basic level an agent can then be viewed as a function

action : S∗ → A which maps finite sequences of environment states to actions. Intuitively speaking an agent decides what action to perform on the basis of its history i.e. its experience to date. The non- deterministic behaviour of the environment can be modelled as a function env : S × A → 2S which maps the current state of the environment and the agent’s action to a set of environment states that could result from performing the action. If all the sets in the range are singletons then the environment is called deterministic. An agent is purely reactive if its action only depends on the current state of the environment, so its action can be described by a function action : S → A. This definition of reactive agents is a bit simplistic to be useful and the first architectural issue is to split the action mapping into perception and action:

see : S → P , act : P∗ → A where P is a nonempty set of percepts that is composed of Fig. 4. Sentences editor for an NLP document that is part of the Authoring relations of objects with classes in a restricted ontology O. To Tools for sEnglish documents. be more precise let MO be the set of all objects with class in ΓO. Relations of objects from MO are unary, binary, tertiary, etc. partial functions with Boolean or real-vector values. For any positive integer i the R (V) denotes the set of i- the individuals the meaning refers to as available objects i partial functions f that are defined as f : Πi M → V . The (inputs): a zero level level sentence s ∈ S is defined by the set k=1 O set of all relation functions over M is R(V)= ∪ R (V), of classes of its outputs and inputs in the corresponding calls O i≥0 i finally the set of all possible relations is denoted by R. We H(s)= {h ∈ L , i = 1,...,n }. Hence zero level abstractions i N s now define the perception P as some subset of R and P∗ as are defined by classes and not individuals. sequences of subsets of R. Any D-abstraction at any level is well defined through a This means that act now maps sequences of percepts to series of meaning definitions and hence deterministic. This actions. Let’s now introduce a set of agent states K. Then the property is a bit unlike human concepts where definitions next state is defined by a function next : K × P → K and the are not as well determined. The connections between abstrac- action is decided by a new function action : K → A that maps tions in an NLP Ξ O,S and between human concepts, in p = { } the set of states into actions. State-based agent description terms of human ontologies O ,O , are best defined via the h c ri assumes that an initial state exists. human interpretation function Ψ. Ψ, as defined in Definition Sentences defined in NLP documents can now be used in 8.1, associates a sentence with a set of conceptual graphs in various ways: the human knowledge base HKB. (a) Relational sentences describing the relations in P are created from sensor signals. VII. PROCEDURALKNOWLEDGESHARINGAMONG (b) Meanings of instructional sentences describing how AGENTS actions are executed in terms of modelling objects in To be able to define shared skills and knowledge among MO. These can be “physical” actions such as feed- agents via NLP documents we provide formal definition back/feedforward control or actions can also be “men- of a very broad class agents [11], [19]. The term ‘”skill” tal” actions such as various types of path planning is used for procedural capabilities such as interaction with or planning of steps to achieve a more abstract goal. the environment and “knowledge” also includes models of Assessing priorities in a deliberative agent is also type relations in the current environment the agent is in. 2S will of mental action. denote the set of subsets of a set S and S∗ will denote the The above described general agent class with the state set of all finite sequences by elements of S. transition next function can cover all kinds of layered and Let the set of states of the agent’s environment be defined deliberative agent architectures. The details of how state by S = {s1,s2,} . The effector capability of an agent is transition is organized in an agent is not the concern of this represented by a set A = {a1,a2,} of actions . At the most paper. We are only interested to define a large class of agents that can be fully documented in an NLP document and can This means that researchers can look up the basic perception, make use of new documents read. action, planning, decision making and other sentences of Definition 7.1: An agent A(O,see,next,action) is called a robot family and write new procedures in an HTML NLP documentable if there is an NLP document D that published NLP document. The difference relative to currently describes available automatic software updates (through the Internet) (i) a agent-world modelling ontology; O is that in our systems these Internet publications are actu- (ii) the execution of its see function for perception and ally readable English documents that can be the basis of communication; professional knowledge sharing as that is customary today (iii) the execution of its next and action functions. in journal publications. The next section provides a formal description of knowledge sharing with humans. A. Agents sharing a conceptual base We now assume that in a set A of NLP documented VIII. SHARED KNOWLEDGE DEFINITIONS WITH HUMANS agents each agent a is based on the same document D = Apart from clear presentation of knowledge sharing among Ξ h ,O,S,m,LN ,Ni. There will be no specific assumption a set of artificial agents, the most useful of NLP made about the agent architecture and decision making documents is that defined meanings also map to conceptual procedures but the following will be shared among the structures that represent human thinking. The relationship agents. of a document D = hΞ,O,S,m,d,LN,Ni to human thinking, 1) Each agent a ∈ A uses ontology O to model the and onto knowledge sharing among a set of human users set of objects and systems M of the shared physical and programmers, is formulated by its human interpretation environment in which they operate. functions Ψ. 2) Each agent a ∈ A uses the same set of sentences Mr to Definition 8.1: A pair of time varying functions Ψt = Ψt Ψt express relationships among objects and systems of the [ r, c], is called the human interpretation of sentences in environment in terms of their perception definitions. an NLP document D = hΞ,O,S,m,LN,Ni if the following are In terms of modelling relations the NLP sentences used by satisfied: agents can be of the following kind: Ψr ΓI C • c : O → 2 maps current individuals of classes in 1) Query sentences that have for meaning the description ontology Γ of O to a set of feasible conceptual inter- of a procedure in terms of NLP sentences. pretation among the concepts Oc of human CGs. Ψr HKB 2) Instructional sentences that have meanings described • r : S → 2 is a mapping consistent with d : S → by sequences of NLP sentences describing the steps Bcg(Oc,Or). of the procedure. Note that the difference between the basic CGs Bcg(Oc,Or) 3) Goal sentences that have meanings described by a and HKB is that the latter represents a stream of compound mixed sequence of instructional sentences and other CGs of human interpretation of the current and past state of goal sentences (subgoals). the world. 4) Behaviour constraint sentences in terms of relation- For the human interpreter a sentence s ∈ S can have ships among environmental objects (including the varying meanings, i.e. conceptual graphs depending on the agents “body”) that describe what is not allowed while context the sentence is uttered in. In general we cannot aim achieving goals. here to formalize human interpretation due to lack if insuf- Note that if something is not behaviourally constrained than ficient knowledge about human thinking. There is however it is allowed for any agents during its course of actions to a special context for the human mind where meanings of achieve a goal. sentences s ∈ S can be well defined. Definition 8.2: The human context where a human agent B. Agents reading new NLP documents Ah have read and remembers the meanings of definitions in If human authors write about new perception or action D = hΞ,O,S,m,d,LN ,Ni is called a human-machine context procedures in an NLP document, that is targeted for an agent X(Ah,Ξp). The human agent Ah is called nlp-compliant if class, the following holds. it chooses to interpret all s ∈ S with their unique translator Theorem 7.1: A perception or action sentence definition S T (s) associated with D. by other NLP sentences in a new NLP document D is useful Note that for humans the way the Ξp = hO,S,mi interprets for agents in an agent class A if the following conditions are a sentence can be only one of the possibilities. Nlp-compliant satisfied: human behaviour means that the human chooses to interpret (I) The ontology used by D is an extension of the base sentences according to Ξp = {O,S}. Given a set of humans ontology of the agent class A. sharing the knowledge of a Ξp = hO,S,mi and they are nlp- (II) S occurs in the base NLP document of agent class A. compliant, then they have shared meaning of any s ∈ S, (III) Underlying programming language subroutine-calls, irrespectively whether they are agent programmers or users used in the meaning definition of S in D, are contained of an agent. in the routine library H of N used by the agent class A. Theorem 8.1: Any NLP document D =  hΞ,O,S,m,d,LN ,Ni provides shared unambiguous understanding of sentence meanings in S for nlp-compliant provide abstractions and knowledge sharing [15], [12], [14], humans and software agents. [10]. A brief summary is: Proof. Any sentence s ∈ S in an NLP D = • Human robot users can share knowledge with agents hΞ,O,S,m,d,LN ,Ni corresponds to a code T (s) ∈ LN through sEnglish documents and this can enhance hu- that defines its meaning for an agent residing on a computer man understanding of robot behaviour. It can reduce the and using D. On the other hand any sentence s ∈ S also has chance of misunderstanding when complex intelligent Ψt a unique interpretation r(s) ∈ HKB for an nlp-compliant behaviour is needed during autonomous missions. Ψ human agent. The correspondence T (s) ⇔ r(s) creates a • The published sEnglish papers can be distributed to shared meaning between the software agent and the human agents that can extract from them some new skills, as well as a definition of possible meaning for the human. sensing procedures, deliberative or reactive behaviour  policies. Instead of reprogramming, the autonomous systems updates/learns from publications as humans do. • The sEnglish publications can be distributed within a de- sign company or on an Intra/Internet to make colleagues aware of results in perception signal processing, navi- gation, environment modelling or in adaptive/learning control methods.

REFERENCES [1] S M Veres. Natural Language Programming of Agents and Robotic Devices. SysBrain, ISBN 978-0-95584417-0-5, London, June 2008. [2] Y Wang. A hierarchical abstraction model for software engineering. In ROA08, Role of Abstraction in Software Engineering, volume CD, pages 43–48, Leipzig, Germany, 2008. [3] Y Ye. Supporting software development as knowledge-intensive and collaborative activity. In Proc. of 2006 Int. Workshop on Interdis- ciplinary Software Engineering Research, volume CD, pages 11–23, Fig. 5. Graphical user interface of an sEnglish reader agent for web pages Shanghai, China, 2006. that can be installed on any PC. [4] S M Veres and N K Lincoln. Sliding mode control for agents and humans. In U. Nemtzow, editor, TAROS 2008: Towards Au- tonomous Robotic Systems, volume CD volume, pages 11–23, Ed- The usefulness of natural language program definitions inburgh, September 2008. [5] Autonomous Vehicle Control Systems Laboratory. Publica- stems from the fact that tions, http://www.sesnet.soton.ac.uk/people/smv/avs lab. University of (a) The sentence meanings define the precise meaning that Southampton, Southampton, UK, 2010. may otherwise be ambiguous to the human interpreter. [6] L. Molnar and S.M. Veres. System verification of autonomous underwater vehicles by model checking. In IEEE OCEANS’09 Europe, (b) A team of humans can share the understanding of volume CD, page p.6, Bremen, Germany, 2009. natural language sentences definitions and adopt their [7] J. Ezekiel and A. Lomuscio. Combining fault injection and model thinking to the meaning definitions provided. This is checking to verify fault tolerance in multi-agent systems. In Pro- ceedings of the International Conference on Autonomous Agents and easy to do for humans if the NLP sentence definitions Multi-Agent systems, Budapest, Hungary, —2009—. and modelling object classes represent generally accept- [8] J. Ezekiel and A. Lomuscio. An automated approach to verifying able examples of human concepts. diagnosability in multi-agent systems. In Proceedings of the Software Engineering and Formal Methods, Hanoi, Vietnam, —2009—. [9] L. Molnar and S.M. Veres. Verification of AUVs using formal logic. IX. PARTICULARISED SENGLISH DOCUMENTS In European Control Conference, ECC 2010, volume CD, page p.8, A. The use of a context free language (CFL) Budapest, Hungary, 2010. [10] S M Veres and L Molnar. Documents for intelligent agents in English. B. Descriptions of agent knowledge In Proc. of 2010 IASTED Conference on Artificial Intelligence and Applications, volume CD, page p.10, Innsbruck, Austria, 2010. C. Application of context dependent languages [11] S.M. Veres, L. Molnar, N. K. Lincoln, and C. Morice. Autonomous vehicle control systems - a review of decision making. Journal of D. Modelling for formal verifiability Systems and Control (to appear), 78(10):42, 2010. X. CONCLUSIONS [12] SysBrain Ltd. sEAT - Authoring Tool for sEnglish Documents. www.system-english.com, 2008-2010. This paper has described the theory of natural language [13] SysBrain Ltd. sERA - Reader Agent of sEnglish Documents. programming and its use by agents. NLP has existed for a www.system-english.com, 2008-2010. [14] S M Veres, L Molnar, and N K Lincoln. CAT 1.1 - Cognitive Agents couple of years [12], [13] in software that is now well tested Toolbox in sEnglish/Jason(AgentSpeak). University of Southampton / and this paper fills in the gap in terms of precise theoretical SysBrain Ltd, www.cognitive-agent-toolbox.com, Southampton, UK, definitions. Users of sEnglish can find a formal description 2010. [15] L. Dennis, M. Fisher, A. Lizitsa, N. K. Lincoln, and S.M. Veres. that reveals its simplicity and explains its practical strength. Satellite control using rational agent programming. IEEE Intelligent As clarified in this paper, NLP is not another proposal for Systems Magazine, 25(3):92–97, 2010. a robot programming language. Instead, it is a radically [16] J F Sowa. Conceptual Structures: Information Processing in Mind and Machine. Addison-Wesley, Reading, MA, 1984. new approach that conceptualizes programming and can be [17] E C Way. Conceptual graph overview. J. Experimental and Theoretical used in combination with agent programming techniques to Artificial Intelligence, 4:75–84, 1992. [18] B Moulin. Temporal contexts for discours representation: an extension of the conceptual gaph approach. Applied Intelligence, 7:227–255, 1997. [19] Michael Wooldridge. Reasoning about Rational Agents. MIT Press, Cambridge, —2000—.