https://github.com/amitojbrar/logic-assig

Completed for partial fulfillment of CS F214 Logic in Computer Science course

https://github.com/amitojbrar/logic-assig

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Completed for partial fulfillment of CS F214 Logic in Computer Science course

Basic Info
  • Host: GitHub
  • Owner: amitojbrar
  • License: gpl-3.0
  • Language: Prolog
  • Default Branch: master
  • Size: 23.4 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 8 years ago · Last pushed over 8 years ago
Metadata Files
Readme License

README.md

Prolog Assignment

Completed in partial fulfillment of CS F214 Logic in Computer Science course

Group members: 1. Aman Agrawal(2014B3A7748P) 2. Amitojdeep Singh(2014B3A7615P) 3. Siddharth Nagpal(2014B3A7743P)

/DOCUMENTATION FOR QUESTION1/

Note: Enter all algebraic variables like x,y,p,q etc is lower case(Not X,Y,P,Q).

1.1. ALGEBRAIC SIMPLIFICATION: first enter 'simplify.' to begin the operation.Uses rational number simplification when required.

1.1.1. 1 ?- simplify.

Enter an algebraic expression, or "exit" (x(y/y)-x)y.

Simplification is 0

1.1.2 Enter an algebraic expression, or "exit" |: 5+4+x.

Simplification is 9+x

1.1.3. Enter an algebraic expression, or "exit" |: 14/8 + x.

Simplification is 7/4+x

1.2 COMPARE ALGEBRAIC EXPRESSIONS: first enter 'compare.' to begin operation.

1.2.1 1 ?- compare. Enter first expression, or "exit" 5+4+x.

Enter second algebraic expression|: 2+7+x. Both expressions are equal

1.2.2. Enter first expression, or "exit" (X(Y/Y)-X)X.

Enter second algebraic expression|: X-X. Both expressions are equal

1.3. RATIONAL NUMBER NORMALIZATION: first enter 'rational.' to use as a standalone operation. More effective as standalone than calling through simplify due to precendence & commutativity reasons. 4 test cases are shown here. Note: ENCLOSE RATIONAL NUMBERS IN PARENTHESIS WHILE MULTIPLYING(*).

1 ?- rational.

Enter a rational number, or "exit" 14/8. Rational number in normal form is 7/4

Enter a rational number, or "exit" |: 15/7-1/7. Rational number in normal form is 2/1

Enter a rational number, or "exit" |: (14/8)*(2/7). Rational number in normal form is 1/2

Enter a rational number, or "exit" |: 9/5+2/5. Rational number in normal form is 11/5

Enter a rational number, or "exit" |: exit.

true.

/DOCUMENTATION FOR QUESTION2/ Some sample inputs and outputs are shown below. We have given example for one student structure and a few courses are also encoded.

1 ?- overallinchargeof_process. Dean ARC

2 ?- getstudentdues('2014A7PS001P',Y). Y = 0.

3 ?- typeofregistration('2014A7PS001P',Y). Correct to: "typeofregisteration('2014A7PS001P',Y)"? Please answer 'y' or 'n'? yes Amended Registeration Y = student_altered.

4 ?- permittedtoregister('2014A7PS001P'). Gradesheet withheld, student cannot register

5 ?- can_depart('2014A7PS001P'). Can depart from normal sem pattern, justification is given

6 ?- get_prereq('MATHEMATICS III',Y). Y = [['MATHEMATICS II']]

7 ?- registerincourse('2014A7PS001P'). In which course do you want to register?'MATHEMATICS II' |: . You can register for this course

8 ?- higherdegreecourse('2014A7PS001P'). Which higher degree course you want to do?'SOFTWARE SYSTEMS'. You cannot do a higher degree course

9 ?- eligibility_nextsem('2014A7PS001P'). You will be provided with a modified semester wise pattern

10 ?- seconddegreecourse('2014A7PS001P'). Cannot do a second degree course, not done DERIVATIVES AND RISK MANAGEMENT

11 ?- ps_I('2014A7PS001P'). You are not eligible for PS-I

12 ?- ps_II('2014A7PS001P'). You are not eligible for PS-II

13 ?- canstudentgraduate('2014A7PS001P'). Are u pursuing a thesis9 or thesis16 or PS'PS'. You are eligible to graduate.

14 ?- timetable_conflict('2014A7PS001P'). There is conflict in hour no 6.

Owner

  • Name: Amitoj Brar
  • Login: amitojbrar
  • Kind: user
  • Location: Waterdown, Canada
  • Company: @Shopify

Applied MLE @ Shopify

GitHub Events

Total
Last Year