Giter Site home page Giter Site logo

logickit's Introduction

Hi there ๐Ÿ‘‹

My name is Dimi Racordon. I love coding stuff, talking about programming languages and playing Stracraft 2.

I am a researcher focusing my work on type-based approaches for memory safety. My main research interests include type systems (obviously), language design, compiler construction and virtual machine implementations. I am currently directing most of my efforts in a project called Hylo with the objective to explore the use of mutable value semantics to create a safe-by-default and fast-by-definition programming language for generic high-level systems programming.

logickit's People

Contributors

alban-linard avatar damdamo avatar kyouko-taiga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

logickit's Issues

Arithmetic comparisons

Is there a way to get results that satisfy arithmetic comparisons? e.g.
kb.ask (.fact("number of children", var("x"), var("y")>3)

I suspect that built functions have this ability but I cannot find out a way to implement it.

Thanks.

Method to count the number of terms within a rule stage

Hi I am trying to build a term that returns true if the number of results is above a specific number:

let success = Term.rule("success") {
.fact("action", "s93663", .var("date"), .var("number1"), .var("number2"))
&& List.count(list: (List.from(elements: .var("date")) , count: .var("count"))
&& Nat.greaterOrEqual( .var("count") , Nat.from(3))
}

I want to be able to count the instances of "date" in my set.

I know that it would be possible to count the items in the answerset in swift but I want to reuse the rule in other rules and I would like to be able to solve with LogicKit only.

Arm compilation

Is there a way to get LogicKit to compile for Arm?
I get:
Could not find module 'LogicKit' for target 'arm64-apple-macos'; found: x86_64, x86_64-apple-macos

Concurrency issue

Hi. LogicKit causes a Vapor server to hang. Does your code support concurrency?

[Question] Syntax help

I'm new to Prolog and i'm trying to convert some statements from an existing script using LogicKit.

This rule definition works in SWI-Prolog
inference(inheritance(M, P), inheritance(S, M), inheritance(S, P)) :- S \= P.
And when ask the system a question
inference(inheritance(bird, animal), inheritance(robin, bird), T).
It correctly responds with
T = inheritance(robin,animal)

I've tried a few different combinations but couldn't get even this simple case to work in LogicKit. As i said, I'm really new to Prolog so I must be missing something here. For one, I don't know how to express S \= P in LogicKit which I suspect is why I can't get it to work. It should be something like not ( Term.var("S") ~=~ Term.var("P") ) but I couldn't figure out how to express this.

Thanks!

This is what I have so far

let kb: KnowledgeBase = [
        .rule("inference", 
            .fact("inheritance", "M", "P"),
            .fact("inheritance", "S", "M"),
            .fact("inheritance", "S", "P")) { 
                  //
                  // what should go here???
                  //
            }
    ]
    
    let results = 
          kb.ask(
            .fact("inference", 
                .fact("inheritance", "bird", "animal"),
                .fact("inheritance", "robin", "bird"),
                .var("result"))
        )

    print(results)

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.