diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-10-16 08:48:20 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-10-16 08:49:48 +0200 |
commit | c368b1d4b7d1dfe148ba93ffc1c0de7122c4e66b (patch) | |
tree | de89e853fefa6725c76745e8e47bbe23ece3c58d /src/ee/souffle | |
parent | 038152393727bfafc26f25e3e5c14e6f1219e07a (diff) | |
download | ee-python-c368b1d4b7d1dfe148ba93ffc1c0de7122c4e66b.tar.gz ee-python-c368b1d4b7d1dfe148ba93ffc1c0de7122c4e66b.tar.bz2 ee-python-c368b1d4b7d1dfe148ba93ffc1c0de7122c4e66b.tar.xz ee-python-c368b1d4b7d1dfe148ba93ffc1c0de7122c4e66b.zip |
souffle: Adding support for categories.
Diffstat (limited to 'src/ee/souffle')
-rw-r--r-- | src/ee/souffle/digikey.dl | 1 | ||||
-rw-r--r-- | src/ee/souffle/part.dl | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ee/souffle/digikey.dl b/src/ee/souffle/digikey.dl index fad22dd..b1c65b0 100644 --- a/src/ee/souffle/digikey.dl +++ b/src/ee/souffle/digikey.dl @@ -1,4 +1,5 @@ #include "facts.dl" +#include "part.dl" .decl add_fact(part_uri:symbol, key:symbol, value:symbol) .output add_fact diff --git a/src/ee/souffle/part.dl b/src/ee/souffle/part.dl new file mode 100644 index 0000000..eea7faa --- /dev/null +++ b/src/ee/souffle/part.dl @@ -0,0 +1,9 @@ +// Generic rules for parts + +.decl part_category(part: symbol, category: symbol) +part_category(part, category) :- part_main_category(part, category). + +part_category(part, parent) :- part_category(part, category), + category(category, _, parent, _), + parent != "". +.output part_category |