XAYA -- Thinking with Data | ||||||||
| Line: 21 to 21 | ||||||||
|---|---|---|---|---|---|---|---|---|
| To learn more about working in this TWiki, please go to HarmenyTWikiGuest | ||||||||
| Added: | ||||||||
| > > |
The information on this page is more technical in nature, a "developers journal" of ideas going into XAYA. A simpler, user friendly introduction to XAYA that doesen't assume Python or Programming knowledge is at: XAYAXaYa | |||||||
| This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples (code's going to be fairly thoroughly reworked this weekend -- mb Sept 30, 2004). Original PSF Grant Application | ||||||||
XAYA -- Thinking with Data | ||||||||
| Line: 19 to 19 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Return to WebHome | ||||||||
| Changed: | ||||||||
| < < |
To learn more about working in this TWiki go to HarmenyTWikiGuest | |||||||
| > > |
To learn more about working in this TWiki, please go to HarmenyTWikiGuest | |||||||
| This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples (code's going to be fairly thoroughly reworked this weekend -- mb Sept 30, 2004). | ||||||||
XAYA -- Thinking with Data | ||||||||
| Line: 31 to 31 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
| ||||||||
XAYA -- Thinking with Data | ||||||||||
| Line: 31 to 31 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
| Changed: | ||||||||||
| < < |
| |||||||||
| > > |
| |||||||||
| If you have questions and/or if you're interested in contributing to the XAYA project, drop me a line at mishtu@harmeny.com with "XAYA" in the subject line | ||||||||||
| Line: 41 to 43 | ||||||||||
| Changed: | ||||||||||
| < < |
-- MishtuBanerjee - 13 Oct 2004 | |||||||||
| > > |
-- MishtuBanerjee - 01 Nov 2004 | |||||||||
XAYAvision | ||||||||||
| Line: 529 to 531 | ||||||||||
| These are some initial code, developed to illustrate ideas for XAYA in its initial iteration. These should not be taken as the final code, for the first iteration, but really a working out of code conventions and initial command line interface via proto-typing. Expect the code to be updated every few days. Top link, is most recent version of code (so one gets a running view of the developing style). Current conventions are to use a test-first development style (define unit tests, write code)via unittest module, a pseudo-literate coding style that provides documentation of any algorithms used, and references to code sources, and finally incorporation of usage examples via docTest module. Code is currently more verbose than it needs to be, and will get stripped down. Try and balance conciseness and clarity. (emphasis on "try"). | ||||||||||
| Added: | ||||||||||
| > > |
| |||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Line: 575 to 589 | ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Line: 588 to 603 | ||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
| |||||||||
XAYA -- Thinking with Data | ||||||||
| Line: 19 to 19 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Return to WebHome | ||||||||
| Added: | ||||||||
| > > |
To learn more about working in this TWiki go to HarmenyTWikiGuest | |||||||
| This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples (code's going to be fairly thoroughly reworked this weekend -- mb Sept 30, 2004). Original PSF Grant Application | ||||||||
| Line: 31 to 33 | ||||||||
Current Code, Data, and Testing Examples (see bottom of page for more code and usage examples)
| ||||||||
| Added: | ||||||||
| > > |
If you have questions and/or if you're interested in contributing to the XAYA project, drop me a line at mishtu@harmeny.com with "XAYA" in the subject line | |||||||
XAYA -- Thinking with Data | ||||||||||
| Line: 28 to 28 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
| Added: | ||||||||||
| > > |
Current Code, Data, and Testing Examples (see bottom of page for more code and usage examples)
| |||||||||
| Line: 129 to 131 | ||||||||||
| A more detailed discussion will be placed later at XAYAConceptsExplained | ||||||||||
| Changed: | ||||||||||
| < < |
||||||||||
| > > |
| |||||||||
| Line: 522 to 525 | ||||||||||
| These are some initial code, developed to illustrate ideas for XAYA in its initial iteration. These should not be taken as the final code, for the first iteration, but really a working out of code conventions and initial command line interface via proto-typing. Expect the code to be updated every few days. Top link, is most recent version of code (so one gets a running view of the developing style). Current conventions are to use a test-first development style (define unit tests, write code)via unittest module, a pseudo-literate coding style that provides documentation of any algorithms used, and references to code sources, and finally incorporation of usage examples via docTest module. Code is currently more verbose than it needs to be, and will get stripped down. Try and balance conciseness and clarity. (emphasis on "try"). | ||||||||||
| Added: | ||||||||||
| > > |
| |||||||||
| ||||||||||
| Line: 562 to 568 | ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Line: 573 to 582 | ||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
| |||||||||
XAYA -- Thinking with Data | ||||
XAYA -- Thinking with Data | ||||||||
| Line: 39 to 39 | ||||||||
|---|---|---|---|---|---|---|---|---|
XAYAvision | ||||||||
| Changed: | ||||||||
| < < |
In A Nutshell. XAYA is to be a Pythonic logic-based mini- language for thinking with data, and this site is to document the creation of XAYA as an extended tutorial of “Thinking with Data in Python”. Thinking with Data is a trial-and-error process of exploration of relationships amongst data (in this case “data” can mean everything from numerical observations, to semantic ontologies). One asks questions (queries), one gets answers (query result sets). Is the answer what you expected? No? Revise, and repeat. A great deal of planning, “business intelligence” and analysis work in various industries requires just such “thinking with data”, where questions become iteratively refined based on previous results. One of XAYA’s key goals is to provide a framework that can introduce Python to that business environment, and in particular to planners and analysts who are not primarily programmers, but who are required to reason with complex data and make valid inferences. | |||||||
| > > |
In A Nutshell: XAYA is to be a Pythonic logic-based mini- language for thinking with data, and this site is to document the creation of XAYA as an extended tutorial of “Thinking with Data in Python”. Thinking with Data is a trial-and-error process of exploration of relationships amongst data (in this case “data” can mean everything from numerical observations, to semantic ontologies). One asks questions (queries), one gets answers (query result sets). Is the answer what you expected? No? Revise, and repeat. A great deal of planning, “business intelligence” and analysis work in various industries requires just such “thinking with data”, where questions become iteratively refined based on previous results. One of XAYA’s key goals is to provide a framework that can introduce Python to that business environment, and in particular to planners and analysts who are not primarily programmers, but who are required to reason with complex data and make valid inferences. | |||||||
| XAYA is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". | ||||||||
| Line: 52 to 54 | ||||||||
| Changed: | ||||||||
| < < |
A Language for thinking with data. Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Here's a brief overview of the details we end up worrying about when thinking about data (as a prelude to thinking with data) | |||||||
| > > |
A Language for thinking with data: Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Here's a brief overview of the details we end up worrying about when thinking about data (as a prelude to thinking with data) | |||||||
| First we have to worry about "what format the data is in, and how to access it". Is the data in a database? Is it in XML format? Is there a DTD, a Schema? | ||||||||
| Line: 73 to 77 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for XAYA. One day, I was talking to a friend, and trying to explain the technical ideas behind XAYA. Graphs. Analysis Patterns. Declarative Languages. Yada Yada Yada. I watched his eyes begin to glaze over. Desperately, I said, "well it's really about freedom, simplicity, connection". The pupils shifted back into focus a bit. "What do you mean". Well freedom as in freedom to explore. In the limited field of data and information -- how do we give people that freedom to explore. Simplicity -- as in make it as simple as possible and no simpler. Connection as in, connecting pieces of information together -- being able to link the pieces in a chain of thought from instances to ontologies. And then it struck me. Freedom-simplicity-connection, are not technical points, but my hopes for the kind of community spirit that might grow around such a project. Who has information they need to organize? Well, businesses of course, with their enterprise information systems. Scientists with large collaborative research projects. Those are the obvious ones. But what about poets building models of simile. Visual artists organizing scraps of imagery for future transformations. Can we build a system that attracts not only software engineers, data analysts and "domain specialists", but reaches out to poets, painters, singers, dancers, recipe collectors, stamp savers, the persistently forgetful ..... | |||||||
| > > |
Freedom, Simplicity, Connection: These three words summarize the spirit behind the vision for XAYA. One day, I was talking to a friend, and trying to explain the technical ideas behind XAYA. Graphs. Analysis Patterns. Declarative Languages. Yada Yada Yada. I watched his eyes begin to glaze over. Desperately, I said, "well it's really about freedom, simplicity, connection". The pupils shifted back into focus a bit. "What do you mean". Well freedom as in freedom to explore. In the limited field of data and information -- how do we give people that freedom to explore. Simplicity -- as in make it as simple as possible and no simpler. Connection as in, connecting pieces of information together -- being able to link the pieces in a chain of thought from instances to ontologies. And then it struck me. Freedom-simplicity-connection, are not technical points, but my hopes for the kind of community spirit that might grow around such a project. Who has information they need to organize? Well, businesses of course, with their enterprise information systems. Scientists with large collaborative research projects. Those are the obvious ones. But what about poets building models of simile. Visual artists organizing scraps of imagery for future transformations. Can we build a system that attracts not only software engineers, data analysts and "domain specialists", but reaches out to poets, painters, singers, dancers, recipe collectors, stamp savers, the persistently forgetful ..... To meet this vision, requires balancing very general concepts about knowledge, information and logic with specific details of query systems, data mini-language design, specific data formats ...... The goal is to balance high level and low level perspectives, and avoid collisions between those perspectives. In the end, we must hide the details from those who don't need them; and make them exposable to those who do. When the software engineering's "How" begins to struggle with the logician's "What" and the humanist's "Why Not!", perhaps it is time for poetry to intervene. Indeed, Richard Gabriel in a recent interview on the Sun site has called for an MFA in The Poetry of Programming. | |||||||
| Changed: | ||||||||
| < < |
To meet this vision, requires balancing very general concepts about knowledge, information and logic with specific details of query systems, data mini-language design, specific data formats ...... The goal is to balance high level and low level perspectives, and avoid collisions between those perspectives. In the end, we must hide the details from those who don't need them; and make them exposable to those who do. When the software engineering's "How" begins to struggle with the logician's "What" and the humanist's "Why Not!", perhaps it is time for poetry to intervene: | |||||||
| > > |
In that poetic spirit, here is a small metaphoric guidance algorithm: | |||||||
| Algorithm for Collision Avoidance | ||||||||
XAYA -- Thinking with Data | ||||||||
| Line: 73 to 73 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Changed: | ||||||||
| < < |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for XAYA. One day, I was talking to a friend, and trying to explain the technical ideas behind XAYA. Graphs. Analysis Patterns. Declarative Languages. Yada Yada Yada. I watched his eyes begin to glaze over. Desperately, I said, "well it's really about freedom, simplicity, connection". The pupils shifted back into focus a bit. "What do you mean". Well freedom as in freedom to explore. In the limited field of data and information -- how do we give people that freedom to explore. Simplicity -- as in make it as simple as possible and no simpler. Connection as in, connecting pieces of information together -- being able to link the pieces in a chain of thought from instances to ontologies. And then it struck me. Freedom-simplicity-connection, are not technical points, but my hopes for the kind of community spirit that might grow around such a project. | |||||||
| > > |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for XAYA. One day, I was talking to a friend, and trying to explain the technical ideas behind XAYA. Graphs. Analysis Patterns. Declarative Languages. Yada Yada Yada. I watched his eyes begin to glaze over. Desperately, I said, "well it's really about freedom, simplicity, connection". The pupils shifted back into focus a bit. "What do you mean". Well freedom as in freedom to explore. In the limited field of data and information -- how do we give people that freedom to explore. Simplicity -- as in make it as simple as possible and no simpler. Connection as in, connecting pieces of information together -- being able to link the pieces in a chain of thought from instances to ontologies. And then it struck me. Freedom-simplicity-connection, are not technical points, but my hopes for the kind of community spirit that might grow around such a project. Who has information they need to organize? Well, businesses of course, with their enterprise information systems. Scientists with large collaborative research projects. Those are the obvious ones. But what about poets building models of simile. Visual artists organizing scraps of imagery for future transformations. Can we build a system that attracts not only software engineers, data analysts and "domain specialists", but reaches out to poets, painters, singers, dancers, recipe collectors, stamp savers, the persistently forgetful .....
To meet this vision, requires balancing very general concepts about knowledge, information and logic with specific details of query systems, data mini-language design, specific data formats ...... The goal is to balance high level and low level perspectives, and avoid collisions between those perspectives. In the end, we must hide the details from those who don't need them; and make them exposable to those who do. When the software engineering's "How" begins to struggle with the logician's "What" and the humanist's "Why Not!", perhaps it is time for poetry to intervene:
Algorithm for Collision Avoidance
the specifics and the generals
are like a flock of birds and their shadow
within the flock each bird is particular, isolate
| |||||||
XAYA -- Thinking with Data | ||||
XAYA -- Thinking with Data | ||||||||
| Line: 41 to 41 | ||||||||
|---|---|---|---|---|---|---|---|---|
| In A Nutshell. XAYA is to be a Pythonic logic-based mini- language for thinking with data, and this site is to document the creation of XAYA as an extended tutorial of “Thinking with Data in Python”. Thinking with Data is a trial-and-error process of exploration of relationships amongst data (in this case “data” can mean everything from numerical observations, to semantic ontologies). One asks questions (queries), one gets answers (query result sets). Is the answer what you expected? No? Revise, and repeat. A great deal of planning, “business intelligence” and analysis work in various industries requires just such “thinking with data”, where questions become iteratively refined based on previous results. One of XAYA’s key goals is to provide a framework that can introduce Python to that business environment, and in particular to planners and analysts who are not primarily programmers, but who are required to reason with complex data and make valid inferences. | ||||||||
| Added: | ||||||||
| > > |
XAYA is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". | |||||||
| Deleted: | ||||||||
| < < |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for XAYA. XAYA is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". | |||||||
| Changed: | ||||||||
| < < |
XAYA takes that basic idea "a query is a path through a graph" and generalizes it so that the query engine no longer is concerned about a particular storage format (such as relational databases, XML, RDF etc). One should focus on the information, and it's inherent relationships, rather than underlying format. In this context, we want to try and apply a set of design principles that are focussed on Logic, Abstraction, Graphs, Language. | |||||||
| > > |
XAYA's goal is to take that basic idea "a query is a path through a graph" and generalizes it so that the query engine no longer is concerned about a particular storage format (such as relational databases, XML, RDF etc). One should focus on the information, and it's inherent relationships, rather than underlying format. In this context, we want to try and apply a set of design principles that are focussed on Logic, Abstraction, Graphs, Language. | |||||||
| An earlier version of this idea was implemented in LifeLine an application that focussed on representing databases as "tree-like" graphs, and allowed the user to query a database in fairly sophisticated ways without requiring knowledge of the underlying database structure, SQL, etc. At it's centre was a query engine that translates between what the user has selected as a "scenario", a graph representation of the data, and the SQL needed to obtain the "scenario" from a relational database. | ||||||||
| Added: | ||||||||
| > > |
||||||||
| A Language for thinking with data. Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Here's a brief overview of the details we end up worrying about when thinking about data (as a prelude to thinking with data) First we have to worry about "what format the data is in, and how to access it". Is the data in a database? Is it in XML format? Is there a DTD, a Schema? | ||||||||
| Line: 70 to 73 | ||||||||
| ||||||||
| Added: | ||||||||
| > > |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for XAYA. One day, I was talking to a friend, and trying to explain the technical ideas behind XAYA. Graphs. Analysis Patterns. Declarative Languages. Yada Yada Yada. I watched his eyes begin to glaze over. Desperately, I said, "well it's really about freedom, simplicity, connection". The pupils shifted back into focus a bit. "What do you mean". Well freedom as in freedom to explore. In the limited field of data and information -- how do we give people that freedom to explore. Simplicity -- as in make it as simple as possible and no simpler. Connection as in, connecting pieces of information together -- being able to link the pieces in a chain of thought from instances to ontologies. And then it struck me. Freedom-simplicity-connection, are not technical points, but my hopes for the kind of community spirit that might grow around such a project. | |||||||
| ||||||||
| Changed: | ||||||||
| < < |
XAYAThinkingWithData | |||||||
| > > |
XAYA -- Thinking with Data | |||||||
| Added: | ||||||||
| > > |
XAYAvision: "Freedom Simplicity Connection" | |||||||
| Added: | ||||||||
| > > |
XAYAcore: "A Language for Thinking with Data" | |||||||
| Deleted: | ||||||||
| < < |
XAYAcore: "A Language for Thinking with Data" | |||||||
| Deleted: | ||||||||
| < < |
XAYAvision: "Freedom Simplicity Connection" | |||||||
| Line: 28 to 28 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Deleted: | ||||||||
| < < |
Some Preliminary Concepts Explained Visually | |||||||
| Deleted: | ||||||||
| < < |
Based on feedback on this site from some friends who are not primarily programmers, it was suggested I create some visual introductions to the key concepts which assume no background in programming jargon to begin with:
| |||||||
| Deleted: | ||||||||
| < < |
The idea of "thinking with graphs" is illustrated in:
| |||||||
| Changed: | ||||||||
| < < |
Over the next week, I'll develop two more visual intro's to the other two topics. | |||||||
| > > |
||||||||
| -- MishtuBanerjee - 13 Oct 2004 | ||||||||
| Changed: | ||||||||
| < < |
XAYAvision | |||||||
| > > |
XAYAvisionIn A Nutshell. XAYA is to be a Pythonic logic-based mini- language for thinking with data, and this site is to document the creation of XAYA as an extended tutorial of “Thinking with Data in Python”. Thinking with Data is a trial-and-error process of exploration of relationships amongst data (in this case “data” can mean everything from numerical observations, to semantic ontologies). One asks questions (queries), one gets answers (query result sets). Is the answer what you expected? No? Revise, and repeat. A great deal of planning, “business intelligence” and analysis work in various industries requires just such “thinking with data”, where questions become iteratively refined based on previous results. One of XAYA’s key goals is to provide a framework that can introduce Python to that business environment, and in particular to planners and analysts who are not primarily programmers, but who are required to reason with complex data and make valid inferences. | |||||||
| Changed: | ||||||||
| < < |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for Xaya. Xaya is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". An earlier version of this idea was inplemented in LifeLine an application that focussed on representing databases as "tree-like" graphs, and allowing the user to query a database in fairly sophisticated ways without requiring knowledge of the underlying database structure, SQL, etc. At it's centre was a query engine that translates between what the user has selected as a "scenario", a graph representation of the data, and the SQL needed to obtain the "scenario" from a relational database. | |||||||
| > > |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for XAYA. XAYA is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". | |||||||
| XAYA takes that basic idea "a query is a path through a graph" and generalizes it so that the query engine no longer is concerned about a particular storage format (such as relational databases, XML, RDF etc). One should focus on the information, and it's inherent relationships, rather than underlying format. In this context, we want to try and apply a set of design principles that are focussed on Logic, Abstraction, Graphs, Language. | ||||||||
| Added: | ||||||||
| > > |
An earlier version of this idea was implemented in LifeLine an application that focussed on representing databases as "tree-like" graphs, and allowed the user to query a database in fairly sophisticated ways without requiring knowledge of the underlying database structure, SQL, etc. At it's centre was a query engine that translates between what the user has selected as a "scenario", a graph representation of the data, and the SQL needed to obtain the "scenario" from a relational database. | |||||||
| A Language for thinking with data. Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Here's a brief overview of the details we end up worrying about when thinking about data (as a prelude to thinking with data) | ||||||||
| Line: 61 to 59 | ||||||||
| Point one to three all concern some of the challenges of navigating through information, in search of meaning. Navigating through information is like the early days of the automobile -- where one has to be half-engineer, simply to drive. XAYA's goal is to support the idea of "just driving" and focussing on your understanding of information in a particular field (be it an area of business, science, history, etc). As such XAYA focusses on allowing you to model your knowledge, and link it to existing data, and supports exploratory reasoning about relationships amongst information, in short, "Thinking with Data". More formally, "Logic". | ||||||||
| Deleted: | ||||||||
| < < |
XAYA is to be a Pythonic logic-based mini- language for thinking with data, and to document the creation of that language as an extended tutorial of “Thinking with Data in Python”. Thinking with Data is a trial-and-error process of exploration of relationships amongst data (in this case “data” can mean everything from numerical observations, to semantic ontologies). One asks questions (queries), one gets answers (query result sets). Is the answer what you expected? No? Revise, and repeat. A great deal of planning, “business intelligence” and analysis work in various industries requires just such “thinking with data”, where questions become iteratively refined based on previous results. One of XAYA’s key goals is to provide a framework that can introduce Python to that business environment, and in particular to planners and analysts who are not primarily programmers, but who are required to reason with complex data and make valid inferences. | |||||||
| Deleted: | ||||||||
| < < |
XAYA is built up from three elements:
| |||||||
| Added: | ||||||||
| > > |
XAYA is built up from three elements:
| |||||||
| Added: | ||||||||
| > > |
| |||||||
| Added: | ||||||||
| > > |
| |||||||
| Deleted: | ||||||||
| < < |
XAYAconcepts | |||||||
| Deleted: | ||||||||
| < < |
Write up on October 1, 2004 | |||||||
| Deleted: | ||||||||
| < < |
Ascendency -- Original biological motivation -- from study of ecosystems as "networks of interaction". Bob Ulanowicz's information theoretic framework for quantifying ecosystem dynamics. Realization same ideas could be transferred over from biology networks to "computer networks". | |||||||
| Changed: | ||||||||
| < < |
GAL -- Boolean, Nested Boolean, Predicate Logic as graphs. | |||||||
| > > |
XAYAconcepts | |||||||
| Changed: | ||||||||
| < < |
Query Languages and Logic Programming | |||||||
| > > |
Based on feedback on this site from some friends who are not primarily programmers, it was suggested I create some visual introductions to the key concepts which assume no background in programming jargon to begin with:
| |||||||
| Changed: | ||||||||
| < < |
So Called Rules Engines | |||||||
| > > |
A more detailed discussion will be placed later at XAYAConceptsExplained | |||||||
| Deleted: | ||||||||
| < < |
Extended Discussion of Analysis Patterns, and idea of Analysis Meta-Patterns. | |||||||
| Changed: | ||||||||
| < < |
XAYAcore Iteration001 Notes | |||||||
| > > |
XAYAcore Iteration001 Notes | |||||||
| These notes are transcribed from mb's XAYAjournal, and will be changed as the first implementation comes into being. Right now, I'm just getting the notes down as quickly and roughly as possible, so that both Tyler and I can use them. Based on the specification, we'll both build as many functions as interest us, and compare notes. Others viewing this site are also welcome to play, and post their work here | ||||||||
| Line: 97 to 101 | ||||||||
| XAYAcore???: "The simplest relational network that could possibly work???" | ||||||||
| Changed: | ||||||||
| < < |
XAYAPrinciples | |||||||
| > > |
XAYAPrinciples | |||||||
| ||||||||
| Line: 106 to 110 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
XAYAUseCase | |||||||
| > > |
XAYAUseCase | |||||||
| Changed: | ||||||||
| < < |
A minimal Use Case to begin with, illustrating a command line session: | |||||||
| > > |
A minimal Use Case to begin with, illustrating a command line session: | |||||||
| ||||||||
| Changed: | ||||||||
| < < |
Rough Procedure to support the Use Case | |||||||
| > > |
Rough Procedure to support the Use Case | |||||||
| ||||||||
| Line: 128 to 132 | ||||||||
| Note2 -- in terms of graph operations, this use case is assuming acyclic graphs (forests), rather than trees. So must deal with cases where there are multiple parents for a node, and hence possibility that for any 2 nodes, there can be > 1 path connecting them. | ||||||||
| Changed: | ||||||||
| < < |
Necessary Simplifications for first Iteration | |||||||
| > > |
Necessary Simplifications for first Iteration | |||||||
| These simplifications are to restrict the scope of the use case | ||||||||
| Line: 140 to 144 | ||||||||
| These simplifications make input, output of data to/from files fairly unproblematic, and simplify the nature of the graph traversal algorithms needed to find the path. Once we've got system working with these restrictions, can then begin to loosen them, and develop more general case of graph traversal algorithms. | ||||||||
| Changed: | ||||||||
| < < |
Minimal Scope Simplified Use Case | |||||||
| > > |
Minimal Scope Simplified Use Case | |||||||
| ||||||||
| Line: 153 to 157 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
XAYASubjectDataGraphs. | |||||||
| > > |
XAYASubjectDataGraphs. | |||||||
| What Does the Graph Mean? 8 Interpretations of DictionaryAsGraphs? to define a Knowledge Management System. | ||||||||
| Line: 183 to 187 | ||||||||
| XAYA convention will be to name data using the prefix of its interpretation first 4-5 letters. For example: dataTblPolygons, objeStand, measTblPolygons, modelInventory | ||||||||
| Changed: | ||||||||
| < < |
XayaSubjectDataGraphsExample? | |||||||
| > > |
XayaSubjectDataGraphsExample | |||||||
| To make this a little less abstract, a small Forest Inventory based example has been created. The example graphs are stored in the attached file "devcore_20040826.zip" which you can download here: | ||||||||
| Line: 191 to 195 | ||||||||
| Below follows an explanation of each graph, and the logical process by which we are working down from a high level Ontology to low level data models (or working up in reverse direction for that matter .... or working from the middle up and down, to be most accurate as to how it actually works in practice ... ). For those familiar with the history of data modelling that led to LifeLine ... the modelling process below can be called "Return of the Long Model" (prequel to The Database strikes back). | ||||||||
| Changed: | ||||||||
| < < |
XAYAFormat | |||||||
| > > |
XAYAFormat | |||||||
| Data is in text files in a format that can easily be converted to Python Dictionary structures where each line of a file has the following form: | ||||||||
| Line: 207 to 211 | ||||||||
| There will have to be fn's to inter-convert from the text format, DB tables, XML docs, Python Dictionaries. Python Dictionaries form the universal translater intermediate form for going between all other forms (ala Safe Software's appraoch to Semantic Translation). The whole thing made language independant via XML-RPC (which can handle dictionaries as structs). | ||||||||
| Changed: | ||||||||
| < < |
Project Level | |||||||
| > > |
Project Level | |||||||
| Contained in the following files: | ||||||||
| Line: 217 to 221 | ||||||||
Graphs_X001.txt
| ||||||||
| Changed: | ||||||||
| < < |
Semantics/Ontology Level | |||||||
| > > |
Semantics/Ontology Level | |||||||
| Contained in the following files: | ||||||||
| Line: 230 to 234 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
Structural level | |||||||
| > > |
Structural level | |||||||
| This is the part that corresponds to traditional data modelling in databases. These files are fairly close approximations of the LifeLine long model. There are three parrallel files, which have the same key-set, but whose values are different forms of meta-data. The structural level could be said to deal with "collections" and is above the level of individual instances of data. It corresponds to Relational Modelling, as it is usually understood. | ||||||||
| Line: 263 to 267 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
Mapping Semantics To Structures. | |||||||
| > > |
Mapping Semantics To Structures. | |||||||
| The object level, can be considered akin to abstract classes -- devoid of implementation. The Structural level, deals with the implementation as table, table-like structues (or alternatively in XML world, XML-like, or Schema conformant structures). | ||||||||
| Line: 277 to 281 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
Data Instance Level | |||||||
| > > |
Data Instance Level | |||||||
| The 11 graphs above are constant in form, and interpretation -- what changes is their contents -- which depend on the actual data (instances) being modelled at a low level). One could say instance information flows through the Structural and Semantic levels, which do not change in form. | ||||||||
| Line: 306 to 310 | ||||||||
| Changed: | ||||||||
| < < |
XAYAPredicateFunctions. | |||||||
| > > |
XAYAPredicateFunctions. | |||||||
| Functions that tell you something about a graph, a node, an edge. Currently there are twelve functions. If some of the functions can be defined in terms of others, we can reduce this list to a set of axiomatic functions. | ||||||||
| Line: 358 to 362 | ||||||||
| In addition to the general functions defined above, additional domain specific functions may be defined, using the general functions as their components. So, we are building "from the bottom up" several layers of language. For more on this, see the general article by Paul Graham on Programming Bottom Up | ||||||||
| Changed: | ||||||||
| < < |
XayaCoreSpecification | |||||||
| > > |
XayaCoreSpecification | |||||||
| Finally ..... The XAYA001 specification | ||||||||
| Line: 393 to 397 | ||||||||
| 15. killEdge(graphName, NodeName?) | ||||||||
| Changed: | ||||||||
| < < |
Some More Rough Algorithms | |||||||
| > > |
Some More Rough Algorithms | |||||||
| .... To be continued, as the implementation is worked out. | ||||||||
| Line: 402 to 406 | ||||||||
| Node Index Generation To generate an index such as 1.1, 1.2.1, etc, defining node locations in the graph. Once such an index is generated -- operations on it, can be easier than full graph-walking algorithms (which don't make any assumptions about the graph's structure. In particular, regular expressions on the lists of node indexes can be used to find the paths. | ||||||||
| Changed: | ||||||||
| < < |
XAYAObjects | |||||||
| > > |
XAYAObjects | |||||||
| Currently in the first iteration there are no "official" objects. Though obviously we are using some object oriented/relational hybrid thinking in our modelling approach. Ultimately, we may create an object such as DiGraph?(dict), inheriting from the built-in dictionary type. This is a bit different than some other approaches which usually proceed by defining node, edge classes, and several types of graphs: graph, digraph, tree. This leads to a menagery of Graph related objects. | ||||||||
| Line: 419 to 423 | ||||||||
| The current functions then become methods within this class. And subclassing can over-ride what they do, and add further methods. | ||||||||
| Changed: | ||||||||
| < < |
XAYALanguage | |||||||
| > > |
XAYALanguage | |||||||
| So far, we've defined the mini-language as a library in Python (i.e. we're using Python itself as a little language, in the manner illustrated in the Python Cookbook, pg 449, which also contains yet another graph implementation example). The next step, is to go further and actually extend the Python language. The notes here are some very preliminary ideas as to what such an extended language might look like. | ||||||||
| Line: 471 to 475 | ||||||||
| Changed: | ||||||||
| < < |
XAYAcode | |||||||
| > > |
XAYAcode | |||||||
| These are some initial code, developed to illustrate ideas for XAYA in its initial iteration. These should not be taken as the final code, for the first iteration, but really a working out of code conventions and initial command line interface via proto-typing. Expect the code to be updated every few days. Top link, is most recent version of code (so one gets a running view of the developing style). Current conventions are to use a test-first development style (define unit tests, write code)via unittest module, a pseudo-literate coding style that provides documentation of any algorithms used, and references to code sources, and finally incorporation of usage examples via docTest module. Code is currently more verbose than it needs to be, and will get stripped down. Try and balance conciseness and clarity. (emphasis on "try"). | ||||||||
| Line: 510 to 514 | ||||||||
|
| ||||||||
| Changed: | ||||||||
| < < |
XAYAThinkingWithData | |||||||
| > > |
||||||||
| ||||||||
XAYAThinkingWithData | ||||||||
| Line: 46 to 46 | ||||||||
|---|---|---|---|---|---|---|---|---|
XAYAvision | ||||||||
| Added: | ||||||||
| > > |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for Xaya. Xaya is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". An earlier version of this idea was inplemented in LifeLine an application that focussed on representing databases as "tree-like" graphs, and allowing the user to query a database in fairly sophisticated ways without requiring knowledge of the underlying database structure, SQL, etc. At it's centre was a query engine that translates between what the user has selected as a "scenario", a graph representation of the data, and the SQL needed to obtain the "scenario" from a relational database. | |||||||
| Added: | ||||||||
| > > |
XAYA takes that basic idea "a query is a path through a graph" and generalizes it so that the query engine no longer is concerned about a particular storage format (such as relational databases, XML, RDF etc). One should focus on the information, and it's inherent relationships, rather than underlying format. In this context, we want to try and apply a set of design principles that are focussed on Logic, Abstraction, Graphs, Language. | |||||||
| Deleted: | ||||||||
| < < |
A Language for thinking with data. Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Is the data in a database? Is it in XML format? Is there a DTD, a Schema? Which query mechanism do we use? Navigating through information is like the early days of the automobile -- where one has to be half-engineer, simply to drive. XAYA's goal is to support the idea of "just driving" and focussing on your understanding of information in a particular field (be it an area of business, science, history, etc). As such it supports allowing you to model your knowledge, and link it to existing data, and supports exploratory reasoning about relationships amongst information, in short, "Thinking with Data". More formally, "Logic". | |||||||
| Added: | ||||||||
| > > |
A Language for thinking with data. Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Here's a brief overview of the details we end up worrying about when thinking about data (as a prelude to thinking with data) | |||||||
| Changed: | ||||||||
| < < |
Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for Xaya. Xaya is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". An earlier version of this idea was inplemented in LifeLine an application that focussed on representing databases as "tree-like" graphs, and allowing the user to query a database in fairly sophisticated ways without requiring knowledge of the underlying database structure, SQL, etc. At it's centre was a query engine that translates between what the user has selected as a "scenario", a graph representation of the data, and the SQL needed to obtain the "scenario" from a relational database. | |||||||
| > > |
First we have to worry about "what format the data is in, and how to access it". Is the data in a database? Is it in XML format? Is there a DTD, a Schema? Second, we have to worry about "how do we query this data?". Which query mechanism do we use? How do we formulate the query? How do we query, if the relevant data is in several data sets? Third, it gets even more complicated. All the data we think is relevant might not be in a single database. It might not all be in a single location. How could we connect and consolidate multiple sources of data that are about "the same things". Point one to three all concern some of the challenges of navigating through information, in search of meaning. Navigating through information is like the early days of the automobile -- where one has to be half-engineer, simply to drive. XAYA's goal is to support the idea of "just driving" and focussing on your understanding of information in a particular field (be it an area of business, science, history, etc). As such XAYA focusses on allowing you to model your knowledge, and link it to existing data, and supports exploratory reasoning about relationships amongst information, in short, "Thinking with Data". More formally, "Logic". XAYA is to be a Pythonic logic-based mini- language for thinking with data, and to document the creation of that language as an extended tutorial of “Thinking with Data in Python”. Thinking with Data is a trial-and-error process of exploration of relationships amongst data (in this case “data” can mean everything from numerical observations, to semantic ontologies). One asks questions (queries), one gets answers (query result sets). Is the answer what you expected? No? Revise, and repeat. A great deal of planning, “business intelligence” and analysis work in various industries requires just such “thinking with data”, where questions become iteratively refined based on previous results. One of XAYA’s key goals is to provide a framework that can introduce Python to that business environment, and in particular to planners and analysts who are not primarily programmers, but who are required to reason with complex data and make valid inferences. | |||||||
| Changed: | ||||||||
| < < |
XAYA takes that basic idea "a query is a path through a graph" and generalizes it so that the query engine no longer is concerned about a particular storage format (such as relational databases, XML, RDF etc). One should focus on the information, and it's inherent relationships, rather than underlying format. In this context, we want to try and apply a set of design principles that are focussed on Logic, Abstraction, Graphs, Language. See XayaGal? (l = logic and/or language so Graph Abstraction Logic or Graph Abstraction language). | |||||||
| > > |
XAYA is built up from three elements:
| |||||||
| Deleted: | ||||||||
| < < |
The basic vision of Xaya is as a modular system that follows the Unix Design Principles, and Coheres to the core Modular Operators | |||||||
| Deleted: | ||||||||
| < < |
Unix Design principles:
| |||||||
XAYAThinkingWithData | ||||||||
| Line: 32 to 32 | ||||||||
|---|---|---|---|---|---|---|---|---|
Based on feedback on this site from some friends who are not primarily programmers, it was suggested I create some visual introductions to the key concepts which assume no background in programming jargon to begin with:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
XAYAThinkingWithData | |||||||||||||
| Line: 21 to 21 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples (code's going to be fairly thoroughly reworked this weekend -- mb Sept 30, 2004). | |||||||||||||
| Added: | |||||||||||||
| > > |
Original PSF Grant Application | ||||||||||||
| |||||||||||||
| Added: | |||||||||||||
| > > |
Revision to PSF Grant Application
| ||||||||||||
| Added: | |||||||||||||
| > > |
Some Preliminary Concepts Explained Visually | ||||||||||||
| Added: | |||||||||||||
| > > |
Based on feedback on this site from some friends who are not primarily programmers, it was suggested I create some visual introductions to the key concepts which assume no background in programming jargon to begin with:
| ||||||||||||
XAYAvision | |||||||||||||
| Line: 458 to 476 | |||||||||||||
| These are some initial code, developed to illustrate ideas for XAYA in its initial iteration. These should not be taken as the final code, for the first iteration, but really a working out of code conventions and initial command line interface via proto-typing. Expect the code to be updated every few days. Top link, is most recent version of code (so one gets a running view of the developing style). Current conventions are to use a test-first development style (define unit tests, write code)via unittest module, a pseudo-literate coding style that provides documentation of any algorithms used, and references to code sources, and finally incorporation of usage examples via docTest module. Code is currently more verbose than it needs to be, and will get stripped down. Try and balance conciseness and clarity. (emphasis on "try"). | |||||||||||||
| Added: | |||||||||||||
| > > |
| ||||||||||||
| |||||||||||||
| Line: 493 to 513 | |||||||||||||
XAYAThinkingWithData
| |||||||||||||
| Added: | |||||||||||||
| > > |
|||||||||||||
| |||||||||||||
| Line: 500 to 523 | |||||||||||||
| |||||||||||||
| Added: | |||||||||||||
| > > |
| ||||||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
XAYAThinkingWithData | ||||||||
| Line: 491 to 491 | ||||||||
|---|---|---|---|---|---|---|---|---|
XAYAThinkingWithData | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
XAYAThinkingWithData | ||||||||
| Line: 58 to 58 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Write up on October 1, 2004 | ||||||||
| Added: | ||||||||
| > > |
Ascendency -- Original biological motivation -- from study of ecosystems as "networks of interaction". Bob Ulanowicz's information theoretic framework for quantifying ecosystem dynamics. Realization same ideas could be transferred over from biology networks to "computer networks". | |||||||
| GAL -- Boolean, Nested Boolean, Predicate Logic as graphs. Query Languages and Logic Programming | ||||||||
| Line: 106 to 108 | ||||||||
| Note1 that we go from an unordered set of initial nodes as our input, to a list of ordered nodes as our final output (the path). I'm glossing what the translater has to do, so I can concentrate on the graph logic part. | ||||||||
| Changed: | ||||||||
| < < |
Note2 -- in terms of graph operations, this use case is more general than LifeLine, since it is assuming acyclic graphs (forests), rather than trees. | |||||||
| > > |
Note2 -- in terms of graph operations, this use case is assuming acyclic graphs (forests), rather than trees. So must deal with cases where there are multiple parents for a node, and hence possibility that for any 2 nodes, there can be > 1 path connecting them. | |||||||
Necessary Simplifications for first Iteration | ||||||||
| Line: 468 to 470 | ||||||||
|
| ||||||||
| Deleted: | ||||||||
| < < |
* psfgrantXAYA_ThinkingWithData_20040930.pdf: PSF Grant Proposal: XAYA Thinking With Data | |||||||
| Line: 490 to 490 | ||||||||
|
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
XAYAThinkingWithData
| |||||||
| ||||||||
| |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < |
| ||||||||||||||||||
| > > |
| ||||||||||||||||||
XAYAThinkingWithData | |||||||||||||||||||
| Line: 478 to 478 | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Revised -- MishtuBanerjee - 30 Sep 2004 | |||||||||||||||||||
| Added: | |||||||||||||||||||
| > > |
| ||||||||||||||||||
| |||||||||||||||||||
| Added: | |||||||||||||||||||
| > > |
|||||||||||||||||||
| |||||||||||||||||||
| Added: | |||||||||||||||||||
| > > |
| ||||||||||||||||||
| |||||||||||||
| Added: | |||||||||||||
| > > |
| ||||||||||||
XAYAThinkingWithData | |||||||||||||
| Deleted: | |||||||||||||
| < < |
XAYAcore: "A Language for Thinking with Data" | ||||||||||||
| Changed: | |||||||||||||
| < < |
XAYAvision: "Freedom Simplicity Connection" | ||||||||||||
| > > |
XAYAcore: "A Language for Thinking with Data"XAYAvision: "Freedom Simplicity Connection" | ||||||||||||
| Line: 17 to 26 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Changed: | |||||||||||||
| < < |
XAYAvision | ||||||||||||
| > > |
XAYAvision | ||||||||||||
| Line: 44 to 53 | |||||||||||||
| |||||||||||||
| Deleted: | |||||||||||||
| < < |
Imagine Xaya as a set of concentric circles (ripples in a pond). | ||||||||||||
| Changed: | |||||||||||||
| < < |
| ||||||||||||
| > > |
XAYAconceptsWrite up on October 1, 2004 GAL -- Boolean, Nested Boolean, Predicate Logic as graphs. | ||||||||||||
| Added: | |||||||||||||
| > > |
Query Languages and Logic Programming | ||||||||||||
| Changed: | |||||||||||||
| < < |
| ||||||||||||
| > > |
So Called Rules Engines | ||||||||||||
| Changed: | |||||||||||||
| < < |
| ||||||||||||
| > > |
Extended Discussion of Analysis Patterns, and idea of Analysis Meta-Patterns. | ||||||||||||
| Changed: | |||||||||||||
| < < |
XAYAcore Iteration001 Notes | ||||||||||||
| > > |
XAYAcore Iteration001 Notes | ||||||||||||
| These notes are transcribed from mb's XAYAjournal, and will be changed as the first implementation comes into being. Right now, I'm just getting the notes down as quickly and roughly as possible, so that both Tyler and I can use them. Based on the specification, we'll both build as many functions as interest us, and compare notes. Others viewing this site are also welcome to play, and post their work here | |||||||||||||
| Line: 74 to 77 | |||||||||||||
| XAYAcore???: "The simplest relational network that could possibly work???" | |||||||||||||
| Changed: | |||||||||||||
| < < |
XayaPrinciples? | ||||||||||||
| > > |
XAYAPrinciples | ||||||||||||
| |||||||||||||
| Line: 83 to 86 | |||||||||||||
| |||||||||||||
| Changed: | |||||||||||||
| < < |
XAYAUseCase? | ||||||||||||
| > > |
XAYAUseCase | ||||||||||||
A minimal Use Case to begin with, illustrating a command line session:
| |||||||||||||
| Line: 130 to 133 | |||||||||||||
| |||||||||||||
| Changed: | |||||||||||||
| < < |
XAYASubjectDataGraphs?. | ||||||||||||
| > > |
XAYASubjectDataGraphs. | ||||||||||||
| What Does the Graph Mean? 8 Interpretations of DictionaryAsGraphs? to define a Knowledge Management System. | |||||||||||||
| Line: 164 to 167 | |||||||||||||
| To make this a little less abstract, a small Forest Inventory based example has been created. The example graphs are stored in the attached file "devcore_20040826.zip" which you can download here: | |||||||||||||
| Changed: | |||||||||||||
| < < |
| ||||||||||||
| > > |
| ||||||||||||
| Below follows an explanation of each graph, and the logical process by which we are working down from a high level Ontology to low level data models (or working up in reverse direction for that matter .... or working from the middle up and down, to be most accurate as to how it actually works in practice ... ). For those familiar with the history of data modelling that led to LifeLine ... the modelling process below can be called "Return of the Long Model" (prequel to The Database strikes back). | |||||||||||||
| Line: 283 to 286 | |||||||||||||
| Changed: | |||||||||||||
| < < |
XAYAPredicateFunctions?. | ||||||||||||
| > > |
XAYAPredicateFunctions. | ||||||||||||
| Functions that tell you something about a graph, a node, an edge. Currently there are twelve functions. If some of the functions can be defined in terms of others, we can reduce this list to a set of axiomatic functions. | |||||||||||||
| Line: 335 to 338 | |||||||||||||
| In addition to the general functions defined above, additional domain specific functions may be defined, using the general functions as their components. So, we are building "from the bottom up" several layers of language. For more on this, see the general article by Paul Graham on Programming Bottom Up | |||||||||||||
| Changed: | |||||||||||||
| < < |
XayaCoreSpecification? | ||||||||||||
| > > |
XayaCoreSpecification | ||||||||||||
| Finally ..... The XAYA001 specification | |||||||||||||
| Line: 379 to 382 | |||||||||||||
| Node Index Generation To generate an index such as 1.1, 1.2.1, etc, defining node locations in the graph. Once such an index is generated -- operations on it, can be easier than full graph-walking algorithms (which don't make any assumptions about the graph's structure. In particular, regular expressions on the lists of node indexes can be used to find the paths. | |||||||||||||
| Changed: | |||||||||||||
| < < |
XAYAObjects | ||||||||||||
| > > |
XAYAObjects | ||||||||||||
| Currently in the first iteration there are no "official" objects. Though obviously we are using some object oriented/relational hybrid thinking in our modelling approach. Ultimately, we may create an object such as DiGraph?(dict), inheriting from the built-in dictionary type. This is a bit different than some other approaches which usually proceed by defining node, edge classes, and several types of graphs: graph, digraph, tree. This leads to a menagery of Graph related objects. | |||||||||||||
| Line: 396 to 399 | |||||||||||||
| The current functions then become methods within this class. And subclassing can over-ride what they do, and add further methods. | |||||||||||||
| Changed: | |||||||||||||
| < < |
XAYALanguage | ||||||||||||
| > > |
XAYALanguage | ||||||||||||
| So far, we've defined the mini-language as a library in Python (i.e. we're using Python itself as a little language, in the manner illustrated in the Python Cookbook, pg 449, which also contains yet another graph implementation example). The next step, is to go further and actually extend the Python language. The notes here are some very preliminary ideas as to what such an extended language might look like. | |||||||||||||
| Line: 448 to 451 | |||||||||||||
| Changed: | |||||||||||||
| < < |
XAYAcode | ||||||||||||
| > > |
XAYAcode | ||||||||||||
| These are some initial code, developed to illustrate ideas for XAYA in its initial iteration. These should not be taken as the final code, for the first iteration, but really a working out of code conventions and initial command line interface via proto-typing. Expect the code to be updated every few days. Top link, is most recent version of code (so one gets a running view of the developing style). Current conventions are to use a test-first development style (define unit tests, write code)via unittest module, a pseudo-literate coding style that provides documentation of any algorithms used, and references to code sources, and finally incorporation of usage examples via docTest module. Code is currently more verbose than it needs to be, and will get stripped down. Try and balance conciseness and clarity. (emphasis on "try"). | |||||||||||||
| Line: 456 to 459 | |||||||||||||
| |||||||||||||
| Added: | |||||||||||||
| > > |
| ||||||||||||
| |||||||||||||
| Line: 473 to 478 | |||||||||||||
| Revised -- MishtuBanerjee - 30 Sep 2004 | |||||||||||||
| Added: | |||||||||||||
| > > |
| ||||||||||||
| |||||||||||||
| Added: | |||||||||||||
| > > |
| ||||||||||||
XAYAThinkingWithData | ||||||||||
| Line: 10 to 10 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Return to WebHome | ||||||||||
| Changed: | ||||||||||
| < < |
This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples. | |||||||||
| > > |
This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples (code's going to be fairly thoroughly reworked this weekend -- mb Sept 30, 2004).
| |||||||||
XAYAvision | ||||||||||
| Line: 456 to 461 | ||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
* psfgrantXAYA_ThinkingWithData_20040930.pdf: PSF Grant Proposal: XAYA Thinking With Data | |||||||||
| Original -- MishtuBanerjee - 16 Aug 2004 Revised -- MishtuBanerjee - 30 Sep 2004 | ||||||||||
| Added: | ||||||||||
| > > |
||||||||||
| ||||||||||
| Added: | ||||||||||
| > > |
| |||||||||
| Line: 1 to 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
XAYAThinkingWithDataXAYAcore: "A Language for Thinking with Data"XAYAvision: "Freedom Simplicity Connection"Return to WebHome This site has been set up to support a Python Software Foundation grant proposal, and contains a basic description of XAYA's goals, philosophy, concepts, proposed methods, and some early code examples.XAYAvisionA Language for thinking with data. Data is everywhere, we try and make sense of it. But we keep getting caught up in the details. Is the data in a database? Is it in XML format? Is there a DTD, a Schema? Which query mechanism do we use? Navigating through information is like the early days of the automobile -- where one has to be half-engineer, simply to drive. XAYA's goal is to support the idea of "just driving" and focussing on your understanding of information in a particular field (be it an area of business, science, history, etc). As such it supports allowing you to model your knowledge, and link it to existing data, and supports exploratory reasoning about relationships amongst information, in short, "Thinking with Data". More formally, "Logic". Freedom, Simplicity, Connection. These three words summarize the spirit behind the vision for Xaya. Xaya is centred around the idea of representing information as graphs, and being able to "navigate" through those graphs. This idea originated in the insight that relational systems (such as databases) can be modelled as graphs, and a query in such a system represents a "path through a graph". An earlier version of this idea was inplemented in LifeLine an application that focussed on representing databases as "tree-like" graphs, and allowing the user to query a database in fairly sophisticated ways without requiring knowledge of the underlying database structure, SQL, etc. At it's centre was a query engine that translates between what the user has selected as a "scenario", a graph representation of the data, and the SQL needed to obtain the "scenario" from a relational database. XAYA takes that basic idea "a query is a path through a graph" and generalizes it so that the query engine no longer is concerned about a particular storage format (such as relational databases, XML, RDF etc). One should focus on the information, and it's inherent relationships, rather than underlying format. In this context, we want to try and apply a set of design principles that are focussed on Logic, Abstraction, Graphs, Language. See XayaGal? (l = logic and/or language so Graph Abstraction Logic or Graph Abstraction language). The basic vision of Xaya is as a modular system that follows the Unix Design Principles, and Coheres to the core Modular Operators Unix Design principles:
XAYAcore Iteration001 NotesThese notes are transcribed from mb's XAYAjournal, and will be changed as the first implementation comes into being. Right now, I'm just getting the notes down as quickly and roughly as possible, so that both Tyler and I can use them. Based on the specification, we'll both build as many functions as interest us, and compare notes. Others viewing this site are also welcome to play, and post their work here -- MishtuBanerjee - 16 Aug 2004 Wiki: "The simplest online database that could possibly work" -- Ward Cunningham. XAYAcore???: "The simplest relational network that could possibly work???"XayaPrinciples?
XAYAUseCase?A minimal Use Case to begin with, illustrating a command line session:
Rough Procedure to support the Use Case
Necessary Simplifications for first IterationThese simplifications are to restrict the scope of the use case
Minimal Scope Simplified Use Case
XAYASubjectDataGraphs?.What Does the Graph Mean? 8 Interpretations of DictionaryAsGraphs? to define a Knowledge Management System.
XayaSubjectDataGraphsExample?To make this a little less abstract, a small Forest Inventory based example has been created. The example graphs are stored in the attached file "devcore_20040826.zip" which you can download here:
XAYAFormatData is in text files in a format that can easily be converted to Python Dictionary structures where each line of a file has the following form: Key : Value1, Value2, Value3 .... ValueN? This format is similar to that used by YAML a data serialization format geared to be human readable and machine parsable, but focussed more towards dynamic languages and programming constructs than typical markup languages. The common interpretation across all these data structures are:
Project LevelContained in the following files: DataFiles_X001.txt
Semantics/Ontology LevelContained in the following files: Objects_X001.txt
Structural levelThis is the part that corresponds to traditional data modelling in databases. These files are fairly close approximations of the LifeLine long model. There are three parrallel files, which have the same key-set, but whose values are different forms of meta-data. The structural level could be said to deal with "collections" and is above the level of individual instances of data. It corresponds to Relational Modelling, as it is usually understood. Measures_X001.txt
Mapping Semantics To Structures.The object level, can be considered akin to abstract classes -- devoid of implementation. The Structural level, deals with the implementation as table, table-like structues (or alternatively in XML world, XML-like, or Schema conformant structures). We have to map Semantics to Structures. Because any Object may have 1 one or more structural equivalents (particularly if we are integrating data from multiple databsases). So for example an object Stand may correspond to different tables with different names and different variable labels in 2 databases, but both of which describe the same "Object" (a stand) and have some common variables (Leading Species). but may otherwise differ. These mappings allow us to integrate ACROSS data sets where there is some common info. Map_ObjectsToData_X001.txt
Data Instance LevelThe 11 graphs above are constant in form, and interpretation -- what changes is their contents -- which depend on the actual data (instances) being modelled at a low level). One could say instance information flows through the Structural and Semantic levels, which do not change in form. In this case, our low level data a model of the forest inventory, corresponding to the schema in Schema_X001.txt. There can be any number of tables in the low level model. Every table has the same interpretation: Key : Value1, Value2, .... ValueN?
XAYAPredicateFunctions?.Functions that tell you something about a graph, a node, an edge. Currently there are twelve functions. If some of the functions can be defined in terms of others, we can reduce this list to a set of axiomatic functions.
XayaCoreSpecification?Finally ..... The XAYA001 specification 1. readFromFile(FilePathOrName?) -- reads from ascii format either a graph or a path (a path is simply a 1 row dictionary with a key and a value list) 2. genNodeIndex(GraphName?) 3. findAllPaths(GraphName?, StartNode?, EndNode?) 4. filterShortestPaths([PathsList]) -- a list of lists is the PathsList? 5. filterLongestPaths ([PathsList]) 6. sumPathLength([Path]) 7. findRoots(GraphName?,[NodeList]) 8. isRoot(GraphName?, NodeKey?) 9. writeToFile(GraphOrPathName?, FilePathOrName?) 10. filterGraph(GraphName?, [NodeList]) 11. bindGraphs(ParentGraph?, ChildGraph?) -- may require either several fns -- or a single fn with a longer list, to define differnet ways of binding two graphs. I always imagine this as the weigh proteins bind. 12. makeNode(GraphName?, NodeName?) 13. makeEdge(GraphName?, ParentNode?, ChildNode?) 14. killNode(GraphName?, NodeName?) 15. killEdge(graphName, NodeName?)Some More Rough Algorithms.... To be continued, as the implementation is worked out. General Tree Walking Algorithm For each NodeKey?, walk through it's edges. Build a list from nodes to edges. Each edge then recursively becomes a node key. Continue until: have hit a leaf node, or encounter a node already in the list (i.e. a cycle). Make sure you follow alternate branches, and don't just end up running down one branch. Node Index Generation To generate an index such as 1.1, 1.2.1, etc, defining node locations in the graph. Once such an index is generated -- operations on it, can be easier than full graph-walking algorithms (which don't make any assumptions about the graph's structure. In particular, regular expressions on the lists of node indexes can be used to find the paths.XAYAObjectsCurrently in the first iteration there are no "official" objects. Though obviously we are using some object oriented/relational hybrid thinking in our modelling approach. Ultimately, we may create an object such as DiGraph?(dict), inheriting from the built-in dictionary type. This is a bit different than some other approaches which usually proceed by defining node, edge classes, and several types of graphs: graph, digraph, tree. This leads to a menagery of Graph related objects. I'm thinking of something much simpler. A single base class (DiGraph?). Essentially extends the basic capabilities of a dictionary. Their may also need to be a containeer class, for operations "across graphs" rather than operations within a graph. Focussing on DiGraph?, we can further sub-class, and actually represent nodes, and edges, as themselves inheriting from the DiGraph? class: DiNode?(DiGraph?) has a name, that is the node's name. It's keys represent data associated with the node ("cargo") and the values are the values of the data. DiEdge?(DiGraph?) has a name, that is the string-representation of two-nodes (e.g "A-->B), and whose values are the tuple (Parent, Child). With just these constructs one should be able to build fairly complex models, including ones where a single node in one model, may itself contain a whole other model. Consider this for cases where different models exist at different scales, or where one has nested models. The current functions then become methods within this class. And subclassing can over-ride what they do, and add further methods.XAYALanguageSo far, we've defined the mini-language as a library in Python (i.e. we're using Python itself as a little language, in the manner illustrated in the Python Cookbook, pg 449, which also contains yet another graph implementation example). The next step, is to go further and actually extend the Python language. The notes here are some very preliminary ideas as to what such an extended language might look like. Can we, based on the constructs we've created, define a simple extension to the Python core language, to represent Graph operations -- a type of relationally modelled path language. (call it XayaPath?). If we could, it would allow Python to add to it's current functional and OO styles of programming, the declarative style of a logic/relational language. I've got some rough notes in my Xaya journal right now, that I have to try out. Without referring to the notes (scattered over several pages of journals, and in the backs of several other pieces of paper) here's the general sketch of the idea. Define a declarative style language that defines a path , using keywords, operators, tokens not currently used by Python (i.e. this language + Python is a superset of Python). As in any declarative language, it states "what is wanted", not "how it is calculated" (done by the underlying system, in this case the query engine functionality) Say there are 2 graphs, G1 and G2 (represented by perhaps the DiGraph? class). Notation Thoughts (very rough)
XAYAcodeThese are some initial code, developed to illustrate ideas for XAYA in its initial iteration. These should not be taken as the final code, for the first iteration, but really a working out of code conventions and initial command line interface via proto-typing. Expect the code to be updated every few days. Top link, is most recent version of code (so one gets a running view of the developing style). Current conventions are to use a test-first development style (define unit tests, write code)via unittest module, a pseudo-literate coding style that provides documentation of any algorithms used, and references to code sources, and finally incorporation of usage examples via docTest module. Code is currently more verbose than it needs to be, and will get stripped down. Try and balance conciseness and clarity. (emphasis on "try").
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||