8000 GitHub - kiranandcode/clingo-lang: #lang clingo for Racket (WIP)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kiranandcode/clingo-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A #lang clingo clingo integration with Racket

Aim: to be able to call Clingo (an ASP solver) directly from Racket.

#lang clingo

(person (|| 'alice 'bob))

(evil 'alice)

(:- (good p)
    (person p) (not (evil p)))

;; returns '((person alice) (person bob)
;;           (evil alice)
;;           (good bob))

You'll need libclingo installed on your system.

For example, on debian-based systems do:

sudo apt install gringo 

Files of interest:

  • see unsafe.rkt for an FFI binding to libclingo (currently hard codes the path to libclingo.so)
  • see main.rkt for an example use of the FFI binding (ideally at the end, we'd like to have a #lang)

About

#lang clingo for Racket (WIP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0