예제 #1
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'subway_rules.krb'):
            [1593471008.0099568, 'subway_rules_bc.py'],
            ('', '', 'subway.kfb'): [1593466867.664013, 'subway.fbc'],
        }, compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'fc_area_recommend.krb'):
            [1501575617.624, 'fc_area_recommend_fc.py'],
            ('', '', 'coil_area.kfb'): [1501575617.651, 'coil_area.fbc'],
        }, compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'bc_regras.krb'): [1571105171.1699395, 'bc_regras_bc.py'],
            ('', '', 'doenca.kfb'): [1571105171.1819203, 'doenca.fbc'],
            ('', '', 'regras.krb'): [1571105171.1899126, 'regras_bc.py'],
        }, compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__,
        __file__,
        pyke_version,
        loader,
        {
            ("engine", "", "on_state/on_state_rules_sound.krb"): [1293729565.955581, "on_state_rules_sound_fc.py"],
            ("engine", "", "on_state/on_state_fact_network.kfb"): [1293729565.958706, "on_state_fact_network.fbc"],
            ("engine", "", "off_state_facts.kfb"): [1293727489.825137, "off_state_facts.fbc"],
            ("engine", "", "on_state/on_state_fact_screen.kfb"): [1293729565.959432, "on_state_fact_screen.fbc"],
            ("engine", "", "on_state/on_state_questions_sound.kqb"): [
                1293729565.981629,
                "on_state_questions_sound.qbc",
            ],
            ("engine", "", "off_state_rules.krb"): [1293727489.939237, "off_state_rules_fc.py"],
            ("engine", "", "on_state/on_state_rules_screen.krb"): [1293729565.990631, "on_state_rules_screen_fc.py"],
            ("engine", "", "on_state/on_state_rules_network.krb"): [1293729565.999601, "on_state_rules_network_fc.py"],
            ("engine", "", "on_state/on_state_fact_sound.kfb"): [1293729566.000341, "on_state_fact_sound.fbc"],
            ("engine", "", "off_state_questions.kqb"): [1293727489.975198, "off_state_questions.qbc"],
            ("engine", "", "on_state/on_state_questions_screen.kqb"): [
                1293729566.000966,
                "on_state_questions_screen.qbc",
            ],
            ("engine", "", "on_state/on_state_questions_network.kqb"): [
                1293729566.001518,
                "on_state_questions_network.qbc",
            ],
        },
        compiler_version,
    )
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'Remedy.kfb'): [1509376379.984834, 'Remedy.fbc'],
            ('', '', 'Remedyrule.krb'):
            [1509376380.0161219, 'Remedyrule_bc.py'],
        }, compiler_version)
예제 #6
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'fb_checkin_fc.krb'):
            [1482184790.704972, 'fb_checkin_fc_fc.py'],
            ('', '', 'fb_checkin.kfb'): [1482184790.737429, 'fb_checkin.fbc'],
        }, compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'Remedy.kfb'):
           [1510041704.128401, 'Remedy.fbc'],
         ('', '', 'Remedyrule.krb'):
           [1510041704.1384315, 'Remedyrule_bc.py'],
        },
        compiler_version)
예제 #8
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'rules.krb'):
           [1571159854.68191, 'rules_bc.py'],
         ('', '', 'questionsdoenca.kqb'):
           [1571159854.6925237, 'questionsdoenca.qbc'],
        },
        compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('pyke_driver', '', 'functions.kfb'):
            [1556819975.092687, 'functions.fbc'],
            ('pyke_driver', '', 'bc_functions.krb'):
            [1556819975.110198, 'bc_functions_plans.py', 'bc_functions_bc.py'],
        }, compiler_version)
예제 #10
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'pattern_matching.krb'):
           [1387492023.035071, 'pattern_matching_bc.py'],
         ('', '', 'questions.kqb'):
           [1387492023.098355, 'questions.qbc'],
        },
        compiler_version)
예제 #11
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'example.krb'):
           [1593470678.602714, 'example_bc.py'],
         ('', '', 'family.kfb'):
           [1593469475.1843824, 'family.fbc'],
        },
        compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', 'exprtSystem\\', 'questions.kqb'):
            [1571015672.8193681, 'questions.qbc'],
            ('', 'exprtSystem\\', 'rules.krb'):
            [1571015672.8792026, 'rules_bc.py'],
        }, compiler_version)
예제 #13
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'answer.kfb'):
           [1588658070.14868, 'answer.fbc'],
         ('', '', 'category_rules.krb'):
           [1588658070.1786351, 'category_rules_bc.py'],
        },
        compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('engine', '', 'off_state_facts.kfb'):
           [1292231469.665645, 'off_state_facts.fbc'],
         ('engine', '', 'off_state_rules.krb'):
           [1293550559.919109, 'off_state_rules_fc.py'],
         ('engine', '', 'off_state_questions.kqb'):
           [1293537276.898645, 'off_state_questions.qbc'],
        },
        compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('engine', '', 'off_state_facts.kfb'):
           [1290250235.76504, 'off_state_facts.fbc'],
         ('engine', '', 'off_state_rules.krb'):
           [1290279294.531483, 'off_state_rules_fc.py'],
         ('engine', '', 'off_state_questions.kqb'):
           [1290252657.336259, 'off_state_questions.qbc'],
        },
        compiler_version)
예제 #16
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'fc_example.krb'):
            [1582642184.574948, 'fc_example_fc.py'],
            ('', '', 'example.krb'): [
                1582642184.622607, 'example_fc.py', 'example_plans.py',
                'example_bc.py'
            ],
            ('', '', 'family.kfb'): [1582642184.6421309, 'family.fbc'],
            ('', '', 'bc2_example.krb'):
            [1582642184.6881, 'bc2_example_bc.py'],
            ('', '', 'bc_example.krb'): [1582642184.72239, 'bc_example_bc.py'],
        }, compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'example.krb'): [
                1492861852.38885, 'example_fc.py', 'example_plans.py',
                'example_bc.py'
            ],
            ('', '', 'pcb.kfb'): [1493204790.709206, 'pcb.fbc'],
            ('', '', 'bc2_example.krb'):
            [1492861852.609849, 'bc2_example_bc.py'],
            ('', '', 'bc_example.krb'): [1492861852.76698, 'bc_example_bc.py'],
            ('', '', 'fc_example.krb'):
            [1492861852.900698, 'fc_example_fc.py'],
            ('', '', 'fc_pcb.krb'): [1492908752.661457, 'fc_pcb_fc.py'],
        }, compiler_version)
예제 #18
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('TestGame', 'KB/', 'key_facts.kfb'):
            [1425402087.97809, 'key_facts.fbc'],
            ('TestGame', 'KB/', 'chest.krb'):
            [1426785130.839778, 'chest_bc.py'],
            ('TestGame', 'KB/', 'door.krb'): [1425984573.790016, 'door_bc.py'],
            ('TestGame', 'KB/', 'key.krb'): [1425992351.329943, 'key_bc.py'],
            ('TestGame', 'KB/', 'chest_facts.kfb'):
            [1425064646.384312, 'chest_facts.fbc'],
            ('TestGame', 'KB/', 'door_facts.kfb'):
            [1425400730.035526, 'door_facts.fbc'],
            ('TestGame', 'KB/', 'test.kfb'): [1424366490.914166, 'test.fbc'],
        }, compiler_version)
예제 #19
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('TestGame', 'KB/', 'key_facts.kfb'):
           [1425402087.97809, 'key_facts.fbc'],
         ('TestGame', 'KB/', 'chest.krb'):
           [1426785130.839778, 'chest_bc.py'],
         ('TestGame', 'KB/', 'door.krb'):
           [1425984573.790016, 'door_bc.py'],
         ('TestGame', 'KB/', 'key.krb'):
           [1425992351.329943, 'key_bc.py'],
         ('TestGame', 'KB/', 'chest_facts.kfb'):
           [1425064646.384312, 'chest_facts.fbc'],
         ('TestGame', 'KB/', 'door_facts.kfb'):
           [1425400730.035526, 'door_facts.fbc'],
         ('TestGame', 'KB/', 'test.kfb'):
           [1424366490.914166, 'test.fbc'],
        },
        compiler_version)
예제 #20
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__,
        __file__,
        pyke_version,
        loader,
        {
            ("", "", "pyke\\krb_compiler\\compiler.krb"): [1323166115.7590001, "compiler_bc.py"],
            ("", "", "pyke\\krb_compiler\\TEST\\krbparse_test.krb"): [
                1323166115.7720001,
                "krbparse_test_fc.py",
                "krbparse_test_plans.py",
                "krbparse_test_bc.py",
            ],
            ("", "", "pyke\\krb_compiler\\TEST\\kfbparse_test.kfb"): [1323166115.8429999, "kfbparse_test.fbc"],
        },
        compiler_version,
    )
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'reasonable.krb'):
            [1582643718.325803, 'reasonable_fc.py'],
            ('', '', 'uber.kfb'): [1582643718.340747, 'uber.fbc'],
            ('', '', 'family_relations/fc_example.krb'):
            [1582643718.3753579, 'fc_example_fc.py'],
            ('', '', 'family_relations/example.krb'): [
                1582643718.418644, 'example_fc.py', 'example_plans.py',
                'example_bc.py'
            ],
            ('', '', 'family_relations/family.kfb'):
            [1582643718.425906, 'family.fbc'],
            ('', '', 'family_relations/bc2_example.krb'):
            [1582643718.465695, 'bc2_example_bc.py'],
            ('', '', 'family_relations/bc_example.krb'):
            [1582643718.501528, 'bc_example_bc.py'],
        }, compiler_version)
예제 #22
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'deseases.krb'):
           [1571095800.729503, 'deseases_bc.py'],
        },
        compiler_version)
예제 #23
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
        ('', 'pyke\\', 'try.kqb'): [1567995349.2765284, 'try.qbc'],
    }, compiler_version)
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
         ('', '', 'pioneer.krb'):
           [1416267441.093583, 'pioneer_fc.py'],
        },
        compiler_version)
예제 #25
0
    def _create_target_pkg(self, path, target_pkgs):
        # Does target_pkg.add_source_package.

        if debug: print >> sys.stderr, "engine._create_target_pkg:", path

        # First, figure out source_package_name, source_package_dir
        #               and target_package_name:
        target_package_name = '.compiled_krb'   # default
        if isinstance(path, (tuple, list)):
            path, target_package_name = path
        if isinstance(path, types.ModuleType):
            path = path.__file__
        if not isinstance(path, (types.StringTypes, types.NoneType)):
            raise ValueError("illegal path argument: string expected, got " + \
                               str(type(path)))

        if debug:
            print >> sys.stderr, "_create_target_pkg path:", \
                                 repr(path)
            print >> sys.stderr, "_create_target_pkg target_package_name:", \
                                 repr(target_package_name)

        # Handle the case where there are no source files (for a distributed
        # app that wants to hide its knowledge bases):
        if path is None:
            assert target_package_name[0] != '.', \
                   "engine: relative target, %s, illegal " \
                   "with no source package" % \
                       target_package_name
            if target_package_name not in target_pkgs:
                # This import must succeed!
                tp = _get_target_pkg(target_package_name + 
                                       '.compiled_pyke_files')
                if tp is None:
                    raise AssertionError("%s: compiled with different version "
                                             "of Pyke" %
                                           target_package_name)
                tp.reset(check_sources=False)
                target_pkgs[target_package_name] = tp
            return

        path = os.path.normpath(os.path.abspath(path))

        path_to_package, source_package_name, remainder_path, zip_file_flag = \
          _pythonify_path(path)

        if debug:
            print >> sys.stderr, "_create_target_pkg path to " \
                                   "_pythonify_path:", \
                                 repr(path)
            print >> sys.stderr, "    path_to_package:", repr(path_to_package)
            print >> sys.stderr, "    source_package_name:", \
                                 repr(source_package_name)
            print >> sys.stderr, "    remainder_path:", repr(remainder_path)
            print >> sys.stderr, "    zip_file_flag:", zip_file_flag

        target_filename = None

        # Convert relative target_package_name (if specified) to absolute form:
        if target_package_name[0] == '.':
            num_dots = \
                len(target_package_name) - len(target_package_name.lstrip('.'))
            if debug:
                print >> sys.stderr, "_create_target_pkg num_dots:", num_dots
            if num_dots == 1:
                base_package = source_package_name
            else:
                base_package = \
                    '.'.join(source_package_name.split('.')[:-(num_dots - 1)])
            if base_package:
                target_package_name = \
                    base_package + '.' + target_package_name[num_dots:]
            else:
                target_package_name = target_package_name[num_dots:]

            target_filename = \
              os.path.join(path_to_package,
                           os.path.join(*target_package_name.split('.')),
                           'compiled_pyke_files.py')

            if debug:
                print >> sys.stderr, "_create_target_pkg " \
                                       "absolute target_package_name:", \
                                     target_package_name

        if target_package_name in target_pkgs:
            tp = target_pkgs[target_package_name]
        else:
            target_name = target_package_name + '.compiled_pyke_files'
            if debug:
                print >> sys.stderr, "_create_target_pkg target_name:", \
                                     target_name
            tp = None
            try:
                # See if compiled_pyke_files already exists.
                tp = _get_target_pkg(target_name)
            except ImportError:
                pass
            if tp is None:
                if debug:
                    print >> sys.stderr, "_create_target_pkg: no target module"
                tp = target_pkg.target_pkg(target_name, target_filename)
            tp.reset()
            target_pkgs[target_package_name] = tp

        source_package_dir = \
          os.path.join(path_to_package,
                       os.path.join(*source_package_name.split('.')))
        if not os.path.isdir(source_package_dir):
            source_package_dir = os.path.dirname(source_package_dir)
            remainder_path = os.path.dirname(remainder_path)
        tp.add_source_package(source_package_name, remainder_path,
                              source_package_dir)
예제 #26
0
    def _create_target_pkg(self, path, target_pkgs):
        # Does target_pkg.add_source_package.

        if debug: print("engine._create_target_pkg:", path, file=sys.stderr)

        # First, figure out source_package_name, source_package_dir
        #               and target_package_name:
        target_package_name = '.compiled_krb'  # default
        if isinstance(path, (tuple, list)):
            path, target_package_name = path
        if isinstance(path, types.ModuleType):
            path = path.__file__
        if not isinstance(path, ((str, ), type(None))):
            raise ValueError("illegal path argument: string expected, got " + \
                               str(type(path)))

        if debug:
            print("_create_target_pkg path:", \
                                 repr(path), file=sys.stderr)
            print("_create_target_pkg target_package_name:", \
                                 repr(target_package_name), file=sys.stderr)

        # Handle the case where there are no source files (for a distributed
        # app that wants to hide its knowledge bases):
        if path is None:
            assert target_package_name[0] != '.', \
                   "engine: relative target, %s, illegal " \
                   "with no source package" % \
                       target_package_name
            if target_package_name not in target_pkgs:
                # This import must succeed!
                tp = _get_target_pkg(target_package_name +
                                     '.compiled_pyke_files')
                if tp is None:
                    raise AssertionError("%s: compiled with different version "
                                         "of Pyke" % target_package_name)
                tp.reset(check_sources=False)
                target_pkgs[target_package_name] = tp
            return

        path = os.path.normpath(os.path.abspath(path))

        path_to_package, source_package_name, remainder_path, zip_file_flag = \
          _pythonify_path(path)

        if debug:
            print("_create_target_pkg path to " \
                                   "_pythonify_path:", \
                                 repr(path), file=sys.stderr)
            print("    path_to_package:",
                  repr(path_to_package),
                  file=sys.stderr)
            print("    source_package_name:", \
                                 repr(source_package_name), file=sys.stderr)
            print("    remainder_path:", repr(remainder_path), file=sys.stderr)
            print("    zip_file_flag:", zip_file_flag, file=sys.stderr)

        target_filename = None

        # Convert relative target_package_name (if specified) to absolute form:
        if target_package_name[0] == '.':
            num_dots = \
                len(target_package_name) - len(target_package_name.lstrip('.'))
            if debug:
                print("_create_target_pkg num_dots:",
                      num_dots,
                      file=sys.stderr)
            if num_dots == 1:
                base_package = source_package_name
            else:
                base_package = \
                    '.'.join(source_package_name.split('.')[:-(num_dots - 1)])
            if base_package:
                target_package_name = \
                    base_package + '.' + target_package_name[num_dots:]
            else:
                target_package_name = target_package_name[num_dots:]

            target_filename = \
              os.path.join(path_to_package,
                           os.path.join(*target_package_name.split('.')),
                           'compiled_pyke_files.py')

            if debug:
                print("_create_target_pkg " \
                                       "absolute target_package_name:", \
                                     target_package_name, file=sys.stderr)

        if target_package_name in target_pkgs:
            tp = target_pkgs[target_package_name]
        else:
            target_name = target_package_name + '.compiled_pyke_files'
            if debug:
                print("_create_target_pkg target_name:", \
                                     target_name, file=sys.stderr)
            tp = None
            try:
                # See if compiled_pyke_files already exists.
                tp = _get_target_pkg(target_name)
            except ImportError:
                pass
            if tp is None:
                if debug:
                    print("_create_target_pkg: no target module",
                          file=sys.stderr)
                tp = target_pkg.target_pkg(target_name, target_filename)
            tp.reset()
            target_pkgs[target_package_name] = tp

        source_package_dir = \
          os.path.join(path_to_package,
                       os.path.join(*source_package_name.split('.')))
        if not os.path.isdir(source_package_dir):
            source_package_dir = os.path.dirname(source_package_dir)
            remainder_path = os.path.dirname(remainder_path)
        tp.add_source_package(source_package_name, remainder_path,
                              source_package_dir)
예제 #27
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'remedyget.krb'): [1508658783.2108674, 'remedyget_bc.py'],
            ('', '', 'remedies.kfb'): [1508658783.2108674, 'remedies.fbc'],
        }, compiler_version)
예제 #28
0
def get_target_pkg():
    return target_pkg.target_pkg(__name__, __file__, pyke_version, loader, {
        ('', 'engine/', 'deseases.krb'): [1571096453.155668, 'deseases_bc.py'],
    }, compiler_version)
예제 #29
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'fc_rules.krb'): [1520645481.0331001, 'fc_rules_fc.py'],
            ('', '', 'famous.kfb'): [1520645481.071423, 'famous.fbc'],
        }, compiler_version)
예제 #30
0
def get_target_pkg():
    return target_pkg.target_pkg(
        __name__, __file__, pyke_version, loader, {
            ('', '', 'fc_rules.krb'): [1520878628.131412, 'fc_rules_fc.py'],
            ('', '', 'famous.kfb'): [1520878628.142036, 'famous.fbc'],
        }, compiler_version)