Skip to content

Commit

Permalink
ready for release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonca Emmanuel committed Jan 24, 2024
1 parent 473ee6e commit 322a14a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 287 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.1.0] - 2024-01-24

### Added

- Added other computation methods for dynamic track.


## [1.0.0] - 2023-09-06

### Added

- Added the content required for ICCMA'23 dynamic track.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "crustabri_ipafair"
authors = ["Jean-Marie Lagniez <[email protected]>", "Emmanuel Lonca <[email protected]>", "Jean-Guy Mailly <[email protected]>"]
license = "GPL-3.0-or-later"
version = "1.0.0"
version = "1.1.0"
description = "An IPAFAIR compatible library built upon the Crustabri solver."
categories = ["api-bindings", "science"]
keywords = ["argumentation", "frameworks", "AF", "dynamics", "IPAFAIR"]
Expand All @@ -16,5 +16,5 @@ crate-type = ["cdylib"]

[dependencies]
const-cstr = "0.3.0"
crustabri = { path="../crustabri" }
ipafair-sys = "1.0.0"
crustabri = "1.1"
ipafair-sys = "1.0"
93 changes: 0 additions & 93 deletions python/crustabri.py

This file was deleted.

93 changes: 0 additions & 93 deletions python/crustabri_dummy.py

This file was deleted.

64 changes: 0 additions & 64 deletions python/ipafair.py

This file was deleted.

Binary file added resources/iccma23.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions src/ipafair_solver.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crustabri::{
dynamics::assumptions_on_attacks::{
DynamicCompleteSemanticsSolverAttacks, DynamicStableSemanticsSolverAttacks,
},
dynamics::{
DummyDynamicConstraintsEncoder, DynamicCompleteSemanticsSolver,
DynamicPreferredSemanticsSolver, DynamicSolver, DynamicStableSemanticsSolver,
},
dynamics_attacks::{
DynamicCompleteSemanticsSolverAttacks, DynamicStableSemanticsSolverAttacks,
},
solvers::{CredulousAcceptanceComputer, SkepticalAcceptanceComputer},
};
use ipafair_sys::semantics;
Expand Down
41 changes: 10 additions & 31 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

use const_cstr::const_cstr;
use crustabri::{
dynamics::DummyDynamicConstraintsEncoder,
dynamics_attacks::{
dynamics::assumptions_on_attacks::{
DynamicCompleteSemanticsSolverAttacks, DynamicStableSemanticsSolverAttacks,
},
dynamics::DummyDynamicConstraintsEncoder,
solvers::{CompleteSemanticsSolver, StableSemanticsSolver},
};
use ipafair_solver::{FactoryType, IpafairSolver, IpafairSolverSemantics};
Expand Down Expand Up @@ -46,39 +46,18 @@ pub extern "C" fn ipafair_init_dummy() -> *mut ::std::os::raw::c_void {
}

#[no_mangle]
pub extern "C" fn ipafair_init_attacks_2_0() -> *mut ::std::os::raw::c_void {
let factory: Box<FactoryType> = Box::new(move |s| match s {
IpafairSolverSemantics::CO => Box::new(
DynamicCompleteSemanticsSolverAttacks::new_with_arg_factor(2.),
),
IpafairSolverSemantics::ST => Box::new(
DynamicStableSemanticsSolverAttacks::new_with_arg_factor(2.),
),
});
Box::into_raw(Box::new(IpafairSolver::new_with_factory(factory))) as *mut _
}

#[no_mangle]
pub extern "C" fn ipafair_init_attacks_1_5() -> *mut ::std::os::raw::c_void {
let factory: Box<FactoryType> = Box::new(move |s| match s {
IpafairSolverSemantics::CO => Box::new(
DynamicCompleteSemanticsSolverAttacks::new_with_arg_factor(1.5),
),
IpafairSolverSemantics::ST => Box::new(
DynamicStableSemanticsSolverAttacks::new_with_arg_factor(1.5),
),
});
Box::into_raw(Box::new(IpafairSolver::new_with_factory(factory))) as *mut _
}

#[no_mangle]
pub extern "C" fn ipafair_init_attacks_1_25() -> *mut ::std::os::raw::c_void {
pub extern "C" fn ipafair_init_attacks(
factor: std::os::raw::c_double,
) -> *mut ::std::os::raw::c_void {
if factor < 1. {
panic!("factor must be at least 1");
}
let factory: Box<FactoryType> = Box::new(move |s| match s {
IpafairSolverSemantics::CO => Box::new(
DynamicCompleteSemanticsSolverAttacks::new_with_arg_factor(1.25),
DynamicCompleteSemanticsSolverAttacks::new_with_arg_factor(factor),
),
IpafairSolverSemantics::ST => Box::new(
DynamicStableSemanticsSolverAttacks::new_with_arg_factor(1.25),
DynamicStableSemanticsSolverAttacks::new_with_arg_factor(factor),
),
});
Box::into_raw(Box::new(IpafairSolver::new_with_factory(factory))) as *mut _
Expand Down

0 comments on commit 322a14a

Please sign in to comment.