Git Product home page Git Product logo

oh-camel's Introduction

oh camel!

Programs written in OCaml / Prolog for the IIT D Course COL 765 - "Introduction to Logic & Functional Programming" taught by Sanjiva Prasad.

If you're looking for Class Notes. Here is a PDF.

List of Assignments

  1. Sets using Lists (scored 10/10)
  2. Propositions and Conversion to CNF etc. (scored 9/10)
  3. Natural Deduction Proof Trees (scored 9/10)
  4. Terms (on a signature) and Substitutions (scored 7.5/10)
  5. Propositional Resolution via Backtracking (scored 10/10)
  6. Prolog Interpreter in OCaml (scored 3/10)
  7. Type Checker in Prolog (scored 7/10)

Bugs

I did not get full marks in all assignments, so the code is not fully correct. Some of the issues I remember are:

  • Assignment 2:

    • Tautology / Contradiction functions were failing in some cases.
  • Assignment 3:

    • normalise has some issues, so one of the trees from the TA's test cases was not getting normalised correctly.
  • Assignment 4:

    • Some edge case in check_sig
    • Some edge case in mgu
    • Height of a constant (Node("a", [])) should've been 0 not 1.
    • Didn't know what was meant by "efficient substitution"
  • Assignment 6:

    • No support for prolog lists so append() function couldn't be created
    • No support for X \= Y etc operators
    • Infinite recursion in many test cases
    • The values being printed were not resolved properly
  • Assignment 7:

    • The Or Elimination (case(E0, E1, E2)) was wrong
      • It should take inl(X), inr(Y) as parameters

Other repositories

This repo by a '2015 student was quite helpful (especially in the 2nd assignment).

There's not much prior code for this course on the web, but Sanjiva Sir also teaches a course on "Programming Languages" in which he once gave a Prolog Interpreter assignment so GitHub has a ton of other examples for this. This is the one I took help from.

Here is another repository by one of my classmates (so it'll have same assignments).

Beware of MOSS

MOSS is a tool that can detect similarity in code and it works on OCaml. So If you're copying code from here, do remember to make sufficient changes and be prepared to get a fail grade if you are caught.

You can also register for the MOSS service so you can check your similarity score before submitting the assignment. You should aim at keeping the score below 20.

Support

If you're having trouble understanding some part of the code, feel free to open an issue.

oh-camel's People

Contributors

dufferzafar avatar

Stargazers

 avatar

Watchers

 avatar  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.