Firewall-Rules
This repository contains assignment submission to the course 'Logic in Computer Science' at BITS Pilani by me and Priyanka Verma.
It is a prolog encoding of Firewall rules.
Problem Statement
Firewall rules are encoded in Prolog as facts and rules: each rule may start with accept (allow the incoming packet), reject (send reject information to sender), or drop (silently) followed by a clause. [see documentation for syntax]
Documentation -
Firewall language rules
Firewall language syntax
Write a Prolog program to apply encoded rules on any incoming packet. Note that multiple rules may apply.
The Solution
Code contains the prolog encoding
Instructions contains the instructions for passing query to the prolog program
Database contains a list of all predicates used in prolog code to encode the rules
Sample Inputs contains some sample input queries along with the obtained outputs