-
kquick committed patchset 41 of module smg to the State Machine Generator CVS repository, changing 2 files.
2008-04-03 20:12:57 UTC in State Machine Generator
-
The problem is that my paths are rooted and os.path.join tosses away first portions if a rooted portion is supplied.
Attached is diff that fixes this and also uses commonprefix to remove higher-level directories from generated tree.
File Added: fix_pathmgmt.diff.
2008-01-08 23:59:11 UTC in Python Knowledge Engine (PyKE)
-
Used PYTHONVERBOSE=1 to verify that the SVN rev56 version is being used. Output from compiler does not have the "compiled_krb" prefix.
Code is simply:
...
[determines load_dirs as echoed my my previous comment]
...
pyke.load(load_dirs)
...
No additional arguments are specified to pyke.load statement.
Re-enabling alpha1 version of pyke successfully builds and uses the krb output...
2008-01-08 06:41:02 UTC in Python Knowledge Engine (PyKE)
-
Sorry, I should have actually tried to reproduce this using my minimal example but I just extracted the latter from the larger rulebase I was working with.
In going back and re-examining this in the context of that rulebase, I have discovered the actual problem: two rules with the same name. I'm re-opening this bug report with the suggestion that it should be illegal (a compilation error) to...
2008-01-06 17:16:50 UTC in Python Knowledge Engine (PyKE)
-
Updated to SVN rev56.
Running local "bpyke" script, which (1) adds input directory list (2 dirs) to sys.path, (2) pyke.load() with same two directories but no other arguments, (3) issues a pyke.prove_1 followed by running the resulting plan. The first line of bpyke.krb is "extending bpyke_global", and bpyke_global.krb ends with:
bc_extras
print 'bpyke_global initialized'...
2008-01-06 09:24:55 UTC in Python Knowledge Engine (PyKE)
-
Update: PYTHONPATH is being honored (as it should).
Problem appears to be in load() updates in rev56; re-opened separate bug.
However, the exec recommendation still seems relevant.
2008-01-06 09:11:57 UTC in Python Knowledge Engine (PyKE)
-
Attempting to test a local SVN checkout of pyke, but ran into difficulties trying to compile the krb files.
In pyke/__init__.py, compilation is performed via:
os.system("%s -m pyke.compiler ...."%(sys.executable, ....)
However, this does not seem to get the PYTHONPATH environment variable setting used to point to the local SVN checkout location, despite PYTHONPATH being exported...
2008-01-06 09:07:13 UTC in Python Knowledge Engine (PyKE)
-
The documentation implies that a "step n" or "as" directive must be supplied for bc-rule clause plans, but it appears to be sufficient to simply provide the plan statements without this specification.
In addition, I frequently encountered a complaint that there was no plan for a clause. This was usually because a clause in whatever rule was selected to prove that clause had a plan but the...
2008-01-02 06:24:37 UTC in Python Knowledge Engine (PyKE)
-
The pyke.load() will iterate through provided directories to create _bc.py/_fc.py/_plan.py files as needed for discovered .krb files, creating these former in the same directory as the discovered .krb.
Subsequent pyke.activate() or other use will fail to 'import' these generated files if the sys.path does not contain the same directories as provided to pyke.load().
Possible solutions:
1...
2008-01-02 06:16:21 UTC in Python Knowledge Engine (PyKE)
-
Given two .krb files:
first.krb:
...
second.krb:
extending first
....
it seems to be necessary to pyke.activate('second') but
then to pyke.prove_n('first', ...).
This seems inconsistent (and required digging to find--some debug functions to display a list of kb and rb namespaces would be helpful).
Also, issuing: pyke.assert('first', .., ..) before the prove_n...
2008-01-02 06:08:22 UTC in Python Knowledge Engine (PyKE)