-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Amuyaña is a program that generates Tables of deductions (ToD). A ToD is a "conceptual tool" used in the Logic of the contradictory or Logic of contradictions (LoC).
This wiki explains the program Amuyaña from its source code point of view: the internal structure of Amuyaña and the structure of its classes, how they communicate and how a Table of deductions is created. The question of semantics is not addressed here, i.e. what a "Disjunction" or a "Conjunction" mean from the point of view of the logic of the contradictory. If you want to know more about the LoC or the ToD visit this site (in spanish only at the moment).
#Introduction We chose the Object Oriented language Java because it is very popular (so very well documented and easy to use) and also it's very general in the sense that anything can be considered an Object, including the notions of the logic of the contradictory, such as an element, phenomenon or logical event, a contradictional conjunction, a contradictional disjunction or the reality-values (in contrast to the truth-values in the classical logic): the actualization, potentialization and the value that signifies a contradiction which is called T value in reference to the fact that in the logic of the contradictory, the contradiction is a Third value not excluded as in the classical True or False logic. Java was a logical choice.
The most important thing to know about the LoC in order to understand the general structure of Amuyaña is the most important "axiom" of the LoC called the "Fundamental Postulate of a dynamic Logic of the contradictory" (our translation from the original term in French: "Postulat fondamental d'une Logique dynamique du contradictoire" - download book in pdf):
To every element (phenomenon or logical event) there is always an anti-element (anti-phenomenon or anti-logical event) structurally and functionally associated with it, in such a way that when one of them actualizes (becomes actual) the other one potentializes (becomes potential), and whenever they change of sign (the actual becomes potential and the potential actual) they adopt the same Third state, i.e. they are in a contradictory state
The Amuyaña tutorials can help you understand and apply this fundamental postulate of the LoC through real examples. It might be a good idea to start there before trying to understand the Amuyaña code. Nevertheless if you want to start here (which is possible), this postulate is precisely translated in the general structure of Amuyaña (more precisely the amuyaña package) illustrated in the diagram below. The element and anti-element are instances of the Phenomenon.class (called that way to avoid confusion with "element" in Java language). Each phenomenon has three possible states, i.e. three fields of type A, P and T (objects of A.class, P.class and T.class respectively). Since the Postulate indicates that one element is always associated with an anti-element, this relation (referred as the fundamental link in the LoC) translates into the Conjunction.class, since each instance of this class has two fields of type Phenomenon (one for each antagonist element) and creates the combinations between elements and states in such a way that they satisfy the fundamental principle. As we will see below in more detail, the Conjunction.class does that by calling three other classes (Positive, Negative and Symmetric) which signify respectively the positive contradictional conjunction, the negative contradictional conjunction and the symmetric or contradictorial conjunction from the LoC. Each one of these three classes then holds the specific phenomena's values that are needed to recreate the contradictional disjunction:
So Amuyaña creates/designs/generates Tables of Deductions. What is a ToD? Well, in Amuyaña, a ToD is precisely an instance of the Amuyaña.class, and since the contradictional disjunctions are what "populates" a ToD, the members of the Amuyaña.class are instances of Disjunction.class.
An instance of Disjunction.class only has one member, which is an instance of Conjunction.class. An instance of this last class has two types of members: three "subconjunctions" (one instance of Positive.class, Negative.class and Symmetric.class) and two phenomena (instances of Phenomenon.class). An instance of the Phenomenon.class has one member of each "logical value class" (A.class, P.class and T.class).
The last important thing to mention (probably the "signature" of the logic of the contradictory, what translates the Fundamental postulate mentioned above) is that each instance of the three "subconjunctions" declared in Conjunction.class (Positive, Negative and Symmetric) has two members that belong to the "logical value classes" that are the same members of the Phenomenon class, in this order: the Positive object has the 'A' instance that belong to the first phenomenon and the 'P' instance of the second phenomenon; the Negative has the 'A' instance that belong to the second phenomenon and the 'A' instance of the first, and finally the Symmetric has the 'T' values of both phenomena.
This simple relation between the main objects of Amuyaña can be illustrated as follows:
Amuyaña is divided in three packages:
-
amuyaña: This package contains the objects of the main structure (shown in the diagram above), so these are classes that represent the notions of the logic of the contradictory
-
ñ: This package contains the Swing JFrames (the UI) and the "special" class Ñ.class (will be called Operations.class when we migrate to JavaFX) which handles the information between the amuyaña package and the UI. This package contains a folder named resources which contains the images used in the application
-
tabulator: This package contains the classes that generate the visual representations of the Tables of deductions to be either shown in the UI or exported in any allowed format (.jpg, .gif, .png, .tex, .html or .odt). As in version 1.3 the last two have not been implemented yet
Amuyaña borrows one library and two classes:
- gson: Used to import/export the java objects to json representations, distributed under Apache 2.0 license
- AlphaContainer.java in tabulator container: used to make JPanels transparent. This is temporary since we will migrate from Swing to JavaFX
- ScreenImage.java: Used to export to the disk a screen capture of the created JPanels that contain the Tables of Deductions, in common formats (gif, jpg, png...).
You'll need the GSON library at compilation. The two classes are already in the tabulator and ñ packages respectively.
If you are using NetBeans, the easiest way to import GSON is: right click in "Libraries" in the Projects tab (Menu → Window → Projects), click on "Add JAR/Folder" and then select gson-2.8.0.jar.
As soon as the code is executed, the public static void main method is called. It only contains this line of code: ñ.Ñ.newÑ(args); The newÑ method in the abstract class Ñ initializes the graphical user interface, which is an implementation of Swing components.
At execution the main method