blunderboy / prolog-querry-language Goto Github PK
View Code? Open in Web Editor NEWSmall program written in Prolog for table queries.
Small program written in Prolog for table queries.
Macarie Razvan Cristian, 322CB Print: Pentru print am mers pe aceiasi idee ca tema in Haskell si de data asta era oarecum mai usor ca trebuie facut asa datorita felului in care merge make_format_string. Am transformat toate stringurile din tabel intr-un numar, respectiv lungimea lor si am facut asta pe toate liniile. Dupa aceea am transpus matricea rezultata si am calculat maximul pe linii (adica pe coloane daca ar fi netranspusa). Dupa asta am facut o lista cu maximele din listele matricei. In final apelez recursiv format pe toate linii matricei. PQL - Prolog Query Language (HQL > PQL sincer) Join: Join e un maplist... Se aplica recursiv pe elemente predicatul. (un fel de zipWith din Haskell). Select: Select ia headerul tabelului si lista de coloane si face o lista de indecsi. Cu lista de indecsi folosesc takeIndex care introcude elementul X luat recursiv din lista de indecsi intr-o lista de coloane. In final transpun lista de coloane si am ajuns la rezultat. TailHeader si HeaderTabel sunt helpere care intorc header si tail, adica schema = header, tail = intrari. Filter: Filter e un predicat de verificare a constrangerilor pe care l-am facut si la curs (csp). Eval: Eval ne evalueaza recursiv clauzele, incepand cu cea mai nested. Dupa ce evalueaza functia nested urmatoare, evalueaza apoi operatia curenta, asta se face recursiv pana la ultima operatie. ComplexQ1 Am aplicat filtru peste filtru si am folosit sub_string ca sa vad daca se gaseste escu in nume. Nu am verificat sa fie la final totusi, dar functioneaza.
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.