64
Quick TIFF are ne Marko A. Rodriguez and Ryan Chute Los Alamos National Laboratory - Research Library Public Lecture Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification Marko A. Rodriguez (1) Ryan Chute (2) Digital Library Research & Prototyping Team Los Alamos National Laboratory - Research Library (1) marko@lanl . gov (2) rchute@lanl . gov Acknowledgements: Herbert Van de Sompel (LANL) and Johan Bollen (LANL)

Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

Embed Size (px)

DESCRIPTION

• The Semantic Web is a distributed, flexible modeling framework.• The Semantic Web is primarily descriptive in nature. The Semantic Web is used to describe web-pages, services, systems, etc.• Neno is an object-oriented language that was designed specifically for the Semantic Web.• Fhat is a virtual machine represented in the Semantic Web.• With Neno/Fhat the Semantic Web now has a procedural component. The Semantic Web now includes object methods, algorithms, and computing machines.• The Semantic Web can be made to behave like a distributed, general-purpose computer. Not just an information repository.

Citation preview

Page 1: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Neno/Fhat: Semantic Network Programming Language

and

Virtual Machine Specification

Marko A. Rodriguez (1)

Ryan Chute (2)

Digital Library Research & Prototyping Team

Los Alamos National Laboratory - Research Library

(1) [email protected]

(2) [email protected]

Acknowledgements:

Herbert Van de Sompel (LANL) and Johan Bollen (LANL)

Page 2: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Supplemental material.

• All referenced articles and more information is available at:

o http://www.soe.ucsc.edu/~okram- (or just Google Marko A. Rodriguez)

o http://neno.lanl.gov/

Page 3: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The take home points.

• The Semantic Web is a highly-distributed, flexible modeling framework.

• The Semantic Web is primarily descriptive in nature. The Semantic Web is used to describe web-pages, services, systems, etc.

• Neno is an object-oriented language that was designed specifically for the Semantic Web.

• Fhat is a virtual machine represented in the Semantic Web.

• With Neno/Fhat the Semantic Web now has a procedural component. The Semantic Web now includes object methods, algorithms, and computing machines.

• The Semantic Web can be made to behave like a highly-distributed, general-purpose computer. Not just an information repository.

Page 4: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 5: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 6: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The various network types.

• There is the undirected network of common knowledge.o For example, vertex i and vertex j are related.

• Then there is the directed network of common knowledge.o For example, vertex i is related to vertex j, but j is not related to i.

• Finally, there is the semantic network (or directed labeled network/multi-relational network).o For example, vertex i is related to vertex j by the semantic s, but j is not related to i by the semantic s.

i j

i j

i js

Page 7: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Example undirected network.

Herbert

Marko

Aric

Ed

Zhiwu

Alberto

Jen

Johan

Luda

Stephan

Whenzong

Page 8: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Example directed network.

Muskrat

Bear

Fish

Fox

Meerkat

Lion

Human

Wolf

Deer

Beetle

Hyena

Page 9: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Example semantic network.

SantaFe

Marko

NewMexico

Ryan

California

UnitedStates

LANL

livesIn

worksWith

cityOf

originallyFrom

stateOfstateOf

locatedIn

hasLab

Cells

Atoms

madeOf

madeOf

researches

Oregon

southOf

hasResident

Arnold

governerOf

northOf

Page 10: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The subject/predicate/object perspective.

• A semantic network is sometimes called a triple list.o The first element of the triple is called the subject.o The second element of the triple is called the predicate.o The third element of the triple is called the object.

• Reads like a very simple sentence.o <marko> <worksFor> <LANL>o <fluffy> <isA> <puppy>o <herbert> <isFrom> <Belgium>o <LAUR-07-3678> <cites> <LAUR-07-2885>

subject objectpredicate

Page 11: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What are the benefits of a semantic network model?

• In an undirected and directed network you can only model a set of homogenous elements connected to one another by a set of homogenous relationships.

o For example, a co-authorship network of researchers, a citation network of journals, a friendship network of humans, a route network of airports.

• In a semantic network, you can mix different elements and different types of relationships into a single semantic network data structure.

o For example, a scholarly network of researchers, journals, articles, institutions all related to one another by a various types of relationships (see MESUR).

o In fact, with a semantic network, all models can be unified into a single data structure (*hinting at the Semantic Web*).

Note: a recent paper demonstrates that there is in fact no fundamental modeling gain by using a semantic network representation.

Rodriguez, M.A., “Mapping Semantic Networks to Undirected Networks”, LA-UR-07-5287, [submitted], August 2007.

Page 12: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What are the drawbacks of the semantic network?

• There is little research into the analysis of semantic networks.

• How do you rank vertices in a semantic network? The relationship “isFriendsWith” may be deemed more important than the relationship “livesInSameCityAs”?

• While semantic networks make it possible to represent multi-relational models, it is difficult to use standard network analysis algorithms on such models. It is a more complex data structure.

• However, more “intelligent” algorithms can take advantage of this extra information.

Note: Two recent articles present methods for porting many of the popular directed/undirected network analysis algorithms to the semantic network domain.

Rodriguez, M.A., “Grammar-Based Random Walkers in Semantic Networks”, LA-UR-06-7791, [submitted], November 2006.Rodriguez, M.A., Watkins, J.H., “Grammar-Based Geodesics in Semantic Networks”, LA-UR-07-4042, [submitted], June 2007.

Page 13: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 14: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What is the Semantic Web?

• The figurehead of the Semantic Web initiative, Tim Berners-Lee, describes the Semantic Web as

o “... an extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation.”

• Perhaps not the best definition. It implies a particular application space--namely the “web metadata and intelligent agents” space.

• My definition is that the Semantic Web is o “a highly-distributed, standardized semantic network data model--a URG (Uniform

Resource Graph). It’s a uniform way of graphing resources.”

Note: The more network perspective is presented in a recent article.

Rodriguez, M.A., Watkins, J.H., Bollen, J., Gershenson, C., “Using RDF to Model the Structure and Process of a System”, LA-UR-00-0000, 2007 International Conference on Complex Systems, October 2007.

Page 15: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What is a resource?

• Resource = Anything.o Anything that can be identified.

• The Uniform Resource Identifier (URI):o <scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]

- http://www.lanl.gov

- urn:uuid:550e8400-e29b-41d4-a716-446655440000

- urn:issn:0892-3310

- http://www.lanl.gov#MarkoRodriguez– prefix it to make it easier on the eyes -- lanl:MarkoRodriguez

• The Semantic Webo “first identify it, then relate it!”

Page 16: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The technologies of the Semantic Web.

• Resource Description Framework (RDF): The foundation technology of the Semantic Web. RDF is a highly-distributed, semantic network data model. In RDF, URIs and literals (e.g. ints, doubles, strings) are related to one another in triples.

o <lanl:marko> <lanl:worksWith> <lanl:jhw>o <lanl:jhw> <lanl:wrote> <lanl:LAUR-07-2028>o <lanl:LAUR-07-2028> <lanl:hasTitle> “Web-Based Collective Decision Making

Systems”^^<xsd:string>

• RDF Schema (RDFS) and the Web Ontology Language (OWL): The ontology is to the Semantic Web as the schema is to the relational database.

o “Anything of rdf:type lanl:Human can lanl:drive anything of rdf:type lanl:Car.”

• Triple-Store: The triple-store is to semantic networks what the relational database is to the data table.

o a.k.a. semantic repository, graph database, RDF database.

Page 17: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

RDF and RDFS.

lanl:marko lanl:cookie

lanl:Human lanl:Food

lanl:isEatingrdf:type rdf:type

lanl:isEating

rdfs:domainrdfs:range

ontology

instance

RDF is not a syntax. It’s a data model. Various syntaxes exist to encode RDF including RDF/XML, N-TRIPLE, TRiX, N3, etc.

Page 18: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

RDF, RDFS, and OWL.

lanl:fluffy lanl:marko

lanl:Pet lanl:Human

lanl:hasOwnerrdf:type rdf:type

lanl:hasOwner

rdfs:domain rdfs:range

ontology

instance

_:0123

rdfs:subClassOf

owl:onProperty

“1”owl:maxCardinality

lanl:boblanl:hasOwner

owl:Restrictionrdf:type

Page 19: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The named graph.

• Suppose you want to make statement about a set of triples (a subgraph)?• The named graph provides direct support for reification .• A triple is quad: t = <s,p,o,g>, where g is a “graph” URI.• Triples can now be grouped according to the g URI.• Statements can then be made about sub-graphs: provenance, trust, etc.

R-triple1

Herbert

2005

PaperAJournalB

R-triple2

R-triple3

ARecord

Herbert

2005

PaperAJournalB

ARecord

OLD STYLE

NAMED GRAPH STYLE

Page 20: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The triple-store.

SELECT ?a ?c WHERE { ?a type human ?a wrote ?b ?b type article ?c wrote ?b ?c type human ?a != ?c }

• There are two primary ways to distribute information on the Semantic Web.o 1.) publish RDF/XML document on a web server.o 2.) expose a public interface to an RDF triple-store.

• The triple store is to semantic networks what the relational database is to data tables.

o Storing and querying triples in a triple store.o SPARQL\Update query language.

- like SQL, but for triple-stores.

INSERT ?a coauthor ?c WHERE { ?a type human ?a wrote ?b ?b type article ?c wrote ?b ?c type human ?a != ?c }

DELETE ?s ?p ?o WHERE { ?s ?p ?o }

Page 21: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Triple-store vs. relational database.

Triple-store Relational Database

SQL InterfaceSPARQL Interface

SELECT (?x4) WHERE { ?x1 dc:creator lanl:LAUR-06-2139. ?x1 lanl:hasFriend ?x2 . ?x2 lanl:worksFor ?x3 . ?x3 lanl:collaboratesWith ?x4 . ?x4 lanl:hasEmployee ?x1 . }

SELECT collaboratesWithTable.ordId2 FROM personTable, authorTable, articleTable, friendTable, hasEmployeeTable, organizationTable, worksForTable, collaboratesWithTable WHERE personTable.id = authorTable.personId AND authorTable.articleId = "dc:creator LAUR-06-2139" AND personTable.id = friendTable.personId1 AND friendTable.personId2 = worksForTable.personId AND worksForTable.orgId = collaboratesWithTable.orgId2 AND collaboratesWithTable.ordId2 = personTable.id

Page 22: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

A birds-eye view of the Semantic Web.

www.domainC.com

<rdf></rdf>

www.domainA.com

www.domainB.com

Triple-store

Triple-store

Web-server

HTTP GET

SELECT

application

INSERT127.0.0.1

LinkedData

Page 23: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The best things about the Semantic Web.

• Inherently distributed.o The Uniform Resource Identifier (URI) is the “atom” of the Semantic Web.

• Great tools like the triple-store and ontology development environments.

• A great way to model many types of systems.

• Has an eclectic usage-base.o Being used for general-systems modeling.o Being used for knowledge-representation in the AI community.o Being used for metadata for digital-libraries.o Being used for knowledge-representation in the bio-sciences.o Being used for metadata in the Web community.

Page 24: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The worst things about the Semantic Web.

• Not well received by the research and web-user community.o Its so general, that its hard to pin-down exactly what the Semantic Web is.o The colloquial understanding of the Semantic Web is that of web-metadata and

intelligent agents.- Personally, the “Semantic Web” is a bad name.

o Hasn’t delivered the “killer app”.o Complicated to deal with (dubbed “triple hell”).

• Not quite a “web” yet. Organizational networks are not combined into a universal substrate. Disparate networks make up the Semantic Web.

o The URI is not necessarily a physical address. It’s a conceptual address.o Difficult to “jump” between different public networks.

- Still a download and process environment.o Not entirely true (note the Linked Data movement)

- http://sites.wiwiss.fu-berlin.de/suhl/bizer/pub/LinkedDataTutorial/

Page 25: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 26: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What is object-oriented programming?

• An software abstraction pattern.

• A class is a abstract representation of a “legal” object. o A collection of classes is an Application Programming Interface.

• An object is a collection of “key/value” pairs (fields) and its methods (functions). o A collection of objects is a run-time environment.

Human

Human colleague;Company job;

quitJob();

colleague

colleague

colleague

colleaguenew Human();

Class Objects

Fie

lds

Methods

Page 27: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The Semantic Web is a hop, skip, and solar system away from object-oriented programming.

• In RDFS/OWL, there is the concept of classes and properties.o For example, “a human can befriend another human”, “a human can have one

and only one xsd:string name.”

• We see a similar paradigm in object-oriented programming languages such as Java and C++. Classes have fields.

• However, in Java and C++, we see something else. We see the method. Any class can have any number of methods associated with it. In general, a method is used to change the class’ fields (properties). The methods are the algorithms which evolve the system model.

java.lanl.Object

Field

Method

owl:Thing

rdf:Property

???

We will focus on Java from here on out due to its strong similarities with Neno/Fhat.

Page 28: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

How does Java work?

• Java source code is written in a human readable/writable syntax called the Java language.

o Human.java

• Java source code is compiled to a machine readable syntax called Java byte-code.

o > javac Human.java Human.class

• Java byte-code is read in by the Java virtual machine and executed.o > java Human

Page 29: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Example of some Java source code.

public class Human{ public String name;

public int example(String a) { if(a.equals(“marko”)) { return 1; } else { return 2; } }}

Field

Method

Class

Human.java

Page 30: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Java byte-code.

100110010000011000101110100001101

010100001010011111110011010010101

100110010000011111101110100001000

000010011111011000101110100001101

100110011110010100010010001001111

000100100101001000101010111001010

..

.

Human.class

Page 31: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Virtual machine computing.

• A virtual machine, in short, is a computing machine represented in software, not hardware.

• Perhaps the most popular virtual machine is the Java virtual machine (JVM).

• It is the role of the JVM to interpret the Java byte-code (at runtime) and translate those instructions to the instruction set of the hardware CPU (e.g. Intel chip).

Java source code

Java byte-code

Java Virtual Machine

Native Machine Code

Page 32: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Example of a simple virtual machine.

public class SimpleVM{ HashMap<String,Object> variables; public void execute(File code) { FileStream stream = new FileStream(code); String inst = stream.nextLine(); while(inst != null) { if(inst.startsWith(“ADD”) // do add else if(inst.startsWith(“BRANCH”) // do branch else if(inst.startWith(“INIT_VAR”) // initialize variable … } }}

INIT_VAR xADD 1 2 xBRANCH x > 2 GOTO 100INIT_VAR ySUB x y x

…...

VIRTUAL MACHINE CODE CODE.TXT

Page 33: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What are the benefits/drawbacks of virtual machine computing?

• + “Write once, run anywhere.” In Java, the Human.class file can be run on any JVM regardless of the underlying hardware (e.g. Intel, PowerPC, etc.)

• - Code executes slower. Because compiled code is not native machine code, there is a run-time translation to native machine code. That run-time translation takes time.

Page 34: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The Semantic Web is a hop, skip, and galaxy away from a general-purpose computing platform.

• The Semantic Web is descriptive, not procedural.

• It describes a system, not the rules by which that systems evolves.

Note: This dichotomy is discussed in a recent article.

Rodriguez, M.A., Bollen, J., “Modeling Computations in a Semantic Network”, LA-UR-07-3678, [submitted], May 2007.

Page 35: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 36: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Take home points of Neno/Fhat.

• Pronounced “knee-know fat”.

• Introduces the concept of a method to the Semantic Web. o Any OWL class can have any number of methods associated with it.

• Introduces the concept of an RDF virtual machine (RVM). o Executes class methods.

Semantic Web

Page 37: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

What is Neno/Fhat?

• Neno is a semantic network programming language.

• Neno human source code compiles down to Fhat triple-code.

• Fhat triple-code is represented as an RDF network.

• Fhat triple-code is read by a Fhat RDF virtual machine (RVM).

• A Fhat RVM is represented as an RDF network.

• Thus, the Semantic Web is no longer just a data modeling environment, but a computing environment where algorithms and computing machine are represented in the semantic network substrate.

Note: The full specification of Neno/Fhat is in a recent article.

Rodriguez, M.A., “General-Purpose Computing on a Semantic Network Substrate”, LA-UR-07-2885, [submitted], April 2007.

Page 38: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

From Neno to Fhat.

Neno Human Source Code

FhatOWL API

Fhattriple-code

compiles to

> nenofhat -o N-TRIPLE Human.neno

instantiates to

lanl:Human h = new lanl:Human();

triple-store/web-server boundary

Page 39: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Neno.

owl:Thing lanl:Human{ xsd:string hasName[1]; xsd:integer example(xsd:string a) { if(a == "marko"^^xsd:string) { return "1"^^xsd:integer; } else { return "2"^^xsd:integer; } }}

Human.nenoowl:DatatypeProperty

neno:Method

owl:Class

Page 40: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Some interesting constructs in Neno (part 1).

• Multi-instance fields.

• Set, set plus, set minus, set clear.

xsd:string name[1];lanl:Human hasFriend[0..*];xsd:date graduated[0..1];

this.name = “marko”^^xsd:string;this.hasFriend =+ lanl:johan;this.hasFriend =- lanl:johan;this.hasFriend =\;

Page 41: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Some interesting constructs in Neno (part 2).

• Inverse field referencing (dot-dot notation).

• Inverse method invocation (dot-dot notation).

// returns the name of all // lanl:Humans that have this// as a friend. this..hasFriend.name;

this..hasFriend.example(“7”^^xsd:int);

Page 42: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Fhat triple-code.

owl:Thing demo:Human{ xsd:integer example(xsd:string a) { if(a == "marko"^^xsd:string) { return "1"^^xsd:integer; } else { return "2"^^xsd:integer; } }}

Instantiates to

Page 43: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Fhat RVM.

PC (current instruction)

Method variables

LIFO Stack

Page 44: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The operand stack.

x = 1 + (2 * 3)

Page 45: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The Fhat state and the Fhat process.

• The Semantic Web is a data structure. It does not have the ability to compute itself in and of itself.

o The Semantic Web represents the state of the Fhat RVM.o An external process evolves the state of the Fhat RVM.

- It’s a while(!halt) loop with no state.

Page 46: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

General system architecture.

Neno source code

Fhat triple-code

Fhat RDF Virtual Machine

Native Machine Code

?Other Virtual Machine?

With Fhat, the state of the RVM is maintained in the triple-store. An external process evolves the state of the machine and thus, computes.

Fhat RDF State

Fhat RDF Process

Page 47: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

General system architecture.

Page 48: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

r-Fhat.

• r-Fhat stands for “reduced Fhat”.• The virtual machine’s state is harvested from the triple-store and represented in

main memory of the underlying hardware machine.• When the hardware representation has completed execution or is halted, it can

be re-represented as RDF and inserted back into the triple-store.• Benefit? Significantly faster.

Triple-store

Fhat Process

Triple-store

Fhat Process

Triple-store

Fhat Process

SELECT/DELETE out Fhat state INSERT in Fhat state

TIME

Triple-store

Fhat Process

Execute.

Page 49: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Benefits and drawbacks of this computing model.

• + The World Wide Web provides the infrastructure to distribute human consumable information (e.g. web-pages, scholarly articles). The Semantic Web now provides an infrastructure to distribute machine consumable models (e.g. system models, algorithms, and computing machines.)

• - Various levels of computing indirection using this model -- thus slower than the JVM model of computing and therefore, the machine-level model.

• - Lots of read/writes for triple-store computing. Slow.o Hence r-Fhat.

• + Everything is represented in RDF. The data, the code, and the computing machines. A “pure URI” computing environment. No change of syntax.

• + Easy to distribute software and computing machines. Both Fhat triple-code and Fhat RVM instances can be represented in an RDF/XML file and HTTP “GETTED” or “SELECTED” out of a triple-store.

• - “Triple bloat”. Everything is in RDF. o Or an RDF-wonderland.

• + A completely distributed computing environment with an address space of all URIs (…which is an infinite space).

Page 50: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

More interesting aspects of the RVM model.

• no distinction between main memory and the disk drive because everything is in the Semantic Web.• the Semantic Web is no longer a information gathering infrastructure, but a distributed information

processing infrastructure (the process can move to the data, the data doesn't have to move to the process).• the RVM can be distributed in mid-process across physical machines. No state in the RVM process.• easy to save the evolution (i.e. history) of an RVM (its state is saved in RDF).• RDF programs and RVMs are “first-class" web-entities (e.g. RDF/XML).• maintains the “write once, run anywhere" paradigm of Java.• because the underlying data structure is a semantic network, languages built on this idea can have unique

constructs not found in other languages (e.g. inverse field referencing, multi-instance fields, field querying, etc.).

• there already exists an infrastructure to support the paradigm and thus, requires very little investment by the community (triple-stores, ontology modeling languages, query languages, etc.).

• an RVM can be engineered at any level of complexity (move the complexity to the software implementing the RVM to ease machine architecture development and increase running time). E.g. r-Fhat.

• language reflection at the API, software, and RVM level (everything is represented in RDF).• removes the stack of representation (triple-code can manipulate the RVM that is manipulating the triple-

code).• the RVM is an object much like any other object in an object-oriented programming environment (the RVM

can call methods on itself).• any object can have the property of an RVM and thus, any object can be its own processor (easy to thread

objects).

Page 51: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 52: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Some Neno/Fhat computing models.

• The Open Computing Model.o Supports the distribution of not only data, but processes and

computing machines.

• The SandBox Model.o The “SETI@Home” distributed computing model.o The process can move to the data, the data need not move to the

process.

• The Evolutionary Computing Model.o Pure URI computing environment supports completely reflective

computing.o Esoteric computing.

Page 53: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The open computing model.

• The World Wide Web allows for the distribution of information -- web pages and scholarly articles.The Neno/Fhat Semantic Web allows for the distribution of processes -- data sets (current Semantic Web), algorithms, and computing machines.

• Open Data (note FreeBase http://www.freebase.com)o “Numerous scientists have pointed out the irony that right at the historical moment

when we have the technologies to permit worldwide availability and distributed process of scientific data, broadening collaboration and accelerating the pace and depth of discovery…..we are busy locking up that data and preventing the use of correspondingly advanced technologies on knowledge.” - Wikipedia

• Open Process allows for the distribution of not only data sets but the algorithms that operate on those data sets. Representing everything in the same substrate allows for an easy commingling and distribution of these various computing components (Open Computing).

Page 54: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Open computing and Java vs. Neno.

• In Java, code is written to a particular data model.o Data can have any number of formats

- CSV, some XML format, relational database, binary, etc.

• In Neno, code is written to a particular ontology, not a particular data model.

o If data obeys that ontology, that Neno code will work for it.o There is a stronger sense of ontology reuse in the Semantic Web

then in the relational database realm.

- For example: FOAF, DOAP, DublinCore, ATOM, etc.o A stronger sense of application re-use for different data sets.

Page 55: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The sandbox model.

• Servers can host a “Fhat-Farm”.o Fhat RVMs and triple-code can be pushed into the farm and

get allocated cycles to work with the server’s data set.o The process moves to the data, the data doesn’t move to the

process.

Server triple-store

Fhat Farm

INS

ER

T/S

EL

EC

T

Page 56: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Named graphed sandboxes.

• A Fhat and its triple-code is allocated a named graph to execute its process.

o Any Fhat can read from the entire triple-store, but can only write/delete to its allocated graph(s).

o Computing model is protected against malicious or poorly written code.

Fhat Graph UUID:1

Fhat Graph UUID:2

Fhat Graph UUID:3

Page 57: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Link data and the sandbox model.

• RDF network points to location of next “link in the network”.

• Processes can move between servers and work with various local data sets for their global computation.

www.domainB.org

Triple-store

www.domainA.org

Triple-store

www.domainC.org

Triple-store

t=1

t=2

t=3

INSERTINSERT

Page 58: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The sandbox model and Java vs. Neno.

• Java is “unsafe”.o Awkward to distribute .class files to a particular data server.o Publishing relational database schemas isn’t the norm.o Threads are not easily managed unless written to the server’s API.

• Neno has no concept of the underlying machine (chip or drives). It is machine safe.

o Easy to INSERT/SELECT machines/algorithms into and out of triple-stores.o One protocol (e.g. SPARQL\Update) for all communication.

Page 59: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

The evolutionary computing model.

Everything is a URI. A Fhat RVM can get a pointer to itself and thus, process itself.

Page 60: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

A birds-eye view of the Neno/Fhat Semantic Web.

www.lanl.gov

www.domainC.com

www.mesur.org

<rdf></rdf>

www.domainA.com

www.domainB.com

<rdf></rdf>

www.domainD.com

Triple-store

Triple-store

Triple-store

Triple-store

Web-server

Web-server

application

RVM

Fhat Process

Fhat Process

Fhat Process

Linked Data

Page 61: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Overview

Introduction to semantic networks

A quick Semantic Web tutorial

A quick object-oriented/virtual machine tutorial

Neno the language and Fhat the virtual machine

Practical applications

Conclusion

Page 62: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Where is Neno/Fhat now?

• Nenofhat compiler is written in Java 1.5+ using ANTLR 2.7.o Compiles Neno human source code to an OWL Fhat API.

• Fhat RVM process is written in Lisp for the AllegroGraph triple-store.o Nearly supports r-Fhat.

Page 63: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Where does Neno/Fhat want to go?

• Nenofhat compiler is written in Java 1.5+ using ANTLR 3.0.o Compiles Neno human source code to an OWL Fhat API.o Increase the functionality of the compiler.

- Code optimization.- Debugging support.- NenoDoc capabilities.

– NenoDoc is a publishable ontology (OWLDoc).

• Fhat RVM process is written in Lisp for the AllegroGraph triple-store.o Completely support r-Fhat.o Support the SAIL interface for other triple-store providers.o Support web-based harvesting (non-triple-store computing).

- ?WebDav?

• Develop a solid, core Neno API for developers.

• Locate Semantic Web projects and work with them to implement some Neno-based software.

o Work with the Linked Data people to realize powerful application scenarios.

Page 64: Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specification

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.Marko A. Rodriguez and Ryan Chute

Los Alamos National Laboratory - Research Library Public Lecture

Questions?

Neno/Fhat is at http://neno.lanl.gov

Many thanks to the LANL Research Library for their support.