Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thkox/uni_2022-logic-programming-multiple-exercises
This repository contains solutions for the exercises from the "Logical Programming" course, offered in the 5th semester of the 2022 academic year at the University of Piraeus, Department of Informatics.
https://github.com/thkox/uni_2022-logic-programming-multiple-exercises
2022 5th-semester department-of-informatics prolog prolog-exercises prolog-language prolog-rules university-of-piraeus
Last synced: 15 days ago
JSON representation
This repository contains solutions for the exercises from the "Logical Programming" course, offered in the 5th semester of the 2022 academic year at the University of Piraeus, Department of Informatics.
- Host: GitHub
- URL: https://github.com/thkox/uni_2022-logic-programming-multiple-exercises
- Owner: thkox
- License: mit
- Created: 2024-08-12T23:06:57.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-19T22:31:01.000Z (3 months ago)
- Last Synced: 2024-11-03T21:05:25.376Z (2 months ago)
- Topics: 2022, 5th-semester, department-of-informatics, prolog, prolog-exercises, prolog-language, prolog-rules, university-of-piraeus
- Language: Prolog
- Homepage:
- Size: 1000 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Logic programming (2022) - Multiple Exercises
## Project Overview
This repository contains solutions for the exercises from the "Logical Programming" course, offered in the 5th semester of the 2022 academic year at the University of Piraeus, Department of Informatics. The exercises are implemented in Prolog, and each solution is accompanied by a detailed PDF document that includes the code and an example of correct execution.
## Course Information
- **Institution:** [University of Piraeus](https://www.unipi.gr/en/)
- **Department:** [Department of Informatics](https://cs.unipi.gr/en/)
- **Course:** Logic programming (2022)
- **Semester:** 5th## Technologies Used
- Prolog
## Repository Structure
The repository is organized into three folders, each corresponding to a specific exercise. Inside each folder, you will find:
- A `.pl` file containing the Prolog code for the exercise.
- A `.pdf` file with documentation, including an explanation of the solution and examples of correct execution.## Exercise Descriptions
### Exercise 1
- **Task**: Implement Prolog predicates for managing and querying a database of families registered in a municipal registry.
- **Topics Covered**: Prolog knowledge base, list handling, querying with conditions based on family size, birth year, and employment status.![First exercise](./images/first-exercise.png)
### Exercise 2
- **Task**: Write Prolog predicates to operate on lists, including determining list precedence, inclusion, and finding common elements.
- **Topics Covered**: List operations in Prolog, including sublist detection, element matching, and list pairing.![Second Exercise](./images/second-exercise.png)
### Exercise 3
- **Task**: Model an object (e.g., a personal computer) in Prolog, including its components and subcomponents, and query its properties and materials.
- **Topics Covered**: Prolog facts and rules, hierarchical data modeling, material classification, and complex querying.![Third Exercise 1](./images/third-exercise-1.png)
![Third Exercise 2](./images/third-exercise-2.png)
![Third Exercise 3](./images/third-exercise-3.png)## How to Run the Code
1. Ensure you have Prolog installed on your machine.
2. Navigate to the desired exercise folder in your terminal or Prolog environment.
3. Load the Prolog file by running the following command:
```prolog
[number-exercise].
```
Replace `number` with the exercise number (first, second, or third).
4. Execute the queries provided in the documentation PDF to test the solutions.## License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.