eyereasoner / koreografeye Goto Github PK
View Code? Open in Web Editor NEWA web choreography service using eye
License: MIT License
A web choreography service using eye
License: MIT License
Rename the current DemoPlugin to DebugPlugin
https://github.com/eyereasoner/Koreografeye/blob/main/src/policy/Extractor.ts#L46
Take policy:
ex:MySendNotificationDemo pol:policy [
a fno:Execution ;
fno:executes ex:sendNotification ;
ex:to <http://patrickhochstenbach.net/inbox/> ;
ex:notification [
a as:Accept ;
as:inReplyTo ?id ;
as:actor <http://patrickhochstenbach.net/profile/card#me> ;
as:origin <http://patrickhochstenbach.net/orchestrator/profile/card#me> ;
as:target ?actor;
as:object ?id
]
] .
The ex:sendNotification
as two parameters ex:to
and ex:notification
this means that block L46 is executed two times. Refactor this into one loop.
This will make it much easier to run the Koreografeye scripts with npx
and support non-linux installations.
Koreografeye/src/policy/PolicyPlugin.ts
Lines 14 to 16 in 3fa0ed8
Due to the IPolicyType
type having for the arguments only the possibility to have an RDF.Term with cardinality one, the extractPolicies
algorithm will pick a random RDF.Term for the arguments where in the conclusion of an N3 rule where this cardinality was N.
My proposal is to fix this by introducing a breaking change that will fix this problem:
export type IPolicyType = {
node: N3.NamedNode | N3.BlankNode;
path: string;
policy: string;
target: string;
mainSubject: string;
origin: string;
order: number;
args: {
[key: string]: RDF.Term[];
};
};
For this, extractPolicies
must also be changed to make it possible to add a list of RDF.Term[].
Furthermore, there will be no undefined anymore since it can now have the empty list.
Aparently the building and registration of the ComponentsManager has some overhead. It could be a future refactor step to move this to a higher level. When we eventually need a Koreagrafeye that need to have multiple runs of the reasoner this could remove some of this overhead.
https://github.com/eyereasoner/Koreografeye/blob/main/src/orchestrator/Reason.ts#L19
These lines:
const manager = await ComponentsManager.build({
mainModulePath: path.join(__dirname, '../..') , // Path to your npm package's root
});
await manager.configRegistry.register(componentsPath);
Need to check with eye dev.
See also : https://github.com/jeswr/pretty-turtle
import { write } from '@jeswr/pretty-turtle';
write(quads, { format: 'text/n3', prefixes: {} })
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.