Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995753
containers.lp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 8, 1:37 AM
Size
1 KB
Mime Type
text/plain
Expires
Fri, Jul 10, 1:37 AM (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
271737
Attached To
rXR Xreate
containers.lp
View Options
%1. Domain definitions:
impl(solid; on_the_fly; linked_list).
op(seqaccess; randaccess).
relation(recommends; satisfied; unsupported).
relation_score(satisfied, 0).
relation_score(recommends, 1).
score(0..1).
%2. Domain facts:
relation_op(seqaccess, on_the_fly, recommends).
relation_op(randaccess, solid, recommends).
relation_op(randaccess, on_the_fly, unsupported).
bind(X, impl(solid)):- bind(X, dfa_operator(list)).
bind(X, impl(on_the_fly)):- bind(X, dfa_operator(list)).
bind(X, l0_op(seqaccess)) :- bind(X, dfa_operator(loop_fold)).
bind(X, l0_op0(randaccess)) :- bind(X, dfa_operator(index)).
%5. Manual input
%2. Supplies
%4. Best implemetation search:
score(op(OP), IMPL, SCORE):- SCORE = #sum{SCORE1, SCORE1: relation_score(RL, SCORE1), relation_op(OP, IMPL, RL)}; op(OP); impl(IMPL); not relation_op(OP, IMPL, unsupported).
{score(v(VAR), IMPL, SCORE)}:- score(op(OP), IMPL, SCORE); bind(VAR, op(OP)); bind(VAR, impl(IMPL)).
:- 2{score(v(VAR), IMPL, SCORE): v(VAR)}.
#maximize { SCORE, (VAR, SCORE): score(v(VAR), _, SCORE) }.
%5. Output
bind_decision(VAR, SUBJECT, RESOLUTION) :- SUBJECT=implementation; RESOLUTION=IMPL; score(v(VAR), IMPL, _).
%1. DFA input
v(a).
bind(a, dfa_operator(list)).
bind(a, dfa_operator(loop_fold)).
Event Timeline
Log In to Comment