180 likes | 383 Views
</menta>. Concept mining for programming automation. Problem. A lot of trivial tasks that could be automated Add field Patronim on Customer page. Remove field Patronim from Customer page. Add drop down list on the form. ...
E N D
</menta> Concept mining for programming automation
Problem • A lot of trivial tasks that could be automated • Add field Patronim on Customer page. • Remove field Patronim from Customer page. • Add drop down list on the form. • ... • A lot of not so trivial solutions that should be reused are not reused • How-tos. • Libraries. • ...
Current solutions • Template based code generators: • IDEs • Visual studio. • IDEA. • Maven • Archetypes.
They can not solve the problem • Once generated solution is hardly maintainable • Developer generated the solution based on DB structure, then added some functionality in it, then customer wants to change the DB structure. • Developer has to regenerate and merge his further changes • This is done for only one reason generator does not understand what's it's doing.
2005 MIT media lab published the feasibility test for Metafor the program that creates the sceleton of the Python classes based on shallow English descripton MIT Metofor
MIT Metafor Input: shallow English description Output: scaffolding Python class. Metafor utilised natural language processor Montylingua, common sence KB ConceptNet, programmatic interpreter.
Requirements • System has to operate with knowledge. • System has to understand what it is doing • Architecture of the target application. • Methods to change the architecture. • Domain specific information. • Requirements for changes. • System has to understand the human operator • Communicate in natural language.
Key ideas • Operate with changes to be applied over current architecture not the static structure of classes. • Use domain knowledge model to map the inbound requirements into acceptance criteria to be used to create the solution. • Use both trained data and generation to create the solution. • Use several abstraction layers of the target application.
Key components • Knowledge base. • Linguistic. • Perceiving. • Solution generator. • Communication.
Knowledge base Is the main storage of the data to be used by the system. KB is RDF storage with OWL data. OWL(web ontology language) W3C recommendation. KB is used to store the semantic information: • Target application architecture • Domain specific knowledge (How-tos) • Common sense information • Predicates generated based on text • Acceptance criteria for generated solution • ...
Linguistuc component Inbound: is text according to SE standard SPICE. Outbound: set of predicates that could be used as knowledge to be mapped to domain knowledge model. We used Stanford Parser to create the set of predicates.
Perceiving component Inbound: set of predicates and domain knowledge model. Outbound: predicates mapped to domain knowledge model(predicates from CR, bug-report, FRS mapped to acceptance criteria model) Perceiving module has to map inbound predicates to the model (domain model) in knowledge base, using trained data and stochastic search generation.
Solution generator component Inbound: acceptance criteria in KB Outbound: solution in actual code.
Solution generator components • Reasoner. • Reasoner interface. • Genetic generator. • Solution checker. • Trainer. • Associator. • Generalizer. • Analogy Detector. • Target language translator.
Reasoner For the purposes of logical inference in the environment of possible contradictions and several probable variants, we decided to use probabilistic reasoner NARS. NARS main feautures: • Deduction • Induction • Analogy • ...
Genetic generator Inbound: Acceptance criteria. Outbound: Solution in form of How-tos sequences. Generator is capable of creation of the sequences of How-tos according to the acceptance criteria. Inference is produced by NARS. This could be interpreted as human imagination mechanism.
Solution checker Is devoted to logically infer the percentage of how good is generated solution according to acceptance criteria. Solution checker mainly relies on NARS probabilistic mechanisms, but collects all proper information from KB to be processed by reasoner.
Trainer Machine learning component.