GROUNDS FOR THE IMPLEMENTATION OF EXPERT SYSTEMS TO AID THE DECISION-MAKING PROCESS IN ENVIRONMENTAL LAW BASES PARA

This paper aims at presenting conceptual and theoretical grounds for the development of artificial intelligent systems targeting environmental management. Focus will be given to the development of an expert program to assist the users in dealing with the rural environment, granting them legal and environmental education, as developed in the scope of the CRHA Project (Environmental and Agricultural Watershed Management for the Conservation of Water Resources). This work is useful in demonstrating the feasibility of computational applications involving Legal Sciences and Agricultural and Environmental Geosciences. It also demonstrates the potential of logic analysis applied to technical and scientific knowledge.


INTRODUCTION
Martins Junior (1998), based on his proposal to develop a new branch of Geosciences (henceforth named Agricultural and Environmental Geosciences ─ AEG), has started an already long way towards the development of the epistemological field including methodology and interdisciplinary approach.Since the beginning, this process implied in dealing with issues that had not been articulated yet in a coherent, consistent and integrated fashion from the various sciences and specialties regarding natural and socioeconomic systems.Furthermore, it was also necessary to deal with administrative and legal systems for legislation, which, in many ways, usually drives those interactions.
As a process to identify and unveil the epistemological / methodological content, from an interdisciplinary approach, and to develop management systems, it is recognized as fundamental the support from three categories of methods, namely: (1) Two engineering and architecture knowledge methods ─ the CommonKADS Method (SCHREIBER et al, 1999), and the ORCI Method (MARTINS JUNIOR et al, 2003-2006 www.sisorci.cetec.br);(2) The AI (artificial intelligence) method for decision aid (MARTINS JUNIOR et al., 2006), and (3) The development of: (i) an integrated system of object-oriented databases, (ii) an information system (geographic / geoenvironmental), (iii) a decision support system, (iv) water circulation modeling systems, (v) an Ecological-Economic Zoning -EEZ system, (vi) an Optimal Land Use Design System ─ DUOT, and (vii) a Geo-Economic and Environmental Quality River Basin Certification System ─ CQGE, as developed in several projects at the Technological Centre of Minas Gerais state ─ CETEC [Centro Tecnológico de Minas Gerais] (MARTINS JUNIOR et al, 2007).
With the CRHA project in CETEC Foundation, entitled "Environmental and Agricultural Watershed Management for the Conservation of Water Resources" (MARTINS JUNIOR, 2006), funded by MCT / FINEP / CT-Hydro Sector Fund-2002, a research took place to elucidate an agro-hydro-environmental logic of watersheds, aiming to contextualize agricultural activities while making use of the concepts of Land Planning and Agro-Environmental Management of Water Resources.With this aim, scientific products in several levels of structured information, with friendly language and semiotics, have been proposed.To accomplish this, the following activities have been executed: [a] Finding out logicalformal restraints to make systemic decisions, and [b] Build up an expert system program.This paper deals with a subject of the legislation for deforestation control, as it started up in the CRHA Project (2003)(2004)(2005)(2006), and it is a component of SisDec Decision Support System for geo environment river basin management.

OBJECTIVES OF ARTIFICIAL INTELLIGENCE
The main goal of AI (Artificial Intelligence) systems is to perform functions that would be deemed intelligent actions if performed by humans.It is a broad concept which receives as many definitions as the number of different meanings assigned to the word intelligence.Among the usual basic characteristics of these systems, it should be emphasized: (i) the ability of reasoning (i.e., to apply logic to a set of rules regarding the available data aiming at reaching a conclusion); (ii) the ability to learn (i.e., learning from mistakes and successes in order to act more effectively in the future); (iii) the ability to recognize patterns (both visual and sensory, as well as patterns of behavior), and (iv) the inference capability (i.e., the ability of successfully apply reasoning in cases faced by humans).A good introduction to AI can be found in Ginsberg (1993).

Expert systems and multi-experts systems
Expert systems are programs that aim at simulating the reasoning of a professional human who is an "expert" in some very specific field of knowledge.
Multi expert systems are a current trend, since many problems are impossible to be solved by a single professional expert, sometimes requiring a whole multidisciplinary team.In such a case, the program becomes expert in two or more branches of different scientific sectors, and this knowledge may be used in an integrated manner to provide the best possible advice.Multi-expert systems are currently pressing possibilities in environmental geosciences, environmental engineering and environmental law, in view of their intrinsic interdisciplinary approach.The conceptual modeling and program code discussed in this article focuses a multi-expert system addressing areas of Environmental Law and other Environmental Sciences.

PROLOG
PROLOG is a declarative programming language basically made of calls and recursion routines.Thus, the logical axioms are kept and are capable of providing the user with part of its information in those situations where certain parameters of these axioms become available.Bratko (2000) presents a detailed study of the potential features of this language for artificial intelligence systems.Let us use this example of PROLOG language applied to an environmental situation, with the following code: no_permit(illegal) When the user types: ?-no_permit(X) %Note that X is in upper case and is a variable that will be called The program responds reporting this as an illegal situation: X=illegal Let us consider another example with this programming: forest_code(law,Year):-search(Year) %Calling the code 'forest code' 'triggers the 'search' code.

Knowledge Basis
Part of the program code in PROLOG refers to facts and information known in the problem domain.Examples include: river(polluted), meaning that a river is polluted, and law(forest_code, federal) meaning that the forest code law is of the federal type.The knowledge base should be separated from the inference structure, as the latter is the part of the program that will handle the data of the knowledge base and provide this data to the user.

METHODOLOGY CommonKADS
CommonKADS (SCHREIBER et al., 1999) is a Knowledge Engineering methodology for knowledge representation, which is used for building expert systems.In a nut shell, it indicates how one can get hold of technical knowledge and formalize it, in order to build up an artificial intelligence program.The CommonKADS methodology allows, by the end of the process, to achieve a complete program with the desirable characteristics, in which the specific knowledge is fully documented and can be easily updated, modified and even reused by other expert programs.Another efficient feature of this method is its ability to encompass various types of professional expertise knowledge, providing strategies to extract such knowledge in various forms (declarative, procedural, explicit, implied, tacit, semantic, episodic ─ i.e., acquired through a sequence of similar experiences -, shared, metacognized, etc.).

Domain, Task and Inference Models
The CommonKADS method is structured as a set of several standard models, designed in accordance with the knowledge that one desires to formalize, and

UML -UNIFIED MODELING LANGUAGE
The UML Language (BOOCH et al., 1999)  diagrams, schemes and graphics, which encompasses visions (abstractions).These visions start with the user focus, then go into the logic operation of the software and, finally, reach the programming phase.The CommonKADS methodology incorporates the UML standards in several steps of its process, with the aim of decreasing the margin of interpretation errors, while also allows to reuse the modelled information in other contexts.

NON-CLASSICAL LOGIC SIMULATION FOR THE EXPERT PROGRAM
Some situations referred to the expert program require special treatments that usually are not well handled by the standard classical logic.Classical logic provides a satisfactory model for static systems, but presents difficulties in portraying dynamic processes, such as ecosystems and their interaction with humans.For this reason, it becomes necessary for the program to simulate non-classical logic theories (Dubois et al., 1988).
Temporal logic: Not always the attributes "True" or "False" are enough, and in such cases one must determine if something is "Real in time period A", or " False after the event B".
Deontic logic: Deontic logic is the logic system used to indicate conduct and behavior, which includes the power relationships between individuals.While classical logic deals with what "is or is not", a deontic logic deals with "whether or not to do".As the knowledge system is developed, it becomes extremely important to make a clear differentiation between "facts" and "statements of conduct".

7APPLIED LOGIC IN "AGRICULTURAL AND ENVIRONMENTAL GEOSCIENCES" ─ AEG
The Agricultural and Environmental Sciences ─ AEG, aim at bringing the whole "External Geodynamics" Logic alongside the Logic of the Economy, into the agrarian environments.Logic, as applied to the AEG, implies in the development of a cognitive interconnection between the different sciences comprising AEG and the Nature systems themselves, besides the legal issues as perceived by the legislators.It is noteworthy that the expert program should offer guidance to farmers or companies not only regarding all standard obligations but also regarding any geo-environmental conditions occasionally not covered by law, but necessary in order to maintain sustainability in short, medium or long term.

About Legal Organization
In a broad sense, the judicial or legal system is a centralized system supported

Logic Applied to Legal Language
The studies herein presented are mainly based in Bobbio (1999), Kelsen (1998), and Barros (1998).The usage of logic principles and logic operations is a complex issue in Law Science, when compared to exact sciences (such as Mathematics, Physics, etc.), since human processes within the legal and juridical aspects undergo judgment criteria which are often non-deterministic or not treatable by trivial logics.This is largely due to an intrinsic "syntactic and semantic drift" in legal documents, which may lead to double or inaccurate interpretations.The Logic of Law looks at the rules conformation, but does not reach the factual content; it does not draw empirical inferences from the everyday life situations, nor reaches axiological contents, i.e., those coming from human values, such as, justice, desires, etc.
In the application of logic to the legal science, there must be active subjects ─ those who have guaranteed rights ─ and passive subjects ─ who have duties ─ as Figure 1 shows.Subject can be individuals, businesses, the Prosecution Office or the State.The logical form of any law, as Figure 2 depicts, includes the Primary Rule, which has the Hypothesis (a situation covered by law) and the Thesis (the prescribed behavior for such situation).Furthermore, the law has a Secondary Rule specifying the penalty due to whoever disobeys the Thesis prescribed conduct.Finally, the logic of the law is deontic.Only qualifications as "prohibited", "allowed" and "required" fit, no room is left for qualifications such as "true or false", "fair or unfair", etc., as shown in Table 1.

FIGURE 1 -Relationship between the Subjects of the Law through legal relationship
Frequently, a law that expresses a duty already grants the opposite right to the other subject of the legal relationship.For instance, a law that prohibits any citizen to

LEGAL RULES MAY BE CLASSIFIED AS LEGAL RULES MAY NOT BE CLASSIFIED AS
Valid or non-valid (this is the only status that can be inferred within the logic field) True or false (considering that they are not dealing with objects of the real world [the to be world] but rather with the world of conduct [the ought to be world]) Fair or unfair (within ethics and axiology) Applicable or non-applicable (by the inference method of the judge) Effective and non-effective (whether the legal rules are fulfilling or not the objectives for which they were made) In force or not in force (for such it is require to observe the legal process and the court precedents)

Sources
As for modelling the knowledge of an expert system in environmental law, the main source of knowledge can be the proper laws, from which are selected the various legal restrictions and explanations on how the legal and environmental processes work.The following are also considered as sources: papers on the Logic of Law, questionnaires sent to legal sectors of environmental agencies, direct interviews and comments from lawyers about the applicability of legal documents and regarding legal and environmental behaviors deemed appropriate.

Support of the used methods: CommonKADS and UML
The first action to be undertaken is filling out the Organization Model, which is used to organize the ideas about what the program is as a whole, as well as the context in which its acquisition was planned.From the context of the knowledge area, one can plan tasks, agents and other procedures that would follow along the program development.The second step is to formalize the knowledge acquired.In this phase it is useful to model the Agents and Tasks through standard UML diagrams.Finally, the source code programming starts, beginning from the interface, and including the necessary code for Evaluation tasks, which are the "main logic body of the inference structure".Once finished each part of the program, assessment test are performed to measure its effectiveness and the occasional existence of any syntax errors in the source code.

About Updating the Legal Database
One of the major problems to be faced during the implementation of an expert system for decision support in the legal field is the constant updating of the laws, as they are constantly changing.There are several alternatives for that, such as legal journals to be found in specialized libraries, and mailing services from websites (which always inform the latest legal changes, albeit some of these are paid).Using the Government website to be constantly updated with the current legislation would be a more radical approach.Furthermore, many municipalities do not have their Regarding environmental permits, one should be alert to changes in procedures, because the issue is regulated mostly by ancillary legal documents.Thus, the competent institutions, the procedures, and the required documents may change over the years.-Preservation of the biogenetic heritage of the region, with economic benefit still to be estimated.

Assessment of Benefits and Environmental Financial Feasibility of the Software
-Decrease in erosion and soil loss, with gains for the agricultural economy.
-Medium / long term microclimate improvements fostering the quality of life of the local population and the agricultural activity.

Expected added value
As the environmental improvements are somewhat integrated to economic production, gains in its preservation reflect cumulative gains in this causal chain.

Alternative solutions
-The expert program effects occur simultaneously to other actions, such as environmental campaigns in rural areas and coercion attempts by inspector bodies.However, it is not the case of selecting just one way, but rather articulate the various activities to create an increasingly coherent relationship between rural activities and the environment.
-There would also be the option of using only environmental criteria into the expert programs, waiving the use of legal restrictions.This approach would bring advantages such as no need to constantly update the knowledge base and the facility to offer the same program to other countries, even if they have completely different laws (Law changes from country to country, while scientific criteria usually do not vary much, unless the analyzed environment is extremely different).However, such alternative solution loses in scope and usefulness, and does not allow a logical study of the environmental legislation.Moreover, a critical evaluation based on that logical study could be used to propose improvements in the current laws.

Organizatio nal changes
-Users behavior should change as a condition for the effectiveness of the Program.They need to change the way they plan their rural activities, in order to comply with the legal criteria.
-It is also necessary that environmental and water resources agencies restructure their advisory services in a way that the rural population could be able to access the program and fell stimulated to do so.

CONCLUSIONS
From the conceptual basis and developments presented in this paper, one can see clearly the possibility of developing computer systems that use the explicit logical content of legal rules.Regarding the use of these systems for decision support in environmental management, the possibilities are vast, both in the legal assessment of deforestation (as was the case of the examples above), as in many others such as water use authorizations, environmental permits, and claims of environmental crimes.
For instance, in the case of environmental permits, the user can have a better understanding whether his/her project needs to be licensed and, if so, which ought to be the procedures, documents and technical studies he/she should develop to start up the licensing process.The possibility of receiving an advice adapted to the user case is even more valuable if the user does not have access to any expert professional.. Nevertheless, a computational intelligence system has potential uses not only for logic applications to environmental law, but also to various other fields of expert knowledge, grounded upon the logical reasoning.Thus, under a broader point of view, the decision support for expert systems may be developed for any area where a specialist branch exists.In the environmental area, the following are application examples of artificial intelligence: Spatial land use planning aimed at reducing environmental impacts, sustainable management of agricultural systems, techniques for soil conservation, water and vegetation regeneration, and case by case applications in river basin management and environmental education in general.
addressing the task the program is supposed to accomplish.The main references are the Domain Models (the knowledge database of the program), the Inference Models (in charge to collect, process, and analyze the data from the Knowledge Base), and the Task Models (which indicate to the program and / or to the user what steps should be taken to resolve each problem).The CommonKADS method has several standard models that are addressed to the Task Models.They are called "methods of problem solving", and consist of standard procedures for diagnosis, classification, planning and a range of other tasks that the program may use to simulate an expert person behavior.All together, the Domain, Task and Inference models form the rather complex Knowledge Model, which details the logical forms of an expert knowledge.
by a central authority (the State), whose purpose is to prescribe rules of conduct to keep a sound relationship between individual vs. individual, individual vs. State, and State vs. State.According to legal theories, the legal system does not force a person to comply with any particular conduct, but rather forces the individual to suffer penalties for acting against some legal rule.Among the most common penalties are imprisonment, fine, restriction of rights and rendering alternative works.Laws are promulgated by federal, state or municipal legislature, usually enacted by the head of the executive branch.Ancillary legal documents are also included (decrees, resolutions, legislative resolutions, ordinances), regarding specific situations, and usually developed by the competent executive and supervisory bodies.Some legal concepts of logical relevance are: (1) Lawful: behavior or situation within the parameters allowed by law; (2) Illicit: behavior or situation within the parameters not allowed by law; (3) Court precedents: alongside laws, this is one source the judge consults when querying whether a conduct is unlawful or not.Court precedents are the set of verdicts from previous similar cases to which the same law was applied; (4) Jurists: legal scholars who study logical relationships between laws, looking for the correct interpretation and analyzing the contradictions and divergences between legal documents, (5) Coercion: effect of law on society, when people stop doing illegal acts considering law and police, even when it is not necessary to apply sanctions because just the fear of these sanctions is already enough to change people's behavior , and (6) Deontic: which deals with the line of duty, i.e., about ordering or advising an individual.

FIGURE 2 -
FIGURE 2 -Relationship between laws.Path from legal framework to sanction.The Hypothesis has open and general sentences.They will be filled out by the particular constants of the real situation analyzed LegalExplanation = ['Your cleared area is ilegal, because it is too close of the indicated water source'], EcologicalExplanation = ['Clearing the area around water sources greatly diminishes the quantity of water,', 'and usually may turn them dry.As a consequence, the amount of clean water to drink decreases;',' furthermore, decreases the rivers water flow, since they stop receiving water from this water source'].

TABLE 1 -
Deontological qualification analysis of actions related to current legal rules.The legality (lawful or unlawful) indicates whether a person may have the specified conduct, in accordance with the laws

TABLE 2 -
Categories of analysis of legal norms legislation online or even in digital format, which is a major hindrance to update the Program.It should be considered that updating the Program could be simpler if the program is based on more general legal guidelines, such as the Forest Code and the Law of Environmental Crimes, in Brazil.As these laws are more stable, they are more easily handled in case changes ─ and more widely disseminated.
Table3is an adaptation of the OM-5 Organization Diagram (Implementation Feasibility), according to the CommonKADS methodology.The objective of this table is to overview the need and of the possible gains in using expert programs such as the ones discussed herein.

TABLE 3 ─
Partial and tailored presentation of the OM-5 Organization Diagram Mode.It demonstrates benefits, value added, alternative solutions and organizational changes related to the potential use of artificial intelligence systems as presented in this article