The compositional relational programming (CRP) is a purely declarative and naturally compositional programming paradigm, but the low readability and some binding issues limit its use. The main purpose in this thesis is utilizing the common binding patterns identified from Prolog programs to improve current argument binding mechanism in CRP. In order to collect relevant Prolog rules and convert them to a measurable form, a data mining tool is built and applied to extract data from Prolog code repository. After the analysis, two kinds of patterns are identified respectively, based on the binding outside and inside the logical combination. Correspondingly, the projection operator make is optimized for highlighting the dummy argument; three extended and combinators are proposed to handle common binary combinations; the join operator is modified to efficiently and flexibly combine multiple predicates. In the future, the usability of those improved operators should be carefully evaluated.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:uu-296131 |
Date | January 2016 |
Creators | Luo, Tong |
Publisher | Uppsala universitet, Institutionen för informatik och media |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0016 seconds