From 0259c6f907875b54e5d1df4bc89efa1c293d2812 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 27 May 2019 08:52:38 +0200 Subject: Adding Soufflé based reasoning on parts. Replacing default configuration with applying python function with this new reasoner. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ee/souffle/digikey.dl | 3 +++ src/ee/souffle/kicad.dl | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/ee/souffle/digikey.dl create mode 100644 src/ee/souffle/kicad.dl (limited to 'src/ee/souffle') diff --git a/src/ee/souffle/digikey.dl b/src/ee/souffle/digikey.dl new file mode 100644 index 0000000..735dd2d --- /dev/null +++ b/src/ee/souffle/digikey.dl @@ -0,0 +1,3 @@ +#include "facts.dl" + +.output fact diff --git a/src/ee/souffle/kicad.dl b/src/ee/souffle/kicad.dl new file mode 100644 index 0000000..5448b05 --- /dev/null +++ b/src/ee/souffle/kicad.dl @@ -0,0 +1,43 @@ +#include "facts.dl" + +.output fact + +/* +.decl is_resistor(uri:symbol) +.decl is_capacitor(uri:symbol) +.decl is_inductor(uri:symbol) + +is_resistor(Ref) :- + resistor_lib(lib). + fact(Ref, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib). + +is_capacitor(Ref) :- + capacitor_lib(lib). + fact(Ref, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib). + +is_inductor(Ref) :- + inductor_lib(lib). + fact(Ref, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib). +*/ + +.decl resistor_lib(name:symbol) +resistor_lib("Resistor_SMD"). +resistor_lib("Resistor_THT"). + +.decl capacitor_lib(name:symbol) +capacitor_lib("Capacitor_SMD"). + +.decl inductor_lib(name:symbol) +inductor_lib("Inductor_SMD"). + +fact(Ref, "http://purl.org/ee/fact-type/ee-component-type", "http://purl.org/ee/part-type#resistor") :- + resistor_lib(lib), + fact(Ref, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib). + +fact(Ref, "http://purl.org/ee/fact-type/ee-component-type", "http://purl.org/ee/part-type#capacitor") :- + capacitor_lib(lib), + fact(Ref, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib). + +fact(Ref, "http://purl.org/ee/fact-type/ee-component-type", "http://purl.org/ee/part-type#inductor") :- + inductor_lib(lib), + fact(Ref, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib). -- cgit v1.2.3