Giter VIP home page Giter VIP logo

tptpparser's Introduction

tptpParser

usage screenshot

An xtext based parser for the TPTP grammar. (can be used as a java parser, or an awesome eclipse plugin)

This is built with xtext v2.4.3, and we welcome all patches and pull requests!

If you use this libray, we'd love to hear about it!

Installing the Eclipse Plugin

We have tested against Eclipse Kepler

In Eclipse

Using the Parser

If you are using Maven, the easiest way to use this project is to add

<dependency>
	<groupId>tptp</groupId>
	<artifactId>parser</artifactId>
	<version>0.0.6-SNAPSHOT</version>
</dependency>

and

<repositories>
	<repository>
		<id>tptpParser-mvn-repo</id>
		<url>https://raw.github.com/marklemay/tptpParser/mvn-repo/</url>
		<snapshots>
			<enabled>true</enabled>
			<updatePolicy>always</updatePolicy>
		</snapshots>
	</repository>
</repositories>

to your pom.xml (we use the poor man's repo method)

You can also make your project directly dependent on the binary jar or the source jar. This is not recommended because you will need to download transitive dependencies.

See the test file CheckThemALL.java for usage

Committing

Browsing the source

There is only 1 source file, Parser.xtext

Checkout and build the project

  • Open eclipse with xtext
  • window -> open perspective -> other -> Git Repository Exploring
  • paste https://github.com/marklemay/tptpParser.git into the left panel
  • the Clone Git Reposity window will open
  • click finish
  • open tptpParser
  • right click on Working Directory
  • select Import Exiting Project
  • click next
  • you should see the 4 projects selected
  • click finish
  • go back to the java perspective (ignore any errors)
  • open com.theoremsandstuff.tptp.parser -> src -> com.theoremsandstuff.tptp
  • right click on Parser.xtext -> run as -> Generate Xtext Artifact

For further reading about the xtext framework, look at the offical Xtext documentation or Implementing Domain-Specific Languages with Xtext and Xtend by Lorenzo Bettini

See TODOs below about what you can improve

Running the tests

(TODO: see TODOs below about how this test could be improved)

Before committing, run the tests against all axioms, all problems, and all of the prevous competition pormlams.

The design principles

  • the primary goal is the generated java parser, the eclipse plugin (while really cool) is secondary
  • minimal/restrictive AST, we will ignore issues that happen in the extended biased problems, keeping the AST simple and restrictive will make it easier to use in competition programs
  • grammar should be restrictive, no need for multiple languages in the same file
  • validate against all sample problems, this should be competition-ready software
  • keep the eventual java parser and the eventual eclipse plugin (and the target tptp problem set in sync with version numbers)

global TODOs

currently unsupported TODO

tptpparser's People

Contributors

marklemay avatar calypsomatic avatar

Stargazers

Boris Shminke avatar Bruno avatar Ben Holland avatar Claudenir Fonseca avatar  avatar Sergey Fukanchik avatar  avatar Olivier ROLAND avatar

Watchers

James Cloos avatar Boris Shminke avatar  avatar  avatar Claudenir Fonseca avatar

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.