awto / fnotation Goto Github PK
View Code? Open in Web Editor NEWFunction notation for Prolog
License: BSD 3-Clause "New" or "Revised" License
Function notation for Prolog
License: BSD 3-Clause "New" or "Revised" License
This is the best i found, but some translations are incorrect.
for example,
process_request_depreciation_new :-
request_data(D),
doc_value(D, depr_ui:depreciation_queries, _),
( maplist(process_depreciation_asset, $> doc_list_items($> doc_value(D, depr_ui:depreciation_assets)))
-> true
; throw_string('depreciation: assets processing failed')),
% events sheet is optional
( doc_value(D, depr_ui:depreciation_events, Events)
-> ( maplist(process_depreciation_event, $> doc_list_items(Events))
-> true
; throw_string('depreciation: events processing failed'))
; true
),
( maplist(process_depreciation_query, $> doc_list_items($> doc_value(D, depr_ui:depreciation_queries)))
-> true
; throw_string('depreciation: queries processing failed')).
is translated into:
user:process_request_depreciation_new :-
request_data(A),
doc_value(A,
'https://rdf.lodgeit.net.au/v1/calcs/depr/ui#depreciation_queries',
_),
doc_value(A,
'https://rdf.lodgeit.net.au/v1/calcs/depr/ui#depreciation_assets',
B),
doc_list_items(B, C),
( '__aux_maplist/2_process_depreciation_asset+0'(C)
-> true
; throw_string('depreciation: assets processing failed')
),
doc_list_items(D, E),
( doc_value(A,
'https://rdf.lodgeit.net.au/v1/calcs/depr/ui#depreciation_events',
D)
-> ( '__aux_maplist/2_process_depreciation_event+0'(E)
-> true
; throw_string('depreciation: events processing failed')
)
; true
),
doc_value(A,
'https://rdf.lodgeit.net.au/v1/calcs/depr/ui#depreciation_queries',
F),
doc_list_items(F, G),
( '__aux_maplist/2_process_depreciation_query+0'(G)
-> true
; throw_string('depreciation: queries processing failed')
).
note how the second and third calls to doc_value
are put to the beginning. In the first case, it works well, because the doc_value(A, 'https://rdf.lodgeit.net.au/v1/calcs/depr/ui#depreciation_assets', B),
does not depend on the subsequent doc_list_items(B, C),
.
But in the second case, the doc_list_items(D, E),
depends on the ( doc_value(A, 'https://rdf.lodgeit.net.au/v1/calcs/depr/ui#depreciation_events', D)
, which is called after it.
Other problems show around swipl dicts.
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.