//
//  Created by Ivano Bilenchi on 07/03/18.
//  Copyright © 2018-2020 SisInf Lab. All rights reserved.
//

#import <Foundation/Foundation.h>

@class TMESemanticDescription;
@class OWLIRI;

NS_ASSUME_NONNULL_BEGIN

#pragma mark - Abduction

/**
 * Stores the result of the Concept Abduction inference service.
 *
 * "Hypothesis" represents the part of the request that is not present in the supplied
 * resource. The more must be hypotesized, the higher the associated penalty.
 *
 * @see `TMEReasoner`
 */
@interface TMEAbduction : NSObject

/// "Hypothesis" of the abduction result.
@property (nonatomic, strong, readonly) TMESemanticDescription *hypothesis;

/// Penalty associated with the abduction result.
@property (nonatomic, readonly) double penalty;

/// :nodoc:
- (instancetype)init UNAVAILABLE_ATTRIBUTE;

@end

#pragma mark - Bonus

/**
 * Stores the result of the Concept Bonus inference service.
 *
 * "Surplus" represents the part of the resource that was not requested.
 * The larger the surplus, the higher the associated incentive.
 *
 * @see `TMEReasoner`
 */
@interface TMEBonus : NSObject

/// "Surplus" of the bonus result.
@property (nonatomic, strong, readonly) TMESemanticDescription *surplus;

/// Incentive associated with the bonus result.
@property (nonatomic, readonly) double incentive;

/// :nodoc:
- (instancetype)init UNAVAILABLE_ATTRIBUTE;

@end

#pragma mark - Contraction

/**
 * Stores the result of the Concept Contraction inference service.
 *
 * "Keep" represents the part of the request that is compatible with the supplied resource,
 * while "give up" is the part that must be given up in order to make it compatible with it.
 * The more must be given up in the request, the higher the associated penalty.
 *
 * @see `TMEReasoner`
 */
@interface TMEContraction : NSObject

/// "Keep" part of the contraction result.
@property (nonatomic, strong, readonly) TMESemanticDescription *keep;

/// "Give up" part of the contraction result.
@property (nonatomic, strong, readonly) TMESemanticDescription *giveUp;

/// Penalty associated with the contraction result.
@property (nonatomic, readonly) double penalty;

/// :nodoc:
- (instancetype)init UNAVAILABLE_ATTRIBUTE;

@end

#pragma mark - Composition

/**
 * Stores the result of the Concept Covering inference service.
 *
 * Multiple resources are collected in order to cover the request. The uncovered
 * part of the request can be queried as a separate semantic description.
 *
 * @see `TMEReasoner`
 */
@interface TMEComposition : NSObject

/// Resources that partially cover the request.
@property (nonatomic, copy, readonly)
NSDictionary<OWLIRI *, TMESemanticDescription *> *coverResources;

/// Part of the request that has not been covered.
@property (nonatomic, strong, readonly) TMESemanticDescription *uncoveredRequest;

/// :nodoc:
- (instancetype)init UNAVAILABLE_ATTRIBUTE;

@end

NS_ASSUME_NONNULL_END
