% this is /tritogeneia/a/the_agora/code/trade/semiotes/semiote_syntax.pl % Release Notice % This file, and all files referenced herein that are not contributed by % someone else, are unequivocably placed in the public domain. Be mindful % that we use code, libraries, and information contributed by others, and % that they may not have released their work into the public domain. Our % goal is to release our own work, not inadvertantly place someone else's % in the public domain. % If you use, modify, redistribute, or publish anything in this file or based % on this work, we ask that you follow good scholarly practice and: % 1. cite the software system and file, or database and accession number, % as relevant, in all files or data you redistribute; % 2. reference the most current URL and archival publication for this work, % which will always be found at % http://www.biocheminfo.org/repository/current_references.html, % in your package, database, redistribution, or publication; % 3. record all your modifications to this file in a new file that % preserves this message and authorship information, contains your % authorship information and code or data, and is named with a name % different from this file's name. % The suitability of this work for any purpose is neither expressed nor implied. Use % it at your own risk! % Why we release knowledge this way is explained at % http://www.biocheminfo.org/release_notes.html % Toni Kazic, February 28, 2002 :- ensure_loaded(library(caseconv)), ensure_loaded(library(basics)). % uses lower/1 from library(caseconv). semiote_syntax(abbrv(Abbreviation)) :- nonvar(Abbreviation), apply_regexp(abbrv(Abbreviation)). semiote_syntax(data_action(Action)) :- nonvar(Action), atom(Action), apply_regexp(data_action(Action)). % because this may be generated in several different ways, two methods of % checking will be allowed for now. semiote_syntax(action_number(Number)) :- nonvar(Number), ( apply_regexp(action_number(Number)) ; integer(Number) ). semiote_syntax(given_names(GivenNames)) :- nonvar(GivenNames), apply_regexp(given_names(GivenNames)). semiote_syntax(surname(Surname)) :- nonvar(Surname), apply_regexp(surname(Surname)). semiote_syntax(generatnl_part(GenrtnlPart)) :- nonvar(GenrtnlPart), apply_regexp(generatnl_part(GenrtnlPart)). semiote_syntax(accession(AccessionFromContributingDatabase)) :- nonvar(AccessionFromContributingDatabase), apply_regexp(accession(AccessionFromContributingDatabase)). semiote_syntax(accession_status(StatusOfAccessionFromContributingDatabase)) :- ( nonvar(StatusOfAccessionFromContributingDatabase) -> apply_regexp(accession_status(StatusOfAccessionFromContributingDatabase)) ; true ). % hmm, should these be a bundle of both lists???? semiote_syntax(alista(List)) :- nonvar(List), ( is_list(List) ; apply_regexp(alista(List)) ). semiote_syntax(alistb(List)) :- nonvar(List), ( is_list(List) ; apply_regexp(alistb(List)) ). semiote_syntax(entity_role(Role)) :- nonvar(Role), apply_regexp(entity_role(Role)). semiote_syntax(expertise(List)) :- nonvar(List), is_list(List). semiote_syntax(department(OrganizationalComponentOfInstitution)) :- nonvar(OrganizationalComponentOfInstitution), apply_regexp(department(OrganizationalComponentOfInstitution)). semiote_syntax(room(RoomNumber)) :- nonvar(RoomNumber), apply_regexp(room(RoomNumber)). semiote_syntax(building(BuildingNameOrNumber)) :- nonvar(BuildingNameOrNumber), apply_regexp(building(BuildingNameOrNumber)). semiote_syntax(street_name(StreetOrRoadNameOrNumber)) :- nonvar(StreetOrRoadNameOrNumber), apply_regexp(street_name(StreetOrRoadNameOrNumber)). semiote_syntax(street_number(StreetAddressOfBuilding)) :- nonvar(StreetAddressOfBuilding), apply_regexp(street_number(StreetAddressOfBuilding)). semiote_syntax(district(DistrictNameOrDesignation)) :- nonvar(DistrictNameOrDesignation), apply_regexp(district(DistrictNameOrDesignation)). semiote_syntax(institutional_mail_code(InstMailCode)) :- nonvar(InstMailCode), apply_regexp(institutional_mail_code(InstMailCode)). % not all countries have these (e.g. Eire) so don't require it semiote_syntax(national_mail_code(NatlMailCode)) :- nonvar(NatlMailCode), apply_regexp(national_mail_code(NatlMailCode)). semiote_syntax(city(VillageOrTownOrCity)) :- nonvar(VillageOrTownOrCity), apply_regexp(city(VillageOrTownOrCity)). semiote_syntax(geo_state(StateOrProvinceOrCounty)) :- nonvar(StateOrProvinceOrCounty), apply_regexp(geo_state(StateOrProvinceOrCounty)). semiote_syntax(nation(Nation)) :- nonvar(Nation), apply_regexp(nation(Nation)). semiote_syntax(telephone_country_code(TelephoneCountryCode)) :- nonvar(TelephoneCountryCode), apply_regexp(telephone_country_code(TelephoneCountryCode)). semiote_syntax(telephone_city_code(TelephoneCityOrAreaCode)) :- nonvar(TelephoneCityOrAreaCode), apply_regexp(telephone_city_code(TelephoneCityOrAreaCode)). semiote_syntax(telephone_local_number(TelephoneNumberAsDialedFromOutsideTheCity)) :- nonvar(TelephoneNumberAsDialedFromOutsideTheCity), apply_regexp(telephone_local_number(TelephoneNumberAsDialedFromOutsideTheCity)). semiote_syntax(entity_name(NameOfForProfitOrNonProfitEntity)) :- nonvar(NameOfForProfitOrNonProfitEntity), atomic(NameOfForProfitOrNonProfitEntity), apply_regexp(entity_name(NameOfForProfitOrNonProfitEntity)). semiote_syntax(email_add(InternetEmailAddress)) :- nonvar(InternetEmailAddress), apply_regexp(email_add(InternetEmailAddress)). semiote_syntax(comm_msg(TextOfMessageBody)) :- nonvar(TextOfMessageBody), apply_regexp(comm_msg(TextOfMessageBody)). semiote_syntax(topic(Topic)) :- nonvar(Topic), apply_regexp(topic(Topic)). semiote_syntax(question_text(Question)) :- nonvar(Question), apply_regexp(question_text(Question)). semiote_syntax(answer_text(Answer)) :- nonvar(Answer), apply_regexp(answer_text(Answer)). semiote_syntax(encryption_status(Status)) :- nonvar(Status), apply_regexp(encryption_status(Status)). semiote_syntax(encryption_algorithm(Algorithm)) :- nonvar(Algorithm), apply_regexp(encryption_algorithm(Algorithm)). semiote_syntax(comm_attchmt(Attachment)) :- nonvar(Attachment), apply_regexp(comm_attchmt(Attachment)). semiote_syntax(comm_sender(email_add(InternetEmailAddress))) :- nonvar(InternetEmailAddress), apply_regexp(email_add(InternetEmailAddress)). semiote_syntax(comm_recipient(email_add(InternetEmailAddress))) :- nonvar(InternetEmailAddress), apply_regexp(email_add(InternetEmailAddress)). semiote_syntax(local_time(LocalTime,LocalMachine))) :- nonvar(LocalTime), nonvar(LocalMachine), apply_regexp(local_time(LocalTime)), apply_regexp(accession(LocalMachine)). semiote_syntax(utc_time(UTCTimeOnAgoraServer))) :- nonvar(UTCTimeOnAgoraServer), apply_regexp(utc_time(UTCTimeOnAgoraServer)). semiote_syntax(url(URL)) :- nonvar(URL), apply_regexp(url(URL)). semiote_syntax(mime_type(FileMimeType)) :- nonvar(FileMimeType), apply_regexp(mime_type(FileMimeType)). semiote_syntax(privacy_status(Status)) :- nonvar(Status), apply_regexp(privacy_status(Status)). semiote_syntax(entry_id(EntryIDNumber)) :- nonvar(EntryIDNumber), ( integer(EntryIDNumber) ; apply_regexp(entry_id(EntryIDNumber)) ). semiote_syntax(thread_id(ThreadIDNumber)) :- nonvar(ThreadIDNumber), ( integer(ThreadIDNumber) ; apply_regexp(thread_id(ThreadIDNumber)) ). semiote_syntax(synonym(PrimaryTerm,Synonym)) :- nonvar(PrimaryTerm), nonvar(Synonym), atom(PrimaryTerm), atom(Synonym), ( apply_regexp(cpd_name(PrimaryTerm)), apply_regexp(cpd_name(Synonym)) ; apply_regexp(rxn_name(PrimaryTerm)), apply_regexp(rxn_name(Synonym)) ). semiote_syntax(rxn_role(Role)) :- nonvar(Role), apply_regexp(rxn_role(Role)). semiote_syntax(cpd_name(CpdName)) :- nonvar(CpdName), apply_regexp(cpd_name(CpdName)). % here and elsewhere I explicitly check to make sure the Primary Term, % and not another synonym, is used semiote_syntax(compound_name(PrimaryTermNameForAMoleculeOrMolecularComplex)) :- nonvar(PrimaryTermNameForAMoleculeOrMolecularComplex), atom(PrimaryTermNameForAMoleculeOrMolecularComplex), apply_regexp(cpd_name(PrimaryTermNameForAMoleculeOrMolecularComplex)). semiote_syntax(isosmiles(IsomericSmilesString)) :- nonvar(IsomericSmilesString), apply_regexp(isosmiles(IsomericSmilesString)). semiote_syntax(method_id(SerialNumOfExperimentalOrComputationalMethod,StringOrAgoraCitationKeyDescribingMethod)) :- nonvar(SerialNumOfExperimentalOrComputationalMethod), nonvar(StringOrAgoraCitationKeyDescribingMethod), apply_regexp(action_number(SerialNumOfExperimentalOrComputationalMethod)), ( apply_regexp(comm_msg(StringOrAgoraCitationKeyDescribingMethod)) ; apply_regexp(agora_citation_key(StringOrAgoraCitationKeyDescribingMethod)) ). semiote_syntax(datum_id(ProvisionalIDNumOfDatum,Datum)) :- nonvar(ProvisionalIDNumOfDatum), nonvar(Datum), apply_regexp(datum_id(ProvisionalIDNumOfDatum)), ( apply_regexp(Datum) -> true ; bundle_syntax(Datum) ). semiote_syntax(prov_datum_id(ProvisionalIDNumOfDatum,Datum)) :- nonvar(ProvisionalIDNumOfDatum), nonvar(Datum), apply_regexp(prov_datum_id(ProvisionalIDNumOfDatum)), ( apply_regexp(Datum) -> true ; bundle_syntax(Datum) ). % Adding type_person, but this is the same as entity_role. Why do we need both, Geetha 9-05-03 semiote_syntax(type_person(TheTypeofActionForThatPerson)) :- nonvar(TheTypeofActionForThatPerson), apply_regexp(type_person(TheTypeofActionForThatPerson)). Adding classtn_qual, Geetha 9-05-03 semiote_syntax(classtn_qual(ClassTnQual)) :- nonvar(ClassTnQual), apply_regexp(classtn_qual(ClassTnQual)). semiote_syntax(rxn_name(PrimaryTermNameForAReactionOrSetOfReactions)) :- nonvar(PrimaryTermNameForAReactionOrSetOfReactions), atom(PrimaryTermNameForAReactionOrSetOfReactions), apply_regexp(rxn_name(PrimaryTermNameForAReactionOrSetOfReactions)). semiote_syntax(rxn_type_name(PrimaryTermNameForBiochemicalTypeOfReaction)) :- nonvar(PrimaryTermNameForBiochemicalTypeOfReaction), atom(PrimaryTermNameForBiochemicalTypeOfReaction), apply_regexp(rxn_type_name(PrimaryTermNameForBiochemicalTypeOfReaction)). semiote_syntax(path_process_name(NameForASetOfReactionsSoDesignatedHistorically)) :- nonvar(NameForASetOfReactionsSoDesignatedHistorically), atom(NameForASetOfReactionsSoDesignatedHistorically), apply_regexp(rxn_name(NameForASetOfReactionsSoDesignatedHistorically)). semiote_syntax(stoich(StoichiometryOfSpeciesInReaction)) :- nonvar(StoichiometryOfSpeciesInReaction), apply_regexp(stoich(StoichiometryOfSpeciesInReaction). semiote_syntax(dalton(MolWt)) :- nonvar(MolWt), apply_regexp(dalton(MolWt)). semiote_syntax(mol_state(MolState)) :- nonvar(MolState), apply_regexp(mol_state(MolState)). semiote_syntax(macromol(IsOrIsnt)) :- nonvar(IsOrInst), apply_regexp(macromol(IsOrIsnt)). semiote_syntax(num_subunits(N)) :- nonvar(N), apply_regexp(num_subunits(N)). semiote_syntax(compartment(Compartment)) :- nonvar(Compartment), apply_regexp(compartment(Compartment). % Adding compartment_rev, Geetha 9-05-03 semiote_syntax(compartment_rev(ReviewOfCompartment)) :- nonvar(ReviewOfCompartment), apply_regexp(compartment_rev(ReviewOfCompartment). semiote_syntax(ec_class(Class)) :- nonvar(Class), apply_regexp(ec_class(Class)). semiote_syntax(ec_subclass(SubClass)) :- nonvar(SubClass), apply_regexp(ec_subclass(SubClass)). semiote_syntax(ec_subsubclass(SubSubClass)) :- nonvar(SubSubClass), apply_regexp(ec_subsubclass(SubSubClass)). semiote_syntax(ec_serial_num(SerialNum)) :- nonvar(SerialNum), apply_regexp(ec_serial_num(SerialNum)). semiote_syntax(species(Species)) :- ( nonvar(Species) -> apply_regexp(species(Species)) ; true ). semiote_syntax(genus(Genus)) :- nonvar(Genus), apply_regexp(genus(Genus)). semiote_syntax(approx_org_name(ApproxNameOfOrganism)) :- nonvar(ApproxNameOfOrganism), apply_regexp(approx_org_name(ApproxNameOfOrganism)). semiote_syntax(strain(Strain)) :- nonvar(Strain), apply_regexp(strain(Strain)). semiote_syntax(marker(Marker)) :- nonvar(Marker), apply_regexp(marker(Marker)). semiote_syntax(encoding_loci(EncodingLoci)) :- nonvar(EncodingLoci), is_list(EncodingLoci), forall(member(Locus,EncodingLoci),apply_regexp(marker(Locus))). semiote_syntax(genetic_background(GeneticBackground)) :- nonvar(GeneticBackground), is_list(GeneticBackground), forall(member(Locus,GeneticBackground),apply_regexp(marker(Locus))). semiote_syntax(tissue(Tissue)) :- nonvar(Tissue), apply_regexp(tissue(Tissue)). semiote_syntax(organ(Organ)) :- nonvar(Organ), apply_regexp(organ(Organ)). semiote_syntax(cell_type(CellType)) :- nonvar(CellType), apply_regexp(cell_type(CellType)). semiote_syntax(cell_line(CellLine)) :- nonvar(CellLine), apply_regexp(cell_line(CellLine)). semiote_syntax(method(StringOrAgoraCitationKeyDescribingMethod)) :- nonvar(StringOrAgoraCitationKeyDescribingMethod), apply_regexp(method(StringOrAgoraCitationKeyDescribingMethod)). semiote_syntax(rlted_db(NameOfDataSource)) :- nonvar(NameOfDataSource), apply_regexp(rlted_db(NameOfDataSource)). semiote_syntax(rlted_url(URL)) :- nonvar(URL), apply_regexp(rlted_url(URL)). semiote_syntax(search_string(SearchString)) :- nonvar(SearchString), apply_regexp(search_string(SearchString)). semiote_syntax(search_url(URLOfSeachEngine)) :- nonvar(URLOfSeachEngin), apply_regexp(search_url(URLOfSeachEngine)). semiote_syntax(file_type(FileType)) :- nonvar(FileType), apply_regexp(file_type(FileType)). semiote_syntax(file(File)) :- nonvar(File), apply_regexp(file(File)). semiote_syntax(compression_status(CompressionStatus)) :- nonvar(CompressionStatus), apply_regexp(compression_status(CompressionStatus)). semiote_syntax(compression_algorithm(CompressionAlgorithm)) :- nonvar(CompressionAlgorithm), apply_regexp(compression_algorithm(CompressionAlgorithm)). semiote_syntax(compression_os(CompressionClassOfOperatingSystem)) :- nonvar(CompressionClassOfOperatingSystem), apply_regexp(compression_os(CompressionClassOfOperatingSystem)). semiote_syntax(encoding_status(EncodingStatus)) :- nonvar(EncodingStatus), apply_regexp(encoding_status(EncodingStatus)). semiote_syntax(encoding_algorithm(EncodingAlgorithm)) :- nonvar(EncodingAlgorithm), apply_regexp(encoding_algorithm(EncodingAlgorithm)). semiote_syntax(encoding_os(EncodingClassOfOperatingSystem)) :- nonvar(EncodingClassOfOperatingSystem), apply_regexp(encoding_os(EncodingClassOfOperatingSystem)). semiote_syntax(alt_cit_id(AltCitIdNumOrString)) :- nonvar(AltCitIdNumOrString), apply_regexp(alt_cit_id(AltCitIdNumOrString)). semiote_syntax(bundle(Bundle)) :- nonvar(Bundle), bundle_syntax(Bundle). semiote_syntax(article_title(TitleString)) :- nonvar(TitleString), apply_regexp(article_title(TitleString)). semiote_syntax(edition(Edition)) :- nonvar(Edition), apply_regexp(edition(Edition)). semiote_syntax(book_title(TitleString)) :- nonvar(TitleString), apply_regexp(book_title(TitleString)). semiote_syntax(series_title(TitleString)) :- nonvar(TitleString), apply_regexp(series_title(TitleString)). semiote_syntax(journal_title(TitleString)) :- nonvar(TitleString), apply_regexp(journal_title(TitleString)). semiote_syntax(volume(Volume)) :- nonvar(Volume), apply_regexp(volume(Volume)). semiote_syntax(start_page(StartingPageNumber)) :- nonvar(StartingPageNumber), apply_regexp(start_page(StartingPageNumber)). semiote_syntax(end_page(EndingPageNumber)) :- nonvar(EndingPageNumber), apply_regexp(end_page(EndingPageNumber)). semiote_syntax(year(YearInXXXXFormat)) :- nonvar(YearInXXXXFormat), apply_regexp(year(YearInXXXXFormat)). semiote_syntax(abstract(AbstractTextString)) :- nonvar(AbstractTextString), apply_regexp(abstract(AbstractTextString)). semiote_syntax(citation_type(TypeSource)) :- nonvar(TypeSource), apply_regexp(citation_type(TypeSource)). semiote_syntax(isbn(ISBNSerialNumber)) :- apply_regexp(action_number(ISBNSerialNumber)). semiote_syntax(db_cptn_action(Action)) :- nonvar(Action), apply_regexp(db_cptn_action(Action)). semiote_syntax(agora_citation_key(Key)) :- nonvar(Key), apply_regexp(agora_citation_key(Key)). semiote_syntax(temp_agora_citkey(Key)) :- nonvar(Key), apply_regexp(action_number(Key)). semiote_syntax(num_steps(N)) :- ( integer(N), N =< 10 ; apply_regexp(num_steps(N)) ). semiote_syntax(list_num(N)) :- ( integer(N) ; apply_regexp(list_num(N)) ). semiote_syntax(functor_name(Functor)) :- ( atom(Functor) ; apply_regexp(functor_name(Functor)) ). % an infix operator of arbitrary precedence semiote_syntax(inclusive_op(Operator)) :- op(_Precedence,xfy,Operator), memberchk(Operator,[=<,>=,@=<,@>=]). semiote_syntax(exclusive_op(Operator)) :- op(_Precedence,xfy,Operator), memberchk(Operator,[<,>,@<,@>]). % here the syntactic check matches the semantic semiote_syntax(bound(Bound)) :- ( number(Bound) ; compound(Bound) ). semiote_syntax(chosen_action(Action)) :- apply_regexp(chosen_action(Action)). % Shouldn't the above one be % semiote_syntax(chosen_action(Action)) :- % nonvar(chosen_action), % apply_regexp(chosen_action(Action)). % Geetha, 9-5-03 % new 2.6.00. semiote_syntax(user_name(UserName)) :- apply_regexp(user_name(UserName)). semiote_syntax(user_password(EncryptedPassword)) :- % how to test for encryption? and which algorithm? apply_regexp(user_password(EncryptedPassword)). semiote_syntax(output_format(Format)) :- apply_regexp(output_format(Format)). % new semiotes and bundles, and other terms, that are used in the forms but must % be cleaned up and defined. They are stuffed here temporarily so we can run quickie.perl % for sorting them out. They are a mix of semiotes, bundles, and terms that are duplicates. % Also, the arity shown is not necessarily correct. % % Jiang, Kutikkad, Kazic, 8.4.03. % The followings are changed. Added "apply_regexp". % Jiang 14.4.2003 % Adding the arguments needed in the parenthesis for all these semiotes, % Geetha 9-2-03 Need to check with Toni. semiote_syntax(multistep_q(MultipleSteps)) :- nonvar(MultipleSteps), apply_regexp(multistep_q(MultipleSteps)). semiote_syntax(mech_info_q(MechanicalInformation)) :- nonvar(MechanicalInformation), apply_regexp(mech_info_q(MechanicalInformation)). semiote_syntax(disease_q(Disease)) :- nonvar(Disease), apply_regexp(disease_q(Disease)). semiote_syntax(phys_char_q(PhysicalCharacterestics)) :- nonvar(PhysicalCharacterestics), apply_regexp(phys_char_q(PhysicalCharacterestics)). semiote_syntax(other_orgs_q(OtherOrganisms)) :- nonvar(OtherOrganisms), apply_regexp(other_orgs_q(OtherOrganisms)). semiote_syntax(alt_rxns_q(AlternateReactions)) :- nonvar(AlternateReactions), apply_regexp(alt_rxns_q(AlternateReactions)). semiote_syntax(alt_cat_rxns_q(AlternateCatalystReactions)) :- nonvar(AlternateCatalystReactions), apply_regexp(alt_cat_rxns_q(AlternateCatalystReactions)). semiote_syntax(alt_forms_mol_q(AlternateFormsMolecule)) :- nonvar(AlternateFormsMolecule), apply_regexp(alt_forms_mol_q(AlternateFormsMolecule)). semiote_syntax(mol_specificity_q(MolecularSpecificity)) :- nonvar(MolecularSpecificity), apply_regexp(mol_specificity_q(MolecularSpecificity)). semiote_syntax(voltage_act_q(VoltageActivated)) :- nonvar(VoltageActivated), apply_regexp(voltage_act_q(VoltageActivated)). % Is this needed here since it is a bundle of sa_class, sa_subclass etc % Geetha 9-04-03 %semiote_syntax(saier_num(SaierNumber)) :- % nonvar(SaierNumber), % apply_regexp(saier_num(SaierNumber)). semiote_syntax(sa_class(Class)) :- nonvar(Class), apply_regexp(sa_class(Class)). semiote_syntax(sa_subclass(SubClass)) :- nonvar(SubClass), apply_regexp(sa_subclass(SubClass)). semiote_syntax(sa_family(SaierFamily)) :- nonvar(SaierFamily), apply_regexp(sa_family(SaierFamily)). semiote_syntax(sa_subfamily(SaierSubFamily)) :- nonvar(SaierSubFamily), apply_regexp(sa_subfamily(SaierSubFamily)). semiote_syntax(sa_protein(SaierProtien)) :- nonvar(SaierProtien), apply_regexp(sa_protein(SaierProtien)). semiote_syntax(rxn_survey(ReactionSurvery)) :- nonvar(ReactionSurvery), apply_regexp(rxn_survey(ReactionSurvery)). semiote_syntax(org_survey(OrganismSurvey)) :- nonvar(OrganicSurvey), apply_regexp(org_survey(OrganismSurvey)). semiote_syntax(reference_number(ReferenceNumber)) :- nonvar((ReferenceNumber), apply_regexp(reference_number(ReferenceNumber)). semiote_syntax(stimulus_sen(Stimulus)) :- nonvar(Stimulus), apply_regexp(stimulus_sen(Stimulus)). semiote_syntax(stimulus_src(IntracellularOrEnvironmentalStimulus)) :- nonvar(stimulus_src(IntracellularOrEnvironmentalStimulus), apply_regexp(stimulus_src(stimulus_src(IntracellularOrEnvironmentalStimulus)). semiote_syntax(stimulus_resp(StimulusResponse)) :- nonvar(StimulusResponse), apply_regexp(stimulus_resp(StimulusResponse)). semiote_syntax(stimulus_name(StimulusName)) :- nonvar(StimulusName), apply_regexp(stimulus_name(StimulusName)). semiote_syntax(stimulus_mech_known(KnownStimulusMechanism)) :- nonvar(KnownStimulusMechanism), apply_regexp(stimulus_mech_known(KnownStimulusMechanism)). semiote_syntax(rxn_ref(ReactionReference)) :- nonvar(ReactionReference), apply_regexp(rxn_ref(ReactionReference)). semiote_syntax(kin_survey(KineticSurvey)) :- nonvar(KineticSurvey), apply_regexp(kin_survey(KineticSurvey)). % Don't think we need cata_survey2, need only cata_survey. So commenting out % Geetha 9-3-03 %semiote_syntax(cata_survey2(_)) :- % apply_regexp(cata_survey2(_)). semiote_syntax(cata_survey(CatalystSurvey)) :- nonvar(CatalystSurvey), apply_regexp(cata_survey(CatalystSurvey)). %semiote_syntax(trans_survey2(_)) :- % apply_regexp(trans_survey2(_)). semiote_syntax(trans_survey(TransportSurvey)) :- nonvar(TransportSurvey), apply_regexp(trans_survey2(TransportSurvey)). %semiote_syntax(org_survey2(_)) :- % apply_regexp(org_survey2(_)). semiote_syntax(primary_term(PrimaryTerm)) :- nonvar(PrimaryTerm), apply_regexp(primary_term(PrimaryTerm)). % semiote_syntax(synonym(_)) :- % true. semiote_syntax(config(Configuration)) :- nonvar(Configuration), apply_regexp(config(Configuration)). semiote_syntax(db_value(DatabaseValue)) :- nonvar(DatabaseValue), apply_regexp(db_value(DatabaseValue)). semiote_syntax(accession_number(AccessionNumber)) :- nonvar(AccessionNumber), apply_regexp(accession_number(AccessionNumber)). semiote_syntax(database_set(DatabaseSet)) :- nonvar(DatabaseSet), apply_regexp(database_set(DatabaseSet)). semiote_syntax(kin_order_rev(ReviewOfKineticOrder)) :- nonvar(ReviewOfKineticOrder), apply_regexp(kin_order_rev(ReviewOfKineticOrder)). semiote_syntax(type_kin_q_rev()) :- nonvar(), apply_regexp(type_kin_q_rev(_)). semiote_syntax(kin_syl_rev(_)) :- nonvar(), apply_regexp(kin_syl_rev(_)). semiote_syntax(assay_results_rev(ReviewOfAssayResults)) :- nonvar(ReviewOfAssayResults), apply_regexp(assay_results_rev(ReviewOfAssayResults)). semiote_syntax(strain_rev(ReviewOfStrain)) :- nonvar(ReviewOfStrain), apply_regexp(strain_rev(ReviewOfStrain)). semiote_syntax(genetic_background_rev(ReviewOfGeneticBackground)) :- nonvar(ReviewOfGeneticBackground), apply_regexp(genetic_background_rev(ReviewOfGeneticBackground)). semiote_syntax(markers_rev(ReviewOfMarkers)) :- nonvar(ReviewOfMarkers), apply_regexp(markers_rev(ReviewOfMarkers)). semiote_syntax(organ_rev(ReviewOfOrganism)) :- nonvar(ReviewOfOrganism), apply_regexp(organ_rev(ReviewOfOrganism)). semiote_syntax(tissue_rev(ReviewOfTissue)) :- nonvar(ReviewOfTissue), apply_regexp(tissue_rev(ReviewOfTissue)). semiote_syntax(cell_type_rev(ReviewOfCellType)) :- nonvar(ReviewOfCellType), apply_regexp(cell_type_rev(ReviewOfCellType)). semiote_syntax(cell_line_rev(ReviewOfCellLine)) :- nonvar(ReviewOfCellLine), apply_regexp(cell_line_rev(ReviewOfCellLine)). semiote_syntax(rxn_catalyzed_rev(ReviewOfCatalyzedReaction)) :- nonvar(ReviewOfCatalyzedReaction), apply_regexp(rxn_catalyzed_rev(ReviewOfCatalyzedReaction)). semiote_syntax(rxn_transport_rev(ReviewOfTransportReaction)) :- nonvar(ReviewOfTransportReaction), apply_regexp(rxn_transport_rev(ReviewOfTransportReaction)). semiote_syntax(rxn_has_macromol_rev(ReviewofReactionThatHasMacromol)) :- nonvar(ReviewofReactionThatHasMacromol), apply_regexp(rxn_has_macromol_rev(ReviewofReactionThatHasMacromol)). semiote_syntax(rxn_novel_macromol_rev(ReviewofNovelMacromolReaction)) :- nonvar(ReviewofNovelMacromolReaction), apply_regexp(rxn_novel_macromol_rev(ReviewofNovelMacromolReaction)). semiote_syntax(alt_rxns_q_rev(ReviewofAlternateReactions)) :- nonvar(ReviewofAlternateReactions), apply_regexp(alt_rxns_q_rev(ReviewofAlternateReactions)). % Is this review of synonym list or list of synonym review !!?? % Geetha 9-03-03 semiote_syntax(syno_review_list(ListofSynonymReview)) :- nonvar(ListofSynonymReview), apply_regexp(syno_review_list(ListofSynonymReview)). semiote_syntax(syno_review(ReviewOfSynonyms)) :- nonvar(ReviewOfSynonyms), apply_regexp(syno_review(ReviewOfSynonyms)). semiote_syntax(catalyst_review(ReviewOfCatalyst)) :- nonvar(ReviewOfCatalyst), apply_regexp(catalyst_review(ReviewOfCatalyst)). semiote_syntax(trans_review(ReviewOfTransport)) :- nonvar(ReviewOfTransport), apply_regexp(trans_review()). semiote_syntax(org_review(ReviewOfOrganisms)) :- nonvar(ReviewOfOrganisms), apply_regexp(org_review(ReviewOfOrganisms)). %semiote_syntax(catalyst_review2(_)) :- % apply_regexp(catalyst_review2(_)). %semiote_syntax(trans_review2(_)) :- % apply_regexp(trans_review2(_)). %semiote_syntax(org_review2(_)) :- % apply_regexp(org_review2(_)). semiote_syntax(kin_review(ReviewOfKinetics)) :- nonvar(ReviewOfKinetics), apply_regexp(kin_review(ReviewOfKinetics)). semiote_syntax(rxn_review(ReviewOfReaction)) :- nonvar(ReviewOfReaction), apply_regexp(rxn_review(ReviewOfReaction)). semiote_syntax(horiz_rxn_review(ReviewOfHorizontalReaction)) :- nonvar(ReviewOfHorizontalReaction), apply_regexp(horiz_rxn_review(ReviewOfHorizontalReaction)). % What is the difference between rxn_review and reacation_review??!! Similarly between organ_rev and org_review % Geetha 9-04-03 semiote_syntax(reaction_review(_)) :- apply_regexp(reaction_review(_)). semiote_syntax(org_review(ReviewOfOrganisms)) :- nonvar(ReviewOfOrganisms), apply_regexp(org_review(ReviewOfOrganisms)). semiote_syntax(dep_comments_review(ReviewofCommentsForDeposit)) :- nonvar(ReviewofCommentsForDeposit), apply_regexp(dep_comments_review(ReviewofCommentsForDeposit)). % What is the difference between alt_rxns_review and alt_rxn_q_review % Geetha 9-04-93 semiote_syntax(alt_rxns_review()) :- apply_regexp(alt_rxns_review(_)). % cuz compound_isosmiles/2 is a bundle! % Kutikkad and Kazic, 8.4.03. % What's this???? % But I change it anyway. % Jiang 14.04.2003 % semiote_syntax(compound_isosmiles_str(_)) :- % true. semiote_syntax(compound_isosmiles_str(_)) :- apply_regexp(compound_isosmiles_str(_)). %%%%%% utility predicates for syntax checking % see regexp.pl for the facts used in generating the semiote regexp array % bear in mind, the definitions are mostly to define the syntax: the vast majority of % the syntax checking will occur in the HTML/javascript forms! However in some cases % it is more efficient to have some syntactic checking occur within Prolog, at least for % now. % predicate for using the array --- may just return a 0/1 via TCP/IP to % signal results of array pattern match (mmmm, that might be complicated). % apply_regexp(TargetString,ExecutionLanguage,LanguageSpecificRegularExpression). apply_regexp(Semiote) :- nonvar(Semiote), functor(Semiote,SemioteName,_), arg(1,Semiote,SemioteValue), regexp(SemioteName,TargetLanguage,RegExp), apply_regexp(SemioteValue,TargetLanguage,RegExp). % stubbed for now apply_regexp(_SemioteValue,_TargetLanguage,_RegExp) :- true. % then another predicate to generate the regexp array from the prolog regexp/3 facts % generate_regexp_array(File) check_list([],_). check_list([H|T],Goal) :- Goal =.. [SyntaxOrSemantics,Semiote], H =.. [Functor|Arguments], ( Functor == '(' -> functor(Semiote,SemioteFunctor,_), TestArg =.. [SemioteFunctor|Arguments], NewGoal =.. [SyntaxOrSemantics|TestArg] ; NewGoal =.. [SyntaxOrSemantics,H] ), call(NewGoal), check_list(T,Goal).