Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bramucas/clingo_python_basics

Open more actions menu

Repository files navigation

clingo_python_basics

Basic examples of the clingo Python API

Installation of clingo

python -m pip install clingo

Example Structure

This repository is organized into folders covering different aspects of the clingo Python API:

  • basic_control - Basic Control usage: load, ground, and solve ASP programs
  • model_exploration - How to explore and filter atoms in answer set models
  • projection - Using the #project directive for answer set projection
  • embedded_python - Calling Python functions from ASP using @-syntax
  • multishot_solving - Incremental grounding and solving (multi-shot ASP)

Usage

Each folder contains a README with specific usage instructions. For example:

cd basic_control
python load_ground_solve.py basic_prog.lp
cd model_exploration
python exploring_models.py ../basic_control/basic_prog.lp

About

Basic stuff about clingo API

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.