Package gprover
Class Cond
- java.lang.Object
-
- gprover.Cond
-
public class Cond extends java.lang.ObjectRepresents a condition in the proof structure. It contains details like rule, predicate, step number, description, proof structure and related attributes.
-
-
Field Summary
Fields Modifier and Type Field Description CondcdAdditional condition.longdepDepth of the condition, initialized from Gib.depth.static intMAX_GEOMaximum number of geometric elements.intnoThe number of the current step.CondnxNext condition.int[]pArray of geometric elements.intpredPredicate identifier.protected intruleThe rule being used in this step (theorems or lemmas).java.lang.StringsdStep description.gprover.UStructuStructure holding different geometric entities.java.util.VectorvlistList of the direct steps in this node.
-
Constructor Summary
Constructors Constructor Description Cond()Default condition constructor that initializes required fields.Cond(boolean r)Constructs a condition optionally initializing the geometric array.Cond(int t)Constructs a condition with a given predicate.Cond(Cond co)Copy constructor for creating a duplicate of a given condition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd_allco(java.util.Vector v)Adds all conditions from a given vector.voidaddcond(int r, Cond co)Adds a condition with a specified rule.voidaddcond(int lm, Cond co1, Cond co2)Adds two conditions as direct children with a specified rule.voidaddcond(Cond co)Adds a condition as a direct child.voidaddcond(Cond co1, Cond co2)Adds two conditions as direct children.CClassget_attr()Retrieves the attributes associated with the condition.intget_conc_type()Determines the type of the condition's conclusion.intgetNo()Retrieves the current step number.CondgetPCO()Retrieves the condition from the internal structure.intgetRule()Retrieves the current rule.voidgetRuleFromeFacts()Sets the rule from the related facts in the internal structure.java.lang.StringgetText()Retrieves the step description.voidgRule()Dummy method for rule processing.voidsetCondToBeProveHead()Prepends the step description with a language specific "To Prove:" message.voidsetRule(int r)Sets the current rule.voidsetText(java.lang.String s)Sets the step description.java.lang.StringtoString()Returns the step description as the string representation.
-
-
-
Field Detail
-
MAX_GEO
public static final int MAX_GEO
Maximum number of geometric elements.- See Also:
- Constant Field Values
-
rule
protected int rule
The rule being used in this step (theorems or lemmas).
-
pred
public int pred
Predicate identifier.
-
no
public int no
The number of the current step.
-
p
public int[] p
Array of geometric elements.
-
u
public gprover.UStruct u
Structure holding different geometric entities.
-
nx
public Cond nx
Next condition.
-
cd
public Cond cd
Additional condition.
-
sd
public java.lang.String sd
Step description.
-
vlist
public java.util.Vector vlist
List of the direct steps in this node.
-
dep
public long dep
Depth of the condition, initialized from Gib.depth.
-
-
Constructor Detail
-
Cond
public Cond(int t)
Constructs a condition with a given predicate.- Parameters:
t- the predicate
-
Cond
public Cond()
Default condition constructor that initializes required fields.
-
Cond
public Cond(boolean r)
Constructs a condition optionally initializing the geometric array.- Parameters:
r- if true, initializes the geometric array; otherwise leaves it null
-
Cond
public Cond(Cond co)
Copy constructor for creating a duplicate of a given condition.- Parameters:
co- the condition to copy
-
-
Method Detail
-
getText
public java.lang.String getText()
Retrieves the step description.- Returns:
- the step description text
-
setText
public void setText(java.lang.String s)
Sets the step description.- Parameters:
s- the new description text
-
getNo
public int getNo()
Retrieves the current step number.- Returns:
- the step number
-
getRule
public int getRule()
Retrieves the current rule.- Returns:
- the rule applied
-
getRuleFromeFacts
public void getRuleFromeFacts()
Sets the rule from the related facts in the internal structure.
-
setRule
public void setRule(int r)
Sets the current rule.- Parameters:
r- the rule to be set
-
getPCO
public Cond getPCO()
Retrieves the condition from the internal structure.- Returns:
- the condition pointer (PCO)
-
toString
public java.lang.String toString()
Returns the step description as the string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- the step description
-
setCondToBeProveHead
public void setCondToBeProveHead()
Prepends the step description with a language specific "To Prove:" message.
-
addcond
public void addcond(Cond co)
Adds a condition as a direct child.- Parameters:
co- the condition to add
-
addcond
public void addcond(int r, Cond co)Adds a condition with a specified rule.- Parameters:
r- the rule value to setco- the condition to add
-
add_allco
public void add_allco(java.util.Vector v)
Adds all conditions from a given vector.- Parameters:
v- the vector containing conditions to add
-
addcond
public void addcond(int lm, Cond co1, Cond co2)Adds two conditions as direct children with a specified rule.- Parameters:
lm- the rule value to setco1- the first condition to addco2- the second condition to add
-
addcond
public void addcond(Cond co1, Cond co2)
Adds two conditions as direct children.- Parameters:
co1- the first condition to addco2- the second condition to add
-
get_attr
public CClass get_attr()
Retrieves the attributes associated with the condition.- Returns:
- a CClass representing the condition's attributes
-
get_conc_type
public int get_conc_type()
Determines the type of the condition's conclusion.- Returns:
- 1 if the internal structure is null; 2 if the condition obtained from the structure is null; otherwise 0
-
gRule
public void gRule()
Dummy method for rule processing. Implementation pending.
-
-