Skip to content
 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

01-logic-programming

The goal of these exercises if to simulate the students within the Semantics course using logic programming. We will use LogicKit, a MicroKanren implementation in Swift.

Define students

Using the example, define all the students.

Find a student

Write a function is_student(who: Student) -> Bool that returns true if its parameter is a student, or false otherwise.

Find all the students

Write a function all_students() -> [Student] that returns all the students.

Define attendance

Attendance is a relation between a student, a course and a year. Define it.

Find attendances

Write a goal attends(who: Student, course: Course, year: Year) -> Bool that returns true for the correct attendances.

Find all students in Semantics 2017

Find all students that have been or are in the Semantics course

Find all courses that a student has taken, and their year

About

Exercises on Logic Programming

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages