Skip to content

mightyelf13/Non-Procedural-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Non-Procedural Programming

This repository contains homework and practice tasks written in Prolog and Haskell.
Each folder corresponds to one language, and each subfolder/task demonstrates a specific non-procedural programming concept.

Work in progress — learning and experimenting with declarative programming paradigms.

What is Non-Procedural Programming?

Non-procedural (declarative) programming focuses on what should be computed rather than how to compute it.
Instead of specifying step-by-step control flow, the programmer defines rules, relations, expressions, and constraints.
The runtime or language engine determines the execution strategy.

Non-procedural paradigms include:

  • Logic programming (e.g., Prolog)
  • Functional programming (e.g., Haskell)
  • Constraint-based programming
  • Query languages / rule systems (SQL, Datalog)

Key ideas:

  • Describe properties and relationships.
  • Let the language evaluate or search for results.
  • Programs look like math definitions, not algorithms.
  • Focus on reasoning, correctness, and immutability.

Repository Structure

/Prolog/ # Logic programming tasks ├── task1/ ├── task2/ └── ...

/Haskell/ # Functional programming tasks ├── task1/ ├── task2/ └── ...

markdown Copy code

Each task folder contains:

  • Source files in the language of the directory
  • Problem statement or comments explaining the goal
  • My solution to the assignment

Languages Used

Prolog (Logic Programming)

  • Code expresses facts, rules, and queries
  • Execution resolves goals via unification and backtracking
  • Good for search, symbolic reasoning, and constraints

Haskell (Functional Programming)

  • Pure functions, immutability, and strong static typing
  • Evaluates expressions rather than executing commands
  • Uses algebraic data types and recursion as core tools

How to Run

Prolog

Requires SWI-Prolog (or similar):

swipl file.pl
?- query_here.
Haskell
Requires GHC / GHCi:

bash
Copy code
ghci file.hs
> main

About

Working mainly on Haskell and prolog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published