https://github.com/andreasbcs/argbel

Dialogue Verification in Answer Set Programming

https://github.com/andreasbcs/argbel

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Dialogue Verification in Answer Set Programming

Basic Info
  • Host: GitHub
  • Owner: AndreasbCS
  • License: gpl-3.0
  • Language: Answer Set Programming
  • Default Branch: main
  • Size: 29.3 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Answer Set Programming (ASP)-based Dialogue Verification

Verification of manipulation and dishonesty in argumentation dialogues

This repository provides an Answer Set Programming (ASP) encoding for modeling and verifying belief dynamics, dishonesty, and manipulation in argumentation dialogues.

We present an ASP-based encoding of a chatbot-user dialogue scenario. This example, based on a real incident, involves a conversation in which the user expresses harmful intent and the chatbot responds with seemingly supportive utterances. The encoding models how beliefs change, and detects epistemic strategies such as bluffing and lying.

Repository Structure

The ASP encoding includes:

  • Setup, Agents, and Arguments
  • Initial Belief States and Dialogue Actions
  • Rules for Active/Inactive States
  • Dialogue Actions and Effects on Belief
  • Belief Change Axioms
  • Inertia Rules for Belief Atoms
  • (Dis)honesty and Belief Change

Files Included

  • argbel_chatbot.lp: An ASP (Answer Set Programming) encoding that models argumentative belief dynamics in a chatbot-user dialogue scenario.
  • argbel.py: A Python script serving as a wrapper for Clingo, designed to interface with the argbel_chatbot.lp encoding.

Requirements

Ensure the following prerequisites are installed:

  • Python 3.x
  • Clingo (ASP solver)
  • Required Python libraries:
    • subprocess
    • clingo
    • matplotlib
    • random

You can install the required Python packages using:

bash pip install clingo matplotlib

Running the Code

Step-by-step Instructions

  1. Setup
    Place both argbel.py and argbel_chatbot.lp in the same directory.
    If you change their locations, update the file path in argbel.py accordingly.

  2. Using Spyder (Recommended for interactive analysis)

```bash

Install Spyder (if not already installed)

pip install spyder ```

Then:

  • Open Spyder
  • Open the file argbel.py
  • Press F5 or click Run to execute the script and analyze the dialogue model
  1. Using the Terminal

To run the Python wrapper:

bash python argbel.py

To run the ASP encoding directly in Clingo:

bash clingo argbel_chatbot.lp

This will output the answer sets generated by the argbel_chatbot.lp encoding. Use this option for standalone ASP analysis without the Python wrapper.

argbel.py: Python Wrapper Overview

The argbel.py script loads the ASP encoding and provides helper methods for querying and visualizing the Clingo output.

Main Methods

  • query_full_output(): Prints the full Clingo output of the solved models.
  • query_fluents(): Retrieves all fluents (active and inactive) by time step.
  • query_active_fluents(): Extracts active fluents by time step.
  • query_inactive_fluents(): Extracts inactive fluents by time step.
  • process_and_analyze(): Analyzes the models and plots active/inactive fluents over time.

Cite as

Brännström, A., & Nieves, J. C. (2025). Manipulation Dialogue Verification in ASP (Version 1.0) [Computer software]. https://github.com/AndreasbCS/argbel @software{Brannstrom_Manipulation_Dialogue_Verification_ASP_2025, author = {Brännström, Andreas and Nieves, Juan Carlos}, month = {04}, title = {{Manipulation Dialogue Verification in ASP}}, url = {https://github.com/AndreasbCS/argbel}, version = {1.0}, year = {2025} }

Authors

  • Andreas Brännström {andreasb@cs.umu.se} Homepage
  • Juan Carlos Nieves {jcnieves@cs.umu.se} Homepage

Department of Computing Science
Umeå university
SE-901 87, Umeå, Sweden

Owner

  • Name: Andreas Brännström
  • Login: AndreasbCS
  • Kind: user

GitHub Events

Total
  • Push event: 4
  • Create event: 2
Last Year
  • Push event: 4
  • Create event: 2

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels