
IBUKI dataVersion 0.002 2015-07-31
AbstractThis document was written by Richard Weyhrauch to accompany his theoretical work on AI agents. This document describes IBUKI data which is available as part of all IBUKI systems. Table of contents1 IntrodctionIt may seem odd that IBUKI has gone through the trouble of defining IBUKI data explicitly since every programming language does exactly that and logicians do this when they axiomatize arithmetic or set theory. Our desire to develop a thinking system that can reason about its own reasoning capability has played a major role in our thinking. The data structures generally used by logicians (eg sets, natural numbers snd sometimes strings (Godel) or trees ...) are too restrictive and lack practical utility. No real usable system would encode numbers as sets or use Godel numbering to describe well-formed formulas. The data structures of computer science likewise are not practical for our purposes. They are both too diverse and too ad hoc and defined intentionally (their semantics is frequently tied to a particuliar processor or operating system ...). IBUKI has chosen a middle course. At the data level IBUKI has selected a collection of data types and has described their semantics in a way that allows us to build a system that 1) can think about them and 2) their properties are the ones used by mathematicians and logicians (e.g., IBUKI [integer]s are closed under addition. This property is fundemental to the arithmetic of logicians but fails for most programming languages.). On top of these IBUKI has defined a particular type system (in the sense of what type on a thing something is) called IBML, a particular computation system, SEUS, and a particular logical system, FOL contexts, that can be fully implemented using just this data. The uniformity of data across IBUKI systems guarentees that IBUKI systems can be built that can reason about themselves using 'traditional' axioms. We also know that, as a practical matter, builders of computer systems will want to use programming languages and other systems in conjunction with any IBUKI system. For this reason we have introduced 'native-data' as a general escape hatch for this purpose. This mechanism allows a developer (or for that matter a theoritician) to integrate an IBUKI system with whatever tools or techniques are convenient. The cost (dare I say penalty) for this is that reasoning about such objects will require additional work on the part of the developer. Perhaps a small price to pay for the flexability. More details as well as some discussion of its adaquacy in the section on native data. Native Data;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; [data] ;; ;; [base-data] ;; ;; [tag] ;; TAG? ;; ;; [character] ;; CHARACTER? ;; chr2num num2chr ;; ;; [string] ;; STRING? ;; str2chars (string) ;; chars2str (chr-list) ;; ;; [number] ;; NUMBER? ;; Zero ;; ZERO? ;; chars2num ;; num2chars ;; ;; [symbol] ;; SYMBOL? ;; sym-mak ;; str2sym sym2str ;; sym-get-name ;; ;; [pair] ;; PAIR? ;; pair-mak (car cdr) ;; pair-get-car ;; pair-get-cdr ;; ;; [native-data] ;; NATIVE-DATA? ;; native-data-get-anno ;; ;; ;; subtypes of dats ;; ;; [number]s are defined in terms of [natnum]s BUT ;; as [data] they include all [rational]s ;; operations and functions on [number]s coerse type ;; eg 0/0 ==> 0 ... ;; [number] ;; [rational] ;; RATIONAL? ;; RAT-ZERO? ;; RAT-POSITIVE? RAT-NEGATIVE? ;; RAT-NATNUM? ;; rat-mak (num den) ;; rat-get-num ;; rat-get-den ;; [integer] < [rational] ;; INTEGER? ;; INT-ZERO? ;; INT-POSITIVE? INT-NEGATIVE? ;; INT-NATNUM? ;; int-mak (sign natnum) ;; int-get-nstnum ;; int-get-sign ;; [natnum] < [integer] ;; Zero ;; NATNUM? ;; NAT-ZERO? ;; NAT-NATNUM? ;; chars2nat nat2chars ;; successor ;; ;; [list] ;; LIST? ;; EmptyList ;; EMPTYLIST? ;; list-add-1st (list DATA) ;; list-get-1st ;; list-get-rst ;; ;; [sexp] ;; SEXP? == (type-union [atomic-data] [pair]) ;; ;; [tagged-sexp] < [sexp] ;; `(,[tag] ,[anno] ,@[sexp]) ;; ;; [finite-set] < [tagged-sexp] ;; `(*finite-set* ,[anno] ,@[list]) ;; ;; [aset] < [finite-sexp] ;; `(*finite-set* ,[anno] ,@[alist]) ;; ;; [anno] < [sexp] ;; (type-union [anno-name] '(,[anno-name] @,[alist]) ;; [anno-name] < [symbol] ;; '(*one-of* ,[anno-IDK] ,[symbol]) ;; [anno-IDK] ;; '(*exa* |symbol| @) ;; ;; (DISJOINT [base-data] [native-data]) ;; ;; [data] == (type-union [base-data| [native-data]) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; [base-data] ;; ;; [base-data] == ;; (type-make-disjoint-union ;; [tag] ;; [character] ;; [string] ;; [number] ;; [symbol] ;; [pair] ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [data]There are 6 types of [base-data]: [tag]s, [character]s, [integer]s, [string]s, [symbol]s and [pair]s. IBUKI also supports access to [native-data]. These types are mutually disjoint. The expressions defined below provide a uniform description of the basic data available to every IBUKI System. [tag]sIn normal programming practice how a programmer uses a particular data type is usually in the head of the programmer (or maybe in the documentation) but is usually not descernable by looking at the data. A programmer may use integers to mean shoe sizes in one part of their code and to represent the number of pairs of shoes ordered in another. The idea of a 'tag' is to make explicit distinctions between the uses of the data. [tag]s are used to do this. IBUKI tags are written as a word that begin and end with the 'star' character #\*. Some examples are *tree* *finite-set*IBML tags are not IBML symbols. Sequences of characters used in writing and printing IBUKI data is case sensitive, so '*finite-set*' and '*FINITE-SET*' are different tags. [tag] is a [base-type] and is disjoint from other types of [base-data]. [integer]sAn IBUKI [integer] can have any number of digits and IBUKI integer arithmetic is exact. [integer]s are read and written as any number of digits or an [integer] optionally preceeded with a '+' (plus) or '-' (minus) sign. -749321 --6 0 293 128328287193289487593485992843579238749579459 [character]s
The latter two groups overlap. IBUKI has defined many groups of characters. The details are documented in IBML Characters. [string]sIBUKI strings are writen as sequences of US-ASCII characters surrounded by quotation marks (ie, the character #\"). "Hello World"Writing strings containing the quote symbol itself is accomplished by putting a backslash character, #\\, before the quote symbol. "He said, \"Hello World\"."IBUKI uses #\\ as an escape character that is not actually part of the string. Note the #\" characters 'surrounding' the string are also not part of the string, but only part of the way we write strings to facilitate reading and printing. The ability to mention 'string's containing non-US-ASCII characters is intentionally left out of this document. (see ' IBML big strings. [symbol]s
IBUKI symbols are written as sequences of characters, e.g.,
|