Chat Logs/20190409

From Public Domain Knowledge Bank
Revision as of 15:24, 9 April 2019 by DavidWhitten (talk | contribs) (Created page with " === #logicmoo === : http://www.logicmoo.org : https://docs.google.com/document/d/1XCDnWMjNh4y2Um_1B-HE4x5Q34oxHRxBl-Oy9eNUzTI/edit# : https://drive.google.com/drive/folder...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

#logicmoo

http://www.logicmoo.org
https://docs.google.com/document/d/1XCDnWMjNh4y2Um_1B-HE4x5Q34oxHRxBl-Oy9eNUzTI/edit#
https://drive.google.com/drive/folders/0B0QA19UX0ehlV1ZEaXEzc3hjTWM
http://www.csee.umbc.edu/~finin/prolog/pfc/man/pfc.pdf

Chat

[09:05] <aindilis> I'd be interested to know what your working on exactly
[09:06] <whitten> Yes, I guess I have been focused more on the Example Hospital Project. I work on the PDKB wiki, to try to collect and organize data, but I'm mostly just trying to learn.
[09:07] <aindilis> So recently I made a little progress on the text-to-knowledge pipeline.  little.
[09:07] <whitten> I want to figure out how to manage the setup and configuration of VistA, so we can show off an example hosopital to someone who wants to use it.
[09:07] <aindilis> ok
[09:08] <aindilis> sounds like we need a workflow manager which has been elusive, but I need one too
[09:08] <whitten> Of course, the same tools can be used to manage the setup and configuration of whatever we make here, too.
[09:08] <aindilis> FLP=Free Life Planner has need of a workflow manager
[09:09] <aindilis> basically the idea is, there are various pages for things like plans, finances, shopping lists, etc
[09:09] <aindilis> but when the user is working on these things, they often need to move between pages to update and move certain information
[09:09] <aindilis> so it's very similar to what you're proposing of a setup and configuration problem
[09:10] <aindilis> in fact, for instance, FLP needs to do an dynamic intake procedure
[09:10] <whitten> So, a workflow manager would make sure you were using the software to do daily work ?
[09:10] <whitten>  Hopefully the system would inter-operate between components so little data needs to be re-entered.
[09:10] <aindilis> where it asks questions contingent on the answers
[09:10] <aindilis> well workflow not in terms of time management but in terms of task completion
[09:10] <aindilis> so one sec, getting an example of one already made from ISI
[09:10] <whitten> so some questions won't be asked because they have already  been answered 
[09:10] <whitten> or won't be asked because they aren't relevant to a particular goal?
[09:11] <aindilis> well yeah, that is a reduced example I am giving of the intake system. 
[09:11] <aindilis> the intake system would use the workflow, but so would other components
[09:13] <aindilis> someone on #ai mentioned an automatic gui system used in haskell
[09:13] <aindilis> this is not quite right though, let me find the workflow system from ISI
[09:15] <aindilis> sorry can't seem to find it
[09:16] <aindilis> a workflow system is like a planner with an executor
[09:16] <whitten> When asking a series of questions, sometimes we want to skip questions that aren't relevant because of the answer to an initial question. I can see marking the skipped questions/fields as contingent on a particular expression.
[09:16] <aindilis> yeah, I wrote a system to try to do this in Prolog
[09:17] <whitten> where the expression might be (first question=particular answer)
[09:17] <aindilis> but again we're getting derailed, that's only an example of a system using a kind of workflow
[09:17] <whitten> I don't see this as de-railing, but trying to express requirements for the workflow.
[09:17] <aindilis> so what does setup of your software look like?
[09:17] <aindilis> how would it be automated?
[09:18] <whitten> Usually setup involves creating an row/entry in a particular database table/file and putting answers in a particular column/field.
[09:18] <aindilis> well okay so you have an intake component too?
[09:19] <whitten> Yes, there is an intake process to admit a patient into a care facility. The steps usually depend on the care facility though.  Some basic demographics are common to most.
[09:18] <aindilis> I thought this was SCM (software configuration management)
[09:19] <aindilis> so there would be hypothetically a graph of questions with edges being answers to questions
[09:19] <aindilis> and configuration consists of moving to a goal state
[09:20] <aindilis> oh so this is not setup for the whole software, this is intake for a patient?
[09:20] <aindilis> you're setting up a patient's account, and you want a workflow to handle that?
[09:21] <whitten> I distinguish between a question that only shows up on a particular form from a column that is stored long term in the database.  There are times you need each. I wonder if the difference is a false dichotomy though.
[09:22] <aindilis> so you have sets of forms to complete? 
[09:23] <whitten> I think of a form as a page on the screen. 
[09:23] <whitten>  When you fill in the blanks in a web page, you are filling in a <form> .
[09:24] <whitten> There are form questions, that only exist to make using the form coherent, and long-term questions that have to do with care.
[09:23] <aindilis> right
[09:22] <aindilis> so this is like a paperwork workflow system?
[09:22] <whitten> For me, and for the example hospital, setting up the workflow for a patient is a subset of setting up the configuration of the whole hospital.  There are things that have little to do with setup for a patient, such as defining an IV manufacturing room, and others that are entirely relevant, such as admission criteria.
[09:23] <aindilis> okay so there are two problems, setting up the example hospital, and setting up each patient
[09:24] <aindilis> so setting up the patient and set up the example hospital are sub-problems to "setting up" the whole hospital
[09:24] <aindilis> do you ever need to backtrack -> so like can you have a back and a forward and when you return forward the values you already put are still there?
[09:25] <whitten> I think of back and forth as part of the design of the form. So yes, once answered, you should be able to get back to a page, or cycle through all the pages to the beginning again.
[09:25] <aindilis> required versus optional fields, etc
[09:26] <aindilis> so these web-forms have yet to be implemented?  or are already implemented for web system X?
[09:26] <aindilis> what web framework do they need to be written for?
[09:25] <aindilis> I can create you a PDDL domain that will work with Prolog for handling form completion including dependencies between forms
[09:27] <whitten> I'd like to see your PDDL domain.  So the forms for the text based system are already implemented, and in use every day at hospitals. The web forms are still being written and debugged.
[09:27] <aindilis> okay, so we would model existing forms
[09:28] <aindilis> how would it work to guide the user?  it would be implemented into the web-form technology that is still in development?
[09:28] <whitten> The web forms I've seen so far are written for "panorama" and "EWD" two web frameworks on top of node.js
[09:28] <aindilis> and it can be an open source reusable component? the workflow manager?
[09:29] <whitten> Of course it would be open source. I would hope the workflow manager would not depend upon any particular user interface, so we could have a common one, regardless of what inteface the user uses.
[09:30] <aindilis> btw, FLP has need of workflow manager, and Paperless-Office also has need of one.
[09:29] <aindilis> and what does configuration of the example hospital look like?
[09:30] <whitten> When I've configured it before, I just went into the database manager and added entries to files. 
[09:30] <whitten> I'm hoping to get some better handle on this with a planner and maybe the workflow manager you are discussing.
[09:30] <aindilis> so what I'm doing here is prioritizing stuff I already was planning to work on so that we can double up and get it done faster and both benefit
[09:31] <whitten> I'm impressed. Your plan is has great merit.
[09:31] <aindilis> thank you, ditto!
[09:32] <aindilis> okay so it would help if I could have an example trace to mine, is there any such thing, such as a DB configuration log or a set of forms or something that I could begin to extract things like form field dependencies, form field state, etc?
[09:33] <aindilis> I'm not feeling particularly up to much, still "under the weather" in general
[09:33] <aindilis> but I think I could crank out a PDDL domain with example plan traces for you
[09:33] <whitten> Hmm. The 'new user' setup is a bit complicated, but it will show the kinds of information currently being used.
[09:33] <aindilis> in fact I could make an executable
[09:33] <aindilis> well maybe just record a video?
[09:32] <whitten> Would you like to schedule a Goto-meeting (I have access to the software) to share some screens, or would it be better to do screenshots?
[09:33] <aindilis> um, yeah we can schedule one for later in the week if that's alright, but if you could get me some files to chew on first I can make a first attempt in the meantime
[09:35] <aindilis> in fact, I've recently most of my planning domains into the Panoply VM
[09:35] <aindilis> I could share those with you
[09:35] <aindilis> in an interesting "form" of irony, I have filled out a lot of mental health paperwork for myself
[09:35] <whitten> heh.  The nice thing about the VistA system is that you rarely answer questions more than once, unless you need to update.
[09:35] <aindilis> ah update, that's important. so we need a PDDLized CRUD
[09:37] <aindilis> in fact this is very similar I would guess to Business Process Management
[09:37] <aindilis> an area I've had a hard time venturing into
[09:38] <whitten> Create-R?-Update-Delete is useful when you already know what your File/table looks like. When it's dynamic you need to deal with adding to master lists (what we call Learn-as-you-go = LAYGO) as well as adding new columns or controlling access.
[09:38] <aindilis> ah
[09:39] <whitten> Like, you would not want most people to add new drugs to the formulary or lab tests to the system. But some folks need to. (examples of master lists)
[09:40] <aindilis> because you're going to be specifying *different* workflows, like we need to do this particular task, say, updating the patients current living arrangements etc status, this is really like process management
[09:40] <whitten> I will take your word for it, I usually think of them as different tasks, each with their own workflow.
[09:41] <whitten> Rarely does anyone have to know all the workflows for one particular person/job  except for their supervisor (and the person who does the job, of course)
[09:42] <whitten> I guess if you are hiring a new person, or doing training, you have to know all of their workflows.
[09:34] <whitten> Did you look at the STRIPS fiddle site I talked about ?
[09:34] <aindilis> hrm, sort of, can you re-link?  I am very familiar with STRIPS in general
[09:42] <whitten> so, this is the page I found the link to Strips-Fiddle: http://www.primaryobjects.com/2015/11/06/artificial-intelligence-planning-with-strips-a-gentle-introduction/
[09:45] <whitten> The STRIPS shown in that page is very LISP-like. The STRIPS-fiddle is at https://stripsfiddle.herokuapp.com/
[09:47] <aindilis`> yeah that's pddl
[09:47] <aindilis`> what we need is to map the form filling state into PDDL. Also we'll want re-planning
[09:47] <aindilis`> my parsers already read PDDL. I won't have to rewrite that
[09:47] <aindilis`> Here in fact they are:  https://github.com/aindilis/universal-parser
[09:48] <aindilis`> but the system has to be able to CRUD individual workflows right?  and store them all?
[09:49] <whitten> It all depends on where the division of labour is, who has to handle CRUD.
[09:49] <aindilis`> do we have access to the workflows somehow?
[09:50] <aindilis`> I suppose what you want is a workflow editor that the staff can use to build workflows, which are then executed by the respective people in charge of entering information
[09:51] <aindilis`> maybe I could build workflows for existing tax forms as a start
[09:51] <aindilis`> if you do not have any sample data/traces to begin mining
[09:52] <whitten> I will make the add new user screens available on the wiki at http://www.vistapedia.net
[09:52] <aindilis`> great
[09:53] <whitten> I don't have any traces though. Usually you just tell people to fill in the forms.
[09:54] <whitten> I saw creating a workflow editor as a big task. Do you see it as easy ?
[09:58] <aindilis`> um no it's definitely hard but to make a smidgeon of progress is easy
[09:58] <aindilis`> like getting a usuable first stab at PDDLification
[09:58] <aindilis`> here is an example:  https://github.com/aindilis/financial-planning and https://github.com/aindilis/financial-planning/blob/master/pddl/tsimpleopticclp20170801exampleredacted.d.pddl
[09:59] <whitten> You already have a PDDL parser, right? So we could just use a regular editor and then paste the results into the parser, I guess.
[09:59] <aindilis`> the domain there is quite simple
[09:59] <aindilis`> here is how I have just now thought to do it
[09:59] <aindilis`> you really need to keep state in Prolog and export to PDDL
[10:00] <aindilis`> I am very close to having a pure Prolog MySQL backend
[10:00] <aindilis`> the whole thing, with the exception of OPTIC_CLP, could be done in Prolog so as to minimize the requirements. BTW OPTIC_CLP is GPLv2
[10:02] <whitten> Is OPTIC_CLP written in Prolog?
[10:03] <aindilis`> no
[10:00] <whitten> It's always good to have multiple ways to do things.
[10:01] <aindilis`> :)
[10:01] <whitten> How far from completion is your MySQL backend?
[10:01] <aindilis`> I have write nearly done, have to implement read if I recall
[10:01] <aindilis`> let me get you the link
[10:04] <aindilis`> srry looking for my mysql backend, forgot what it was called lol
[10:04] <aindilis`> https://github.com/aindilis/data-integration/blob/master/attempts/1/freekbs2_swipl.pl
[10:05] <aindilis`> it is able to assert prolog terms into MySQL and retrieve them
[10:05] <aindilis`> I could finish it up pretty soon just haven't had enough motivation
[10:05] <aindilis`> there is some trickiness with numbers versus atoms and stuff
[10:06] <whitten> Yeah, I can see that it can be tricky.
[10:08] <whitten> I wasn't sure how to handle atoms with yottaDB, since only numbers and strings are native.
[10:08] <whitten> I was just thinking of having a privileged table that stored their names so an "atom-p" test would check there.
[10:09] <aindilis`> ah k
[10:11] <whitten> Is there a Prolog skin for Notepad++ ?
[10:14] <aindilis`> I don't know. I use emacs
[10:07] <whitten> I searched github for OPTIC_CLP and didn't find it. Where is its code?
[10:08] <aindilis`> https://frdcsa.org/~andrewdo/whitten/optic-clp.tar.bz2
[10:14] <aindilis`> yeah that's a particularly strong metric temporal planner iirc
[10:15] <aindilis`> notable for being open source
[10:15] <aindilis`> so what can happen is you guys export state to Prolog, and then it does everything and returns
[10:16] <aindilis`> what if I wrote a version of that for YottaDB of kbs2_mysql.pl or whatever
[10:16] <aindilis`> *freekbs2_swipl.pl so that we could directly read the DB from Prolog
[10:16] <aindilis`> if you decide to go with Prolog
[10:17] <aindilis`> it actually won't be freekbs2_swipl.pl for yotta db, just a yottadb access system for Prolog, so it can read/write from to the DB as necessary
[10:16] <aindilis`> also what language are you going to be calling Prolog from?
[10:23] <whitten> I would try to call Prolog from MUMPS using the external function interface. (which is a C interface) Alternately, I could call Prolog from a Linux command line.
[10:23] <whitten> The command line idea has merit because it would be fast to implement.
[10:24] <whitten> How difficult is the Linux command line interface from Prolog?
[10:25] <whitten> Prolog terms map easily into MUMPS:   father(brad,george). -> ^PROLOG("TERM","father","brad","george")=""
[10:26] <whitten> Of course, there would have to be some definitional support saying that father has an arity of two, and the information about its arguments.
[10:27] <whitten> Rules would just require a different set of definitions, as they have a right hand side, and variables (bound and unbound).
[10:29] <whitten> I would probably make each argument be a string: father(father(X,Y),X). -> ^PROLOG("TERM","father","father(X,Y)","X")=""
[10:29] <whitten> it would require a simple prolog term parser, but shouldn't be too hard.
[10:27] <aindilis> k
[10:29] <aindilis> so remind me, MUMPS is both the DB and the language
[10:30] <aindilis> and what about the web interface, how would data from Prolog/PDDL make it's way back to the web interface, through the DB?
[10:30] <whitten> MUMPS has a built-in database, just like Prolog does.
[10:31] <whitten> It is probably higher performance than Prolog, but it doesn't really support unbound variables as values.
[10:31] <aindilis> you were saying node.js?
[10:30] <aindilis> so the web interfaces call MUMPS, obviously, right?
[10:32] <whitten> The web interface is written in Javascript. This communicates with node.js, which transfers javascript calls to MUMPS, which runs them, interfacing with the database as needed, and then sends the results back to node.js as JSON.
[10:31] <aindilis> hey I have to go.
[10:32] <whitten> How public do you want this conversation (so far) to be ? Should I scrape and put on PDKB wiki ? or just keep privately ?
[10:33] <aindilis> I think it's fine to put on PDKB
[10:33] <whitten> ok. I'll do so.
[10:33] <aindilis> great, ttys!