Code Monkey home page Code Monkey logo

prolog-querry-language's Introduction

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.

prolog-querry-language's People

Contributors

blunderboy avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.