Jump to content

User:Rhmccullough/Sandbox/new.mKR

From Wikipedia, the free encyclopedia
mKR
Paradigmprocedural
Designed byRichard H. McCullough
DeveloperRichard H. McCullough
First appeared1997
Stable release
7.3 / June 2008
Typing disciplinestrong
OSLinux, Windows, Mac
LicenseGNU GPL
Websitehttp://mKRmKE.org/
Influenced by
English, UNIX shell, Unicon

mKR is a high-level, user-friendly programming language which supports the knowledge representation primitives required to create, edit and search knowledge bases. It follows the procedural programming paradigm, using variables and procedures, but also makes use of naturalistic words and phrases, as well as the epistemological notions of definition and context. Contents [hide]

  * 1 History
  * 2 Keywords
  * 3 Types
  * 4 Operators
  * 5 Examples
  * 6 References
  * 7 External links

[edit] History

mKR made its public debut in 1997[1] as the user interface language for mKE (my Knowledge Explorer).

Beginning in 2002, there were many discussions between the developers of mKR, RDF and OWL, which are documented in the email archives of W3C[2][3]. The topics discussed included context, definitions, entities, actions. In most cases it was agreed that RDF/OWL and mKR would always be different.[4][5]. One notable exception is genus-differentia definitions -- the OWL Property Restriction[6] was added to emulate the mKR capability. These inter-language discussions reached a point of diminishing returns, and mKR topics moved to Yahoo[7]. mKE was enhanced to read RDF files[8].

At the suggestion of the members of W3C development group[9][10], mKR development focused on interfacing with the Stanford University TAP knowledge base and the OpenCyc knowledge base. Successful interfaces were established with both, but Stanford University no longer supports the TAP knowledge base. Current mKR development is focused on the OpenCyc and ResearchCyc knowledge bases. OpenCyc is now administered by The Cyc Foundation, whose first innovation was an HTTP-based Concept Browser. The previous SubL-based interface with mKR is being converted to an HTTP-based implementation.

As mKE/mKR accessed services like Amazon.com, Google and the OpenCyc knowledge base, a wider audience[11][12][13] has become interested in mKR.

[edit] Keywords

  The second line of a verb group shows inverses.
  "foreign" words may be imported from RDF, OWL, CycL, etc.
  extended hierarchy verbs use regular expression notation: isa*, isa**2, etc.
  some "keywords" are really "predefined" words (known semantics)
  * context

space time view

  * prepositions

at with of from to od out in

  * verbs (basic)

is haspart has rel can ! do done causes IS HAS DO

 isapart                       because
  * verbs (hierarchy)

isa isu iss isc isp isg

  * verbs (group)

isany isall isand isor isxor xor isnot isnon isalt ismem

  * verbs (Natural Semantic Metalanguage - space,time, ...)

before below beside inside short small near bad very happens happensod after above beside outside long big far good

  * actions (Natural Semantic Metalanguage - mental predicate, sense, ...)

move speak want feel think believe know see hear touch taste smell

  * conditionals

if then else fi

  * iteration

every while until

  * control

begin end return hierarchy relation

  * special

existent nonexistent unknown characteristic attribute part relation action interaction proposition definition differentia genus species unit concept

[edit] Types

Types are detetmined automatically whenever possible, based on hierarchy and syntax

  * hierarchy types

htype isany existent, concept, unit, nonexistent;

  * concept types

ctype isany existent, nonexistent, unknown,

          group, entity, characteristic, proposition,
          part, attribute, relation, action, interaction;

[edit] Operators

  * assignment

[edit] += -= *= := +:= -:= *:= ::

  * name qualifiers
    ::
  * binary

+ -

[edit] Examples

The brief examples given below illustrate the major features of mKR.

  See External References for additional details, including:
  commands, options, methods,
  tutorial, grammar,
  predefined knowledge units,
  mKE command-line options.
  * attributes

Dick McCullough has

  email = PioneerCA.com,
  phone = 209-555-1212;
  * relation

address book is relation with

  format = [person:1, email:2, phone:3],
  meaning = { $1 has email=$2, phone=$3; };

begin relation address book;

  Dick McCullough, rhm@PioneerCA.com, 209-555-1212;

end relation address book;

  * hierarchy

begin hierarchy tabula rasa;

  existent;
  /    group;  # abstract entity
  /    entity; # physical entity
  /    characteristic;  # property
  //       attribute;
  //       part;
  //       relation;
  //       action;
  //       interaction;
  /    proposition;

end hierarchy tabula rasa;

  * display hierarchy

existent isc* ?;

  * action

at time = 10 am {

   John Doe do walk
       from his house
       to the store
       with purpose = buy food
   done;

};

  * definitions and context

mKE is ke; at view = Aristotle { man is ANIMAL with rational; }; at view = McCullough { man is person with gender=male; };

  * questions

ke do ? done; # mKE commands ke has ?; # mKE options and variables

  * iteration

every p isu person { do print od $p done; };

  * conditional

if e := Dick McCullough has email = ?; then do print od $e done; fi;

  * define enumeration, set

color isany red, green, blue; digits isall 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;

  * store attributes in database or table

Dick McCullough[email] := rhm@PioneerCA.com; Dick McCullough[phone] := 209-555-1212;

  * print attributes

every a of Dick McCullough { do print od Dick McCullough[$a] done; };

  * define method

char is method with

   format = [ existent:1 ],
   meaning = {
         $1 is  ?;
         $1 has ?;
         $1 do  ? done;
   };
  * execute method

do char od Dick McCullough done;

  * execute UNIX shell command

! cat *.txt | sort done;

  * execute mKR script

ke -m -owl <<EOF > peirce.out

do read owl from peirce.owl done;
do check od genus done;
do check od unknown done;
do simplify lattice od Thing done;
Thing isc* ?;

EOF grep -v '^#' peirce.out > peirce.ho

[edit] References

 1. ^ 1997, Richard H. McCullough, Knowledge Explorer, The Icon Newsletter, No. 52, p. 7.
 2. ^ www-rdf-interest@w3.org
 3. ^ www-rdf-logic@w3.org
 4. ^ 2002, Charles McCathieNevile, KR and RDF Redux, 11 December 2002.
 5. ^ 2002, Richard H. McCullough, KR and RDF Redux, 11 December 2002.
 6. ^ 2002, Jon Hanna, RE: DefinitionOf, 19 Nov 2002.
 7. ^ KR-language@YahooGroups.com
 8. ^ Dave Beckett's Resource Description Framework (RDF) Resource Guide, RDF Editors and Tools, McCullough Knowledge Explorer.
 9. ^ 2002, Danny Ayers, RE: KR & W3C (was KR & Issue/bug tracking terms in RDFS?), 21 Dec 2002.
10. ^ 2002, Seth Russell, RE: CycL vs. KR, 29 Nov 2002.
11. ^ 2008, Marcus P. Zillman, Knowledge Discovery Resources 2008, Virtual Private Library.
12. ^ 2008, Mizoguchi Lab, A List of Ontology Engineering Tools (Ontology Editors), Osaka University.
13. ^ 2008, Clinton Jeffery, Lecture Notes for CS 404/504 Program Monitoring and Visualization, Lecture 14, University of Idaho.

[edit] External links

  * my Knowledge Explorer and the mKR language

Retrieved from "http://wiki.riteme.site/wiki/MKR_%28programming_language%29" Categories: Knowledge representation | Knowledge engineering Hidden categories: Articles for deletion | Articles needing additional references Views