Giter VIP home page Giter VIP logo

t-rewriter.js's Introduction

// work in progress //

t-rewriter.js

tags: type system, term graph rewriting, production rules, automated reasoning

project status:
    [ ] alpha conception
        [x] theorizing
        [ ] implementing
            [x] main loop
            [x] variables substitution
            [ ] types (to do: [ ] deep rules; [ ] deep variables)
            [ ] error messages
            [ ] stress test
    [ ] beta testing and revising code
    [ ] gamma release

Check out the current code performing at online playground.

table of contents

1. project specifics

t-rewriter.js is a term graph rewriting tool for transforming any input s-expr to any output s-expr using a rule-based system. The main intention of t-rewriter.js is to support automated reasoning.

t-rewriter.js code represents a program that is actually a set of formulas performing similar to those in mathematics with the difference that the t-rewriter.js formulas may transform not only math expressions, but also any kinds of s-exprs.

To get a glimpse on how a t-rewriter.js program looks like, here's a quick example:

(
    RULE
    (
        READ
        
        (RULE (READ) (WRITE {goes [name] [voice]}))
        
        (RULE (READ [name] ) (WRITE Milo))
        (RULE (READ [name] ) (WRITE Nora))
        (RULE (READ [voice]) (WRITE bark))
        (RULE (READ [voice]) (WRITE meow))
    )
    (
        CHAIN
        
        (
            MATCH
            (VAR <X>)
            (RULE (READ {goes <X> meow}) (WRITE {isA <X> cat}))
        )
        
        (
            MATCH
            (VAR <X>)
            (RULE (READ {goes <X> bark}) (WRITE {isA <X> dog}))
        )
    )
    (
        WRITE
        
        (RULE (READ Milo) (WRITE [name]  ))
        (RULE (READ Nora) (WRITE [name]  ))
        (RULE (READ cat ) (WRITE [living]))
        (RULE (READ dog ) (WRITE [living]))
        
        (RULE (READ {isA [name] [living]}) (WRITE))
    )
)

This program does the following:

  • reading an input containing {goes Nora meow} or {goes Milo meow} writes an output containing {isA Nora cat} or {isA Milo cat}
  • reading an input containing {goes Nora bark} or {goes Milo bark} writes an output containing {isA Nora dog} or {isA Milo dog}
  • reading any other input yields an error message

2. work done so far

A lot of research is invested in conceptualisation of t-rewriter.js, and it is still heavily under construction. During its conceptualisation journey, it has been an agile experimenting project, advancing its theoretical background with each iteration. Curious readers may want to skim over historical documents directory that collect the successive iterations.

The current iteration is explained in actual working draft, and its implementation is in progress. Expect considerable updates to working draft during the implementation phase.

Related to t-rewriter.js, various experiments in Javascript were conducted with term rewriting concepts, finally achieving some promising results. Please refer to rewrite.js repository for more information about the latest experiment.

3. future plans

t-rewriter.js is an experimental platform used for conceptual testing of term graph rewriting. Positive results of this experiment would place foundations for the future programming framework whose purpose would be building artificial intelligence. We are continuing our efforts to actively work on t-rewriter.js, hoping to get closer to the planned programming framework.

// work in progress //

t-rewriter.js's People

Contributors

contrast-zone avatar

Stargazers

Pullaiahgari Manideep Reddy avatar Álvaro Ceballos avatar  avatar Emmanuel Oga avatar λ Rüzgar Imski avatar Andrei Surugiu avatar Gnlow avatar Leonard Mosescu avatar Rhee Jung In avatar Jan Vlnas avatar Chris Bilger avatar Michael Heinrichs avatar Sofian Mejjoute avatar Comiscience avatar Suminda Sirinath Salpitikorala Dharmasena avatar Jan Liam Verter avatar Ian Trudel avatar tinydev.art avatar  avatar  avatar lagleki avatar Zero avatar  avatar otw avatar bree avatar Valentin Plotkin avatar  avatar Anthony Di Franco avatar  avatar

Watchers

 avatar Leroy "Spydaz" Dyer BSC/MSC avatar  avatar  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.