%\documentclass[11pt,serif]{beamer} \documentclass[10pt]{beamer} \usepackage[portuges]{babel} \usepackage{natslides} \usepackage{graphicx} \usepackage{teximporter} \fvset{fontsize=\footnotesize} \begin{document} \inlinepin \def\bex#1{\fbox{#1}} \def\bexx#1{\begin{block}{}#1\end{block}} \title[Passarola]{Passarola: High-Order Exercise Generation System} \author[jjoão]{J.João Almeida\\ {\tiny Isabel Araújo\\ Irene Brito\\ Nuno Carvalho\\ Gaspar J. Machado\\ Rui M.S. Pereira\\ Georgui Smirnov\\} } \institute{Departamento de Informática\\ Universidade do Minho} \maketitle =. Menu \tableofcontents =.= {\scriptsize alguns componentes} Passarola \inline_makefileg[rankdir=0,scale=0.5]{ base: Passarola-tools ex-DSL ex-archive ex-Aggregation Passarola-tools: LaTeX Maxima Perl pass-exer ex-Aggregation: ex-test ex-automata } =.= Passarola : . Set of tools: . compilers . web platform . command-line # . Programming language for exercises generation (DSL): . using and embedding \LaTeX (for quality document generation) . using and embedding Maxima (for powerful math reasoning, calculations simplification) . using and embedding Perl (for \emph{text} transformation, scripting, plugins) # # =.= Passarola: M-Exercise language \begin{block}{Main blocks of Passarola} \begin{Verbatim} #title: #author: #let: n a = [3, 4, 8 ]; f b = [sin(x), cos(x), x^2]; a ~ b; #question: ... LaTeX text; #a --> will be replaced #suggestion: ... #resolution: ... how to obtain the solution #result: #Verification: ... how to compare result with user results #Obs: #usepackage: #Perl: \end{Verbatim} \end{block} =.== Example 1: Collective nouns \bex{ Como se chama um conjunto de \emph{peixes}? } \hspace{1cm} ↓ \hrule \begin{Verbatim} #title: Língua PT -- substantivos coletivos #let: colet = [cáfila , vara , rebanho, enxame , cardume]; elem = [camelos, porcos, ovelhas, abelhas, peixes ]; colet ~ elem; #question: Como se chama um conjunto de \emph{#elem}? #result: → #colet #resolution: #verification: #colet type=icstr; \end{Verbatim} \hrule =. ... Example 1: Collective nouns \hrule \begin{Verbatim} #title: Língua PT -- substantivos coletivos #let: colet[2] = [cáfila , vara , rebanho, enxame , cardume]; elem[2] = [camelos, porcos, ovelhas, abelhas, peixes ]; colet ~ elem; #question: Como se chama um conjunto de \emph{#elem[0]}? Como se chamam os elementos de um \emph{#colet[1]}? #result: → #colet[0] → #elem[1] #resolution: #verification: #colet[0] type=icstr; #elem[1] type=icstr; \end{Verbatim} \hrule =. Basic types strings numbers n (simplified by Perl) \begin{Verbatim} 3+5+sqrt(16) → 12 \end{Verbatim} functions f (simplified by Maxima) \begin{Verbatim} x+(--x)-3*x → -x \end{Verbatim} latex =.== Let block ... Choice elements from a list: \begin{Verbatim} a = [cat, dog, mouse]; pair[2] = [2,3,5,7,11,13,17,19]; \end{Verbatim} Expressions (substitutions, simplification, calculations) \begin{Verbatim} b = f(#a), #pair[1])... \end{Verbatim} Perl expression \begin{Verbatim} x = perl{ ... } number = { [1..100] }; \end{Verbatim} Maxima expression \begin{Verbatim} x = maxima{ solve(#eq) } \end{Verbatim} =.== External data External files / Data \begin{Verbatim} a = sectionlines(riospt); a = import(file); // lines of a file a = import `ls`; // lines of stdout of com a = {lines("x.lines") }; // using directly Perl \end{Verbatim} import (specific) columns from external tables (”:” field sep) \begin{Verbatim} x = importcol(3,animals); b ~ c = importcol(femea.tab); rio[3] ~ foz[3] = sectioncols(riospt); \end{Verbatim} =.== Reusable exercise structures Several reusable templates : . Multiple choice -- True / false (several types) . Re-map -- Find the correct correspondences . Verbal Analogies . Fill the gaps . Table-driven # =.=== Table-driven exercises \begin{Verbatim} #let: rio[3] ~ nascente[3] ~ foz[3] ~ atravessa[3] = sectioncols(riospt); #question: \begin{enumerate} \item Qual o rio que nasce em #nascente[0]? , \item Onde desagua o rio #rio[1]?, \item Qual a foz do rio que atravessa #atravessa[2]?, \end{enumerate} #result: \begin{enumerate} \item #rio[0] \item #foz[1] ... #tab riospt Minho : Esp., serra de Meira :Caminha : Coura, Mouro, Avia:Melgaço, Monção Lima : Esp., serra S.Mamede :Viana do Castelo:Germil, Castro Laboreiro, Vez:Ponte do Lima, Ponte da Barca Cávado: serra do Larouco :Esposende :Homem, Rabagão:Barcelos,Montalegre Ave : serra da Cabreira :Vila do Conde :Este, Vizela:Sto. Tirso, Taipas #format em serra=na serra \end{Verbatim} =.=== Re-map -- Simple correspondences \begin{Verbatim} #let: m[7] ~ f[7] = sectioncols(opposite); fshuf[7] ~ order[7] = perl{_unmap(#f)}; tabTex = perl{ mktable(#m, #fshuf);} tabTexRes = perl{ mktable(#m, #f);} #question: Qual a correspondência X -- oposto(X)? #tabTex #resolution #tabTexRes #result: #order #tab opposite alto:baixo gordo:magro lento:rápido skinny:fat Romeu:Juliet \end{Verbatim} =. Re-map problems \demo[Portuguese language re-map exercise]{ Generation of PDF \\ pass-exer -d 03-casamentos/proverbios.txt} =.=Music: Simple music chords recognition Abc music notation: \begin{Verbatim} X:1 M: 3/4 T: waltz K: C C C E | G G2 | E E z | C C2 | \end{Verbatim} \hrule \mbox{} \begin{import_abc}[scale=0.5,midi] X:1 M: 3/4 T: Waltz K: C L: 1/4 C C E | G G2 | E E z | C C2 | \end{import_abc}\\[2em] \hrule \mbox{} \inline_makefileg[rankdir=1,width=\textwidth]{ LaTeX: Pdf Midi Pdf: abc abcm2ps Midi: abc abc2midi abc: abc-template passarola } =. ...Music: Simple music chords recognition \begin{Verbatim} #let: headabc = {{ M: 2/4 K: C L: 1/8 CE Gz| }}; a[3] = [ [C4E4], [C4G4], [E4G4], [C4^F4], [C4E4G4] ]; b = [ 1, 2, 3 ]; c = [ #a[0], #a[1], #a[2]]; b ~ c; #question: Witch score corresponds to \inline_abc[width=0.5mm,midi]{ #headabc #c|] } (double click the icon to hear the sound) 1) \inline_abc[scale=0.5]{ #headabc #a[0]|] } 2) \inline_abc[scale=0.5]{ #headabc #a[1]|] } 3) \inline_abc[scale=0.5]{ #headabc #a[2]|] } #resolution: It is score #b \inline_abc[scale=0.5]{ #headabc #c|] } \end{Verbatim} =. ... Creating the following: \input{abc2.tex} =.= Passarola Archives of Exercises : . Domain ontology, catalogue, metadata . shared exercises . Problem-pedia # =.= Passarola exercise aggregation \: . test = seq of (exercise, TeX) . learning space = automata of (exercise, YouTube, chapters, lessons) # =.== Example: a simple test \begin{Verbatim} title: Teste Matemática Jun 2011 subtitle: exemplo inocente \section*{Instruções gerais} Este teste destina-se a ... \section{Algebra} #q{Quanto é $3 \times 9$?}{$9+9+9=27$}{27} #q{EqQuadratica.txt} \section{Geometria} #q{DerivadaDoProduto.txt,DerivadaDePolinomio.txt} #q[3]{geometria.txt} \end{Verbatim} =.= Passarola tools \: . pass-exer . pass-test . pass-catalogue . pass-check (verification of students submissions) (50\%): . web-based . textual approach # . pass-tex (inclusion of Passarola ex. in LaTeX) (10\%) . pass debugger (20\%) . pass-game (0\%) . pass-cards (0\%) . pass-trivialPursuit (0\%) . pass-studentBaesianModels (0\%) . ... # =.= Problema com assímptotas: que estratégia? \includegraphics[width=0.8\textwidth]{assimptotas-jj-irene-crop} =. Assímptotas \begin{Verbatim} \begin{tikzpicture} \begin{axis}[ restrict y to domain=-7:7, samples=1000, minor tick num=1, xlabel={$x$}, ylabel={$y$}, xtickmax=6, ytickmax=5, xmin = -7, xmax = 7, ymin = -6, ymax = 6, unbounded coords=jump, axis x line=middle, axis y line=middle] \addplot [color=red,mark=none,domain=-7:7] {#f2s}; \addplot [orange, no markers,dashed] coordinates {(#x[0],-6) (#x[0],6)}; \addplot [orange, no markers,dashed] coordinates {(#x[1],-6) (#x[1],6)}; \addplot [orange, no markers,dashed] coordinates {(-7,#y) (7,#y)}; \addplot [black, mark=*, only marks] coordinates {(0,#yy0) (#xx_assin_hor,#y)}; \node at (axis cs:0,#yy0 ) [anchor=north east] {$A$}; \node at (axis cs:#xx_assin_hor,#y) [anchor=north east] {$B$}; \end{axis} \end{tikzpicture} \end{Verbatim} =. ...Continuation \begin{Verbatim} x[2] = {[-3..-1,1..3]}; // choose 2 vertical assímptotas y = {[-2,-1,1,2]}; // choose 1 horizontal "" f f0 = {{1/(x-#x[0]) + 1/(x-#x[1]) + #y}}; // calculate the function f f2 = {{ratsimp(#f0)}}; s f2s = #f2; ... \end{Verbatim} \inline_makefileg[rankdir=1,width=\textwidth]{ exercise: grafico x1: choice x2: choice y1: choice f : x1 x2 y1 maxima A : f B : f tikz : A B f tikz-template grafico: tikz latex } =. Conclusions \fixme{Falta completar} =. Fim =.Verdeiro Falso \begin{Verbatim} #let: v1 = import VerdFals/jj1.true; f1[3] = import VerdFals/jj1.false; p1[4] = [#v1,#f1[0],#f1[1],#f1[2]]; r1[4] = [1,0,0,0]; p1~r1; \end{Verbatim} \begin{Verbatim} #question: Indique qual das seguintes proposições é verdadeira. \begin{enumerate} \item #r1[0] → #p1[0] \item #r1[1] → #p1[1] \item #r1[2] → #p1[2] \item #r1[3] → #p1[3] \end{enumerate} #result: #r1[*] #tab true ... #tab false ... \end{Verbatim} \end{document}