Skip to content

rpbeltran/Aggro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aggro

Declarative Programming in Straight Up Natural Language

Installing

We require Python 2.7, nltk, and a few nltk packages.

If you already have Python installed, the rest can be aquired by running the provided installer.py

$python installer.py

Usage

Syntax Features

Logical

  • Universal Instantiation
  • Ternary expressions

Boolean

  • Boolean constants
  • And
  • Or
  • Negation
  • Comparisons

Numeric

  • Constants
  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Modulus

Collections

  • Ranges
  • Enumerated lists
  • Tail recursion

Examples

"A number n is prime if there exists no number m in the range of 1 to n such that m divides n evenly. Is 73 prime?"

"The product of a list l is the head of l if the size of the list is 1, otherwise the head of l times the product of the tail of l. What is the product of the list containing 3, 7, 8, and 15?"

"A year y is a leap year if 4 divides y evenly and y does not divide 100 or y divides 400. Is 2012 a leap year?”

About

Declarative Programming in Natural Language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published