Giter VIP home page Giter VIP logo

sequoia's Introduction

Sequoia

Sequent calculus proof construction tool

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Node.js, Bower and MongoDB installed.

Installing

Clone the repo

git clone https://github.com/AboudFayad/sequoia.git 

Installing the dependencies

cd sequoia
npm install
bower install

Running

Run mongoDB

mongod

Then, run the server

npm start

The application should now be running on localhost:3000.

sequoia's People

Contributors

aboudfayad avatar gisellemnr avatar

Watchers

 avatar  avatar

sequoia's Issues

Updating npm packages to fix vulnerabilities

A number of packages that sequioa depends on are now old versions and have major vulnerabilities. Updating them is easy but some of the functions used in sequioa depend on are deprecated in the newer versions of the packages. Hence the code needs to be changed.

Add a front page and a user system

We need a front page talking about sequoia and what it does for people who view the website, so they have a better idea of what we are and what we do. In addition, if people are going to visit us, wouldn't we like for them to be able to make an account to start using sequoia and saving, importing, and downloading their proofs ๐Ÿ˜‰.

So we need the following:

  • A nice front page detailing who we are and what we do

  • A user model

  • A user account controller (creating, signing in, signing out, updating, deleting)

  • A user controller to save, get, delete, and update proofs

Moving all the frontend javascript to the backend as controllers

The files used to apply rules and parse the user input and more are all in the frotnend, which allows any user to access them. Which is not necessarily bad, since it offloads the work off the server, but it is better to have them in the backend to be able to use them as an API service. This gives us the freedom to use languages other than pure javascript and the use of npm packages and other libraries if needed. In addition to making it accessible with other platforms such as mobile application, where you do not have to redo the logic of the functions used in the web version on the application required language, instead all that needs to be done is call the API and receive the results that then can be render to the user in any way needed.

Functions to be moved to the backend

  • apply/apply.js

  • apply/applyRule.js

  • rule/addRule.js

  • rule/parser_rules.js make the parser function it is own separate controller

Code Style

We need to define and agree on a specific coding style to be used over the life span of this project to stay consistent.

This coding style needs to provide:

  • ease of readability
  • a good understanding of what the function does
  • ease of adding new code
  • ease of modifying code
  • modularity

Documentation

We need to document the functions we make in addition to the api, so it is accessible by other people to use right outside the box without needing to look at the functions code. Hence we need to make a page for that.

Adding callbacks to all the controllers

The controllers functions only take request and response as parameters which is not ideal for chaining other functions, since they are asynchronous. For example, you want to use the output of one of the functions in another one, this wont work since the first function will pass undefined to the second function since it does not wait for the first one it to finish.

var output = parser(req,res); \\undefined
addRule (output)

The way to fix this is by adding callbacks tot he controllers as follows

//creating a rule
function parser (req, res, callback) {
	// if no callback is passed then just return the value
	if (!callback) callback = function (result) { return result; };
	
	...
	
	// after each return
	return callback(...);
}

No if we look at our previous example we can do the following:

parser(req, res, function (output) {
	addRule(output); //parsed output
}); 

Adding Unit Tests

Since these are systems that are made to generate proofs from derivations, and they are under constant changing, we need to rigorously test them to make sure nothing breaks after a change in the code in addition to making sure that our system output is correct. I suggest using Mocha and Chai http.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.