Created
December 6, 2018 23:12
-
-
Save nikomatsakis/0ff064172ff11109eab978419fa937ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% name(Id, TheName). | |
% crate(Id, Crate). | |
% size(Id, TheSize). | |
% one of: | |
% code(Id). | |
% data(Id). | |
% debug(Id). | |
% misc(Id). | |
% edge(Id, Id). | |
% outputNode(OutputId, Id). | |
outputNode(Crate, Id) :- | |
crate(Id, Crate), | |
notLocal(Crate). | |
funcTriple(Func, Id, IdHeader, IdBody) :- | |
misc(Id), | |
edge(Id, IdHeader), | |
edge(Id, IdBody), | |
\+ IdHeader = IdBody. | |
outputNode(Func, Id) :- funcTriple(Func, Id, _, _). | |
outputNode(Func, Id) :- funcTriple(Func, _, Id, _). | |
outputNode(Func, Id) :- funcTriple(Func, _, _, Id). | |
misc(Id), edge(Id, IdHeader), edge(Id, IdBody), \+ IdHeader = IdBody | |
<=> | |
outputNode(Func, Id), outputNode(Func, IdHeader), outputNode(Func, IdBody). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment