Skip to content

robcholz/DeepThoughtFixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepThoughtFixer

Fixed the trash NC State DeepThought grading system for CSC226.

Hopefully they will update their annoying system.

Endpoints

This API provides endpoints for retrieving applicable logical rules and applying specific rules to given propositions.

1. Autocomplete Available Rules

Endpoint:
GET /autocomplete_rules_available

Returns a list of applicable logical rules based on the given propositions.

Request

• left (optional): First proposition (string).

• right (optional): Second proposition (string).

{
  "left": "P -> Q"
}

Response

• If valid propositions are provided, returns a list of applicable rules.

• If both propositions are missing, returns an error.

• If syntax errors exist in the propositions, returns an error.

{
  "data": [
    "DoubleNegation",
    "ConditionalIdentity",
    "Contrapositive",
    "Tautology"
  ],
  "error": ""
}

2. Apply a rule

Endpoint:
GET /apply_the_rule

Applies a given logical rule to one or two provided propositions and returns the resulting propositions.

Request

• rule (required): A valid logical rule from the predefined Rule set.

• left (optional): First proposition (string).

• right (optional): Second proposition (string).

{
  "rule": "DeMorgan",
  "left": "!(P & Q)"
}

Response

• Returns the transformed propositions after applying the rule.

• If the rule cannot be applied to the given propositions, an error is returned.

• If invalid syntax or missing propositions are detected, an error is returned.

{
  "data": [
    "(!P | !Q)"
  ],
  "error": ""
}

About

NC State DeepThought grading system is a trash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages