1/*****************************************************************************
    2 * This file is part of the Prolog Development Tool (PDT)
    3 * 
    4 * Author: Andreas Becker (among others)
    5 * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
    6 * Mail: pdt@lists.iai.uni-bonn.de
    7 * Copyright (C): 2014, CS Dept. III, University of Bonn
    8 * 
    9 * All rights reserved. This program is made available under the terms
   10 * of the Eclipse Public License v1.0 which accompanies this distribution,
   11 * and is available at http://www.eclipse.org/legal/epl-v10.html
   12 * 
   13 ****************************************************************************/
   14
   15:- module(prolog_analysis_api, [
   16	analysis_marker/5
   17]).
 analysis_category(Name, Description)
   20:- multifile(analysis_category/2).
 analysis_definition(Name, Severity, Category, Description)
   23:- multifile(analysis_definition/4).
 analysis_result(Name, File, Location, Description)
Location is either a line number or Start-End
   27:- multifile(analysis_result/4).
 analysis_marker(Name, Severity, File, Location, Description)
   30analysis_marker(Name, Severity, File, Location, Description) :-
   31	analysis_definition(Name, Severity, _Category, _Description),
   32	analysis_result(Name, File, Location0, Description),
   33	(	Location0 = Start-End
   34	->	format(atom(Location), '~w-~w', [Start, End])
   35	;	Location = Location0
   36	)