joaooliveira-11 / feup-pfl

L.EIC 3ʳᵈ year / 1ˢᵗ semester

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feup-pfl

Project 1 - Apart Board Game with Prolog

  • Human vs Human;
  • Human vs Computer;
  • Computer vs Computer;
  • Bot lvl 1 (random) and Bot lvl 2 (greedy);
  • AI program using Minimax algorithm with board evaluation to predict oponnent's movements.

Project 2 - Haskell Compiler

  • Low-level machine with configurations of the form (c, e, s) where c is a list of instructions to be executed, e is the evaluation stack, and s is the storage.
  • The instructions of the machine are: push-n, add, mult, sub, true, false, eq, le, and, neg, fetch-x, store-x, noop, branch(c1, c2) and loop(c1, c2.
  • Development of a small imperative programming language with arithmetic and boolean expressions, and statements consisting of assignments of the form x := a, sequence of statements (instr1 ; instr2), if then else statements, and while loops.
  • Development of a compiler from this language into lists of instructions in the previous machine.
  • Development of a parser and lexer which transforms an imperative program represented as a string into its corresponding representation in the Stm data (a list of statements Stm) ready to be compiled.

About

L.EIC 3ʳᵈ year / 1ˢᵗ semester


Languages

Language:Prolog 52.0%Language:Haskell 48.0%