Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some duplicated statements and variable shadowing #205

Open
nordlow opened this issue Jan 13, 2020 · 16 comments
Open

some duplicated statements and variable shadowing #205

nordlow opened this issue Jan 13, 2020 · 16 comments

Comments

@nordlow
Copy link
Contributor

nordlow commented Jan 13, 2020

Here are more things detected by my SUO-KIF linter :)

Duplicate subclass and instance definitions (of the same (super)-class):

Food.kif:17:1: warning: instance CookedAttribute is already defined
Food.kif:29:1: warning: instance RawAttribute is already defined
ComputingBrands.kif:506:1: warning: subclass MacOSXYosemite is already defined
ComputingBrands.kif:1015:1: warning: subclass WindowsOS95 is already defined
ComputingBrands.kif:1017:1: warning: subclass WindowsOS95 is already defined
ComputingBrands.kif:3353:1: warning: subclass IMessage is already defined
ComputingBrands.kif:3357:1: warning: subclass IMessage is already defined
Transportation.kif:2480:1: warning: subclass Kayak is already defined
mappings/DHS_Taxonomy.kif:38:1: warning: subclass ClassificationScheme is already defined
mappings/DHS_Taxonomy.kif:43:1: warning: subclass Taxonomy is already defined
mappings/DHS_Taxonomy.kif:55:1: warning: subclass Ontology is already defined
mappings/DHS_Taxonomy.kif:560:1: warning: subclass ServiceProcess is already defined
mappings/DHS_Taxonomy.kif:566:1: warning: subclass CommercialService is already defined
Cars.kif:4889:1: warning: subclass FordAutomobile is already defined
Cars.kif:4946:1: warning: subclass ChevroletAutomobile is already defined
CCTrep.kif:5:1: warning: subclass CodingScheme is already defined
CCTrep.kif:81:1: warning: subclass MimeEncodingScheme is already defined
CCTrep.kif:85:1: warning: subclass MimeText is already defined
CCTrep.kif:86:1: warning: subclass MimeEnrichedText is already defined
CCTrep.kif:89:1: warning: subclass MimeImage is already defined
CCTrep.kif:90:1: warning: subclass MimeAudio is already defined
CCTrep.kif:91:1: warning: subclass MimeVideo is already defined
CCTrep.kif:92:1: warning: subclass MimeApplication is already defined
CCTrep.kif:93:1: warning: subclass MimeMessage is already defined
CCTrep.kif:94:1: warning: subclass MimeMultipart is already defined
CCTrep.kif:108:1: warning: subclass EncodingProcedure is already defined
Government.kif:4758:1: warning: instance DepartmentOfHomelandSecurity is already defined
emotion.kif:824:1: warning: instance Happiness is already defined
emotion.kif:920:1: warning: instance Surprise is already defined
CountriesAndRegions.kif:3854:1: warning: instance USVirginIslands is already defined
HouseholdAppliances.kif:214:1: warning: subclass HairDryer is already defined
HouseholdAppliances.kif:653:1: warning: subclass ClothesWashingMachine is already defined
HouseholdAppliances.kif:1079:1: warning: subclass AirConditioner is already defined
HouseholdAppliances.kif:1235:1: warning: subclass UnitOfFrequency is already defined
Dining.kif:153:1: warning: subclass OutdoorDiningArea is already defined
development/NIEM-Scenario-Concepts.kif:31:1: warning: instance USCustomsAndBorderProtection is already defined
development/NIEM-Scenario-Concepts.kif:41:1: warning: instance USCustomsAndBorderProtection is already defined
development/NIEM-Scenario-Concepts.kif:126:1: warning: subclass AchievingControl is already defined
development/NIEM-Scenario-Concepts.kif:149:1: warning: subclass ChangeOfControl is already defined
development/NIEM-Scenario-Concepts.kif:163:1: warning: subclass Capturing is already defined
development/NIEM-Scenario-Concepts.kif:174:1: warning: subclass PlacingUnderArrest is already defined
development/NIEM-Scenario-Concepts.kif:175:1: warning: subclass PlacingUnderArrest is already defined
development/NIEM-Scenario-Concepts.kif:180:1: warning: subclass PlacingUnderArrest is already defined
development/NIEM-Scenario-Concepts.kif:181:1: warning: subclass PlacingUnderArrest is already defined
development/NIEM-Scenario-Concepts.kif:252:1: warning: subclass TransportViaRoadVehicle is already defined
development/NIEM-Scenario-Concepts.kif:253:1: warning: subclass TransportViaRoadVehicle is already defined
development/Society.kif:463:1: warning: subclass BookStore is already defined
development/Society.kif:643:1: warning: subclass Microwave is already defined
development/Society.kif:646:1: warning: subclass Oven is already defined
development/Society.kif:665:1: warning: subclass ClothesWashingMachine is already defined
development/Society.kif:669:1: warning: subclass Dishwasher is already defined
development/Society.kif:672:1: warning: subclass ClothesDryer is already defined
development/Society.kif:745:1: warning: subclass FoodProcessor is already defined
development/Society.kif:919:1: warning: subclass ElectricKettle is already defined
development/Society.kif:1084:1: warning: subclass Cheese is already defined
development/Biography.kif:87:1: warning: subclass Coronation is already defined
development/Biography.kif:88:1: warning: subclass Coronation is already defined
development/Biography.kif:334:1: warning: instance ActuaryScience is already defined
development/Biography.kif:344:1: warning: instance Astronomy is already defined
development/Biography.kif:347:1: warning: instance Cartography is already defined
development/Biography.kif:349:1: warning: instance ComputerScience is already defined
development/Biography.kif:351:1: warning: instance Geography is already defined
development/Biography.kif:353:1: warning: instance Geology is already defined
development/Biography.kif:355:1: warning: instance LibraryScience is already defined
development/Biography.kif:359:1: warning: instance Sociology is already defined
development/Biography.kif:361:1: warning: instance Statistics is already defined
development/Biography.kif:369:1: warning: instance Paleontology is already defined
development/Biography.kif:372:1: warning: instance Actuary is already defined
development/Biography.kif:374:1: warning: instance Anthropologist is already defined
development/Biography.kif:379:1: warning: instance Architect is already defined
development/Biography.kif:381:1: warning: instance Astronomer is already defined
development/Biography.kif:383:1: warning: instance Biologist is already defined
development/Biography.kif:385:1: warning: instance Chemist is already defined
development/Biography.kif:387:1: warning: instance Economist is already defined
development/Biography.kif:391:1: warning: instance Engineer is already defined
development/Biography.kif:395:1: warning: instance Geographer is already defined
development/Biography.kif:397:1: warning: instance Geologist is already defined
development/Biography.kif:399:1: warning: instance Historian is already defined
development/Biography.kif:401:1: warning: instance Linguist is already defined
development/Biography.kif:403:1: warning: instance Mathematician is already defined
development/Biography.kif:405:1: warning: instance MedicalResearcher is already defined
development/Biography.kif:407:1: warning: instance Paleontologist is already defined
development/Biography.kif:409:1: warning: instance Philosopher is already defined
development/Biography.kif:411:1: warning: instance Psychologist is already defined
development/Biography.kif:413:1: warning: instance Physicist is already defined
development/Biography.kif:415:1: warning: instance PoliticalScientist is already defined
development/Biography.kif:417:1: warning: instance Librarian is already defined
development/Biography.kif:419:1: warning: instance RegisteredNurse is already defined
development/Biography.kif:421:1: warning: instance Scientist is already defined
development/Biography.kif:425:1: warning: instance Sociologist is already defined
development/Biography.kif:427:1: warning: instance Statistician is already defined
development/Biography.kif:429:1: warning: instance Theologian is already defined
development/Biography.kif:431:1: warning: instance Veterinarian is already defined
development/Biography.kif:433:1: warning: instance Zoologist is already defined
development/Biography.kif:435:1: warning: instance Botanist is already defined
development/Biography.kif:440:1: warning: instance PrivateDetective is already defined
development/Biography.kif:444:1: warning: instance Lawyer is already defined
development/Biography.kif:760:1: warning: subclass ArtisticOccupation is already defined
development/Biography.kif:767:1: warning: subclass Musician is already defined
development/Biography.kif:1089:1: warning: instance Pope is already defined
development/Biography.kif:1103:1: warning: instance Rabbi is already defined
development/Biography.kif:1106:1: warning: instance Ayatollah is already defined
development/Biography.kif:1108:1: warning: instance Abbot is already defined
development/Biography.kif:1113:1: warning: instance Monk is already defined
development/Biography.kif:1115:1: warning: instance Bishop is already defined
development/Biography.kif:1117:1: warning: instance Cardinal is already defined
development/Biography.kif:1120:1: warning: instance Chaplain is already defined
development/Biography.kif:1125:1: warning: subclass Chapel is already defined
development/Biography.kif:1128:1: warning: subclass ChurchBuilding is already defined
development/Biography.kif:1131:1: warning: subclass Mosque is already defined
development/Biography.kif:1133:1: warning: subclass Synagogue is already defined
development/Biography.kif:1577:1: warning: subclass Sculpting is already defined
development/Biography.kif:1582:1: warning: subclass Designing is already defined
development/Biography.kif:1584:1: warning: subclass GraphicDesigning is already defined
development/Biography.kif:1593:1: warning: subclass ArtMuseum is already defined
development/Biography.kif:1617:1: warning: instance Criminal is already defined
development/Biography.kif:1693:1: warning: instance Pilot is already defined
development/Biography.kif:1707:1: warning: instance Admiral is already defined
development/Biography.kif:1711:1: warning: instance Major is already defined
development/Biography.kif:1856:1: warning: subclass ReligiousFuneral is already defined
development/Biography.kif:1857:1: warning: subclass ReligiousFuneral is already defined
development/Biography.kif:1884:1: warning: subclass SpectralColor is already defined
development/Biography.kif:1888:1: warning: instance VioletColor is already defined
development/Biography.kif:2033:1: warning: subclass Waist is already defined
development/Biography.kif:2039:1: warning: subclass Bust is already defined
development/TravelPolicies.kif:134:1: warning: subclass Policy is already defined
development/TravelPolicies.kif:323:1: warning: instance organizationRepresentative is already defined
development/emotion.kif:48:1: warning: subclass AppraisalProcess is already defined
development/emotion.kif:66:1: warning: subclass SubjectiveEmotionalFeeling is already defined
development/emotion.kif:70:1: warning: subclass Appraisal is already defined
development/emotion.kif:74:1: warning: subclass EmotionalSpeakingBehavior is already defined
development/emotion.kif:75:1: warning: subclass EmotionalSpeakingBehavior is already defined
development/emotion.kif:79:1: warning: subclass EmotionalVoiceUtterances is already defined
development/emotion.kif:93:1: warning: subclass EmotionalBehavioralProcess is already defined
development/emotion.kif:182:1: warning: subclass AppraisalOfGoalImportance is already defined
development/emotion.kif:186:1: warning: instance EvaluationAsImportantToGoals is already defined
development/emotion.kif:192:1: warning: instance EvaluationAsNotImportantToGoals is already defined
development/emotion.kif:199:1: warning: subclass AppraisalOfPredictability is already defined
development/emotion.kif:204:1: warning: instance AppraisalAsPredictable is already defined
development/emotion.kif:210:1: warning: instance AppraisalAsNotPredictable is already defined
development/emotion.kif:216:1: warning: subclass AppraisalOfLoss is already defined
development/emotion.kif:221:1: warning: subclass AppraisalOfAvoidabilityOfConsequences is already defined
development/emotion.kif:238:1: warning: subclass AppraisalOfFamiliarity is already defined
development/emotion.kif:254:1: warning: subclass AppraisalOfJusticeOfTreatment is already defined
development/emotion.kif:306:1: warning: instance AppraisalAsDesirableConsequences is already defined
development/emotion.kif:312:1: warning: instance AppraisalAsUndesirableConsequences is already defined
development/emotion.kif:316:1: warning: subclass AppraisalOfUrgency is already defined
development/emotion.kif:323:1: warning: instance AppraisalAsNotUrgentResponse is already defined
development/emotion.kif:334:1: warning: subclass AppraisalOfCongruenceWithIdeals is already defined
development/emotion.kif:337:1: warning: instance AppraisalAsCongruentWithIdeals is already defined
development/emotion.kif:342:1: warning: instance AppraisalAsNotCongruentWithIdeals is already defined
development/emotion.kif:351:1: warning: subclass AppraisalOfPleasantness is already defined
development/emotion.kif:356:1: warning: instance AppraisalAsPleasant is already defined
development/emotion.kif:361:1: warning: instance AppraisalAsUnpleasant is already defined
development/emotion.kif:366:1: warning: instance AppraisalAsBeingDisliked is already defined
development/emotion.kif:371:1: warning: instance AppraisalAsBeingLiked is already defined
development/emotion.kif:374:1: warning: subclass AppraisalOfExpectedness is already defined
development/emotion.kif:382:1: warning: subclass AppraisalAsExpected is already defined
development/emotion.kif:386:1: warning: instance AppraisalAsNotExpected is already defined
development/emotion.kif:390:1: warning: subclass AppraisalOfDangerousness is already defined
development/emotion.kif:398:1: warning: instance AppraisalAsNotDangerous is already defined
development/emotion.kif:403:1: warning: instance AppraisalAsDangerous is already defined
development/emotion.kif:407:1: warning: subclass AppraisalOfSuddenness is already defined
development/emotion.kif:412:1: warning: instance AppraisalAsSudden is already defined
development/emotion.kif:418:1: warning: instance AppraisalAsNotSudden is already defined
development/emotion.kif:422:1: warning: subclass AppraisalOfCausalAgency is already defined
development/emotion.kif:428:1: warning: instance AppraisalAsCausedByAnother is already defined
development/emotion.kif:434:1: warning: instance AppraisalAsCausedSupernaturally is already defined
development/emotion.kif:440:1: warning: instance AppraisalAsCausedBySelf is already defined
development/emotion.kif:445:1: warning: instance AppraisalAsCausedByChance is already defined
development/emotion.kif:449:1: warning: subclass AppraisalOfSocialAttention is already defined
development/emotion.kif:454:1: warning: instance AppraisalAsBeingAtTheCentreOfAttention is already defined
development/emotion.kif:460:1: warning: instance AppraisalAsNotBeingAtTheCentreOfAttention is already defined
development/emotion.kif:466:1: warning: subclass AppraisalOfCausalIntent is already defined
development/emotion.kif:470:1: warning: instance AppraisalAsUnintended is already defined
development/emotion.kif:477:1: warning: instance AppraisalAsDeliberate is already defined
development/emotion.kif:495:1: warning: instance Jealousy is already defined
development/emotion.kif:505:1: warning: instance Interest is already defined
development/emotion.kif:507:1: warning: instance Contempt is already defined
development/emotion.kif:523:1: warning: instance Love is already defined
development/emotion.kif:546:1: warning: instance Pleasure is already defined
development/emotion.kif:589:1: warning: instance Happiness is already defined
development/emotion.kif:595:1: warning: instance Shame is already defined
development/emotion.kif:601:1: warning: instance Disgust is already defined
development/emotion.kif:663:1: warning: instance Surprise is already defined
development/emotion.kif:667:1: warning: instance Expectant is already defined
development/emotion.kif:670:1: warning: instance Concern is already defined
development/emotion.kif:679:1: warning: instance Irritation is already defined
development/emotion.kif:685:1: warning: instance Despair is already defined
development/emotion.kif:695:1: warning: instance Disappointment is already defined
development/emotion.kif:703:1: warning: instance Pride is already defined
development/emotion.kif:709:1: warning: instance Anger is already defined
development/emotion.kif:720:1: warning: instance Embarrassment is already defined
development/emotion.kif:727:1: warning: instance Grief is already defined
development/emotion.kif:732:1: warning: instance InspirationEmotion is already defined
development/emotion.kif:736:1: warning: instance Worry is already defined
development/emotion.kif:744:1: warning: instance Compassion is already defined
development/emotion.kif:748:1: warning: instance Fear is already defined
development/emotion.kif:772:1: warning: instance Hate is already defined
development/emotion.kif:784:1: warning: instance Curiosity is already defined
development/emotion.kif:799:1: warning: instance Guilt is already defined
development/emotion.kif:807:1: warning: instance Confusion is already defined
development/emotion.kif:833:1: warning: instance Sadness is already defined
development/emotion.kif:847:1: warning: instance Boredom is already defined
development/emotion.kif:862:1: warning: instance Anxiety is already defined
development/emotion.kif:867:1: warning: instance EmotionalStress is already defined
development/emotion.kif:874:1: warning: instance Hope is already defined
development/emotion.kif:880:1: warning: subclass PressingLipsTogether is already defined
development/emotion.kif:896:1: warning: subclass ClosingEyes is already defined
development/emotion.kif:899:1: warning: subclass HappyFacialExpression is already defined
development/emotion.kif:918:1: warning: subclass AngryFacialExpression is already defined
development/emotion.kif:936:1: warning: subclass DisgustedFacialExpression is already defined
development/emotion.kif:953:1: warning: subclass SurprisedFacialExpression is already defined
development/emotion.kif:954:1: warning: subclass SurprisedFacialExpression is already defined
development/emotion.kif:969:1: warning: subclass JawDropping is already defined
development/emotion.kif:971:1: warning: subclass FacialExpression is already defined
development/emotion.kif:974:1: warning: subclass NeutralExpression is already defined
development/emotion.kif:979:1: warning: subclass EmotionalFacialExpression is already defined
development/emotion.kif:983:1: warning: subclass SadFacialExpression is already defined
development/emotion.kif:1003:1: warning: subclass FearfulFacialExpression is already defined
development/emotion.kif:1018:1: warning: subclass EmotionalBodilyMovementBehavior is already defined
development/emotion.kif:1019:1: warning: subclass EmotionalBodilyMovementBehavior is already defined
development/emotion.kif:1023:1: warning: subclass PhysiologicalResponseToEmotionalState is already defined
development/emotion.kif:1035:1: warning: subclass MovingAwayFromPeople is already defined
development/emotion.kif:1066:1: warning: subclass MovingTowardsPeople is already defined
development/emotion.kif:1067:1: warning: subclass MovingTowardsPeople is already defined
development/emotion.kif:1094:1: warning: subclass MusclesBecomingTense is already defined
development/emotion.kif:1109:1: warning: subclass MusclesRelaxing is already defined
development/emotion.kif:1124:1: warning: subclass Perspiring is already defined
development/emotion.kif:1126:1: warning: subclass Perspiring is already defined
development/emotion.kif:1136:1: warning: subclass PerspiringHands is already defined
development/emotion.kif:1149:1: warning: subclass PerspiringWholeBody is already defined
development/emotion.kif:1153:1: warning: subclass StayingStill is already defined
development/emotion.kif:1156:1: warning: subclass BreathingAtASlowerRate is already defined
development/emotion.kif:1158:1: warning: subclass HeartBeatingAtSlowerRate is already defined
development/emotion.kif:1161:1: warning: subclass TemperatureFallingExperiencedAsFeelingCold is already defined
development/emotion.kif:1165:1: warning: subclass TemperatureRisingExperiencedAsFeelingWarm is already defined
development/emotion.kif:1168:1: warning: subclass ExperiencingDiscomfortInTheStomach is already defined
development/emotion.kif:1186:1: warning: subclass Weeping is already defined
development/emotion.kif:1187:1: warning: subclass Weeping is already defined
development/emotion.kif:1211:1: warning: subclass Laughing is already defined
development/emotion.kif:1225:1: warning: subclass RaisingEyebrows is already defined
development/emotion.kif:1231:1: warning: subclass PhysicalViolence is already defined
development/emotion.kif:1243:1: warning: subclass Shivering is already defined
development/emotion.kif:1244:1: warning: subclass Shivering is already defined
development/emotion.kif:1248:1: warning: subclass LimbWeakening is already defined
development/emotion.kif:1251:1: warning: subclass OpeningEyesWidely is already defined
development/emotion.kif:1264:1: warning: subclass HeartBeatingAtFasterRate is already defined
development/emotion.kif:1275:1: warning: subclass MovingAbruptly is already defined
development/emotion.kif:1279:1: warning: subclass Blushing is already defined
development/emotion.kif:1282:1: warning: subclass BreathingAtAMoreRapidRate is already defined
development/emotion.kif:1283:1: warning: subclass BreathingAtAMoreRapidRate is already defined
development/emotion.kif:1286:1: warning: subclass BecomingPale is already defined
development/emotion.kif:1289:1: warning: subclass ExperiencingALumpInTheThroat is already defined
development/emotion.kif:1329:1: warning: instance FeelingCalm is already defined
development/emotion.kif:1335:1: warning: instance FeelingNervous is already defined
development/emotion.kif:1342:1: warning: instance FeelingRestless is already defined
development/emotion.kif:1347:1: warning: instance FeelingAtEase is already defined
development/emotion.kif:1351:1: warning: instance FeelingInControl is already defined
development/emotion.kif:1358:1: warning: instance FeelingOutOfControl is already defined
development/emotion.kif:1366:1: warning: instance FeelingStrong is already defined
development/emotion.kif:1372:1: warning: instance FeelingWeak is already defined
development/emotion.kif:1382:1: warning: instance FeelingEnergetic is already defined
development/emotion.kif:1388:1: warning: instance FeelingBad is already defined
development/emotion.kif:1393:1: warning: instance FeelingGood is already defined
development/emotion.kif:1400:1: warning: instance FeelingAlert is already defined
development/emotion.kif:1404:1: warning: instance FeelingTired is already defined
development/emotion.kif:1409:1: warning: instance FeelingDubious is already defined
development/emotion.kif:1417:1: warning: subclass SurprisedVoiceUtterance is already defined
development/emotion.kif:1433:1: warning: subclass AngryVoiceUtterance is already defined
development/emotion.kif:1454:1: warning: subclass SadVoiceUtterance is already defined
development/emotion.kif:1466:1: warning: subclass HappyVoiceUtterance is already defined
development/emotion.kif:1481:1: warning: subclass DisgustedVoiceUtterance is already defined
development/emotion.kif:1497:1: warning: subclass SpeakingAtAFasterRate is already defined
development/emotion.kif:1513:1: warning: subclass SpeakingAssertively is already defined
development/emotion.kif:1518:1: warning: subclass SpeakingWithAlteredSpeechMelody is already defined
development/emotion.kif:1521:1: warning: subclass SpeakingInADisturbedFashion is already defined
development/emotion.kif:1524:1: warning: subclass SpeakingLoudly is already defined
development/emotion.kif:1528:1: warning: subclass SpeakingSoftly is already defined
development/emotion.kif:1532:1: warning: subclass FearfulVoiceUtterance is already defined
development/emotion.kif:1547:1: warning: subclass SpeakingAtASlowerRate is already defined
development/emotion.kif:1552:1: warning: subclass NotSpeaking is already defined
development/emotion.kif:1555:1: warning: subclass SpeakingWithTremblingVoice is already defined
development/emotion.kif:1560:1: warning: subclass SpeakingALongUtterance is already defined
development/emotion.kif:1563:1: warning: subclass SpeakingAShortUtterance is already defined
development/Facebook.kif:759:1: warning: subclass MarkupLanguage is already defined

Problems with unused variables and shadowing of variables:

Merge.kif:14680:20: warning: explicit existential shadowing of explicit existential variable `P`
Mid-level-ontology.kif:28106:32: warning: explicit existential shadowing of implicit universal variable `NUMBER`
Mid-level-ontology.kif:28183:23: warning: explicit existential shadowing of implicit universal variable `AN`
Hotel.kif:2052:12: warning: unused explicit existential variable `AMT`
Weather.kif:907:12: warning: explicit existential shadowing of implicit universal variable `WIND`
UXExperimentalTerms.kif:1236:14: warning: explicit universal shadowing of implicit universal variable `ITEM`
UXExperimentalTerms.kif:1236:14: warning: explicit universal shadowing of implicit universal variable `ITEM`
UXExperimentalTerms.kif:3880:42: warning: explicit universal shadowing of explicit universal variable `BUYING`
ComputingBrands.kif:1943:14: warning: explicit existential shadowing of implicit universal variable `A`
ComputingBrands.kif:3020:12: warning: explicit existential shadowing of implicit universal variable `A`
Cars.kif:3472:38: warning: explicit existential shadowing of explicit existential variable `EYE`
Cars.kif:3522:45: warning: explicit existential shadowing of explicit existential variable `INHAL`

@apease
Copy link
Contributor

apease commented Jan 13, 2020

I checked Diamond and see that it has two subclass statements, but that's not an error. SUMO has multiple-inheritance. I checked line 109 of emotion.kif and that line is in the middle of a documentation string. I suspect that the variable issues are likely solved already. Could I suggest that you do a git pull and run your analysis again?

@nordlow
Copy link
Contributor Author

nordlow commented Jan 13, 2020

My duplication mechanism checks if the whole statement is duplicate. The first mineral duplicates were added by me, sorry. I've removed those.

I've rerun it on upstream master, not mine master, to get the correct line numbers.

@nordlow
Copy link
Contributor Author

nordlow commented Jan 13, 2020

Now things are updated. There is more coming.

@nordlow
Copy link
Contributor Author

nordlow commented Jan 13, 2020

The problem in Merge.kif is that

(=>
  (instance ?AW ArtWork)
  (hasPurpose ?AW
    (exists (?P)
      (and
        (instance ?H Human)
        (desires ?H
          (exists (?P)
            (and
              (instance ?P Perception)
              (experiencer ?P ?H)
              (patient ?P ?AW))))))))

should be

(=>
  (instance ?AW ArtWork)
  (hasPurpose ?AW
    (exists (?H)
      (and
        (instance ?H Human)
        (desires ?H
          (exists (?P)
            (and
              (instance ?P Perception)
              (experiencer ?P ?H)
              (patient ?P ?AW))))))))

@apease
Copy link
Contributor

apease commented Jan 14, 2020

Thanks for finding this. Fixed just now in 46a8749

@apease apease closed this as completed Jan 14, 2020
@arademaker
Copy link
Contributor

I didn't understand. In the end, do all the errors reported in the first comment reduced to only one error?

@nordlow
Copy link
Contributor Author

nordlow commented Jan 14, 2020

I didn't understand. In the end, do all the errors reported in the first comment reduced to only one error?

No. Every line in the output is one separate error. You should reopen until all these are fixed, @apease

@arademaker
Copy link
Contributor

So this issue should not be closed?

@nordlow
Copy link
Contributor Author

nordlow commented Jan 14, 2020

That is correct.

Every line in the output above has the format

FILE:LINE:COLUMN

Each such line indicates a separate error.

@arademaker arademaker reopened this Jan 14, 2020
@arademaker
Copy link
Contributor

But as @apease said, not all cases are errors! For instance:

Food.kif:771:(subclass Cheese PreparedFood)
Economy.kif:4256:;(subclass Cheese DairyProduct)

Besides, one statement is already commented.

arademaker added a commit to arademaker/sumo that referenced this issue Jan 14, 2020
@arademaker arademaker changed the title More issues detected by my tool some duplicated statements and variable shadowing Jan 14, 2020
@nordlow
Copy link
Contributor Author

nordlow commented Jan 14, 2020

(subclass Cheese PreparedFood)

Each of these reported duplicate subclass definitions has an equivalent definition somewhere else in SUMO. In the case of Cheese there are two definitions both equivalent to

(subclass Cheese PreparedFood)

one in Food.kif and another in development/Society.kif.

In this case I assume the one in development/Society.kif should be treated as a duplicate and be removed.

Try searching for the whole statement under root directory to find all occurrencies for the rest of the definitions.

@nordlow
Copy link
Contributor Author

nordlow commented Jan 14, 2020

Update: I've added duplicate instance definitions aswell. Most of them are in development.

@nordlow
Copy link
Contributor Author

nordlow commented Jan 14, 2020

If you need to I can try adding a reference print to the first subclass and instance definition for each duplicate.

@nordlow
Copy link
Contributor Author

nordlow commented Jan 15, 2020

I can remove the duplicates if you want to...

@apease
Copy link
Contributor

apease commented Jan 15, 2020

@nordlow Removing exact textually duplicated statements would be very helpful. So for example at line 1015 in ComputingBrands

(subclass WindowsOS95 WindowsOS)
(termFormat JapaneseLanguage WindowsOS95 "Windows 95")
(subclass WindowsOS95 WindowsOS)

The subclass statements were duplicated (not sure what sort of copy-paste thing I did to make that happen!) and could be removed.

But in the case of CookedFood I need to change the rules and terms since there's a confusion among cooking with heat and preparing (that may or may not involve heat). Other cases of subclass subsumption may similarly require a more complex fix than simple removal

@nordlow
Copy link
Contributor Author

nordlow commented Jan 22, 2020

See #209 for a more complete list of duplicate definitions with better diagnostics.

apease added a commit that referenced this issue Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants